mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
chore: sync with main
This commit is contained in:
@ -170,31 +170,37 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|||||||
});
|
});
|
||||||
await page.setContent(
|
await page.setContent(
|
||||||
`
|
`
|
||||||
<ion-picker-internal>
|
<ion-picker>
|
||||||
<ion-picker-column-internal></ion-picker-column-internal>
|
<ion-picker-column></ion-picker-column>
|
||||||
</ion-picker-internal>
|
</ion-picker>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const column = document.querySelector('ion-picker-column-internal');
|
const column = document.querySelector('ion-picker-column');
|
||||||
column.items = [
|
column.numericInput = true;
|
||||||
{ text: '00', value: 12 },
|
const items = [
|
||||||
{ text: '01', value: 1 },
|
{ text: '01', value: 1 },
|
||||||
{ text: '02', value: 2 },
|
{ text: '02', value: 2 },
|
||||||
{ text: '03', value: 3 },
|
{ text: '03', value: 3 },
|
||||||
{ text: '04', value: 4 },
|
{ text: '04', value: 4 },
|
||||||
{ text: '05', value: 5 }
|
{ text: '05', value: 5 }
|
||||||
];
|
];
|
||||||
column.value = 5;
|
|
||||||
column.numericInput = true;
|
items.forEach((item) => {
|
||||||
|
const option = document.createElement('ion-picker-column-option');
|
||||||
|
option.value = item.value;
|
||||||
|
option.textContent = item.text;
|
||||||
|
|
||||||
|
column.appendChild(option);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
`,
|
`,
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
|
|
||||||
const column = page.locator('ion-picker-column-internal');
|
const column = page.locator('ion-picker-column');
|
||||||
await column.click();
|
await column.click();
|
||||||
|
|
||||||
const input = page.locator('ion-picker-internal input');
|
const input = page.locator('ion-picker input');
|
||||||
await expect(input).toBeFocused();
|
await expect(input).toBeFocused();
|
||||||
|
|
||||||
// pressing Enter should blur the input and therefore close the keyboard
|
// pressing Enter should blur the input and therefore close the keyboard
|
||||||
|
|||||||
@ -54,7 +54,7 @@ configs({ directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ title, co
|
|||||||
const results = await new AxeBuilder({ page }).analyze();
|
const results = await new AxeBuilder({ page }).analyze();
|
||||||
expect(results.violations).toEqual([]);
|
expect(results.violations).toEqual([]);
|
||||||
});
|
});
|
||||||
test(title('radio: keyboard navigation'), () => {
|
test.describe(title('radio: keyboard navigation'), () => {
|
||||||
test.beforeEach(async ({ page, browserName }) => {
|
test.beforeEach(async ({ page, browserName }) => {
|
||||||
await page.setContent(
|
await page.setContent(
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user