mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
chore(): sync
This commit is contained in:
@ -54,9 +54,8 @@ configs({ directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ title, co
|
||||
const results = await new AxeBuilder({ page }).analyze();
|
||||
expect(results.violations).toEqual([]);
|
||||
});
|
||||
// TODO(FW-5715): re-enable test
|
||||
test.skip(title('radio: keyboard navigation'), () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
test(title('radio: keyboard navigation'), () => {
|
||||
test.beforeEach(async ({ page, browserName }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-app>
|
||||
@ -98,6 +97,21 @@ configs({ directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ title, co
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
if (browserName === 'webkit') {
|
||||
const radio = page.locator('#first-group ion-radio').first();
|
||||
/**
|
||||
* Sometimes Safari does not focus the first radio.
|
||||
* This is a workaround to ensure the first radio is focused.
|
||||
*
|
||||
* Wait for the first radio to be rendered before tabbing.
|
||||
* This is necessary because the first radio may not be rendered
|
||||
* when the page first loads.
|
||||
*
|
||||
* This would cause the first radio to be skipped when tabbing.
|
||||
*/
|
||||
await radio.waitFor();
|
||||
}
|
||||
});
|
||||
|
||||
test('tabbing should switch between radio groups', async ({ page, pageUtils }) => {
|
||||
|
||||
@ -6,9 +6,23 @@ import { configs, test } from '@utils/test/playwright';
|
||||
*/
|
||||
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
||||
test.describe(title('radio: a11y'), () => {
|
||||
test.beforeEach(async ({ page, skip }) => {
|
||||
skip.browser('webkit', 'Tabbing is flaky in Safari');
|
||||
test.beforeEach(async ({ page, browserName }) => {
|
||||
await page.goto(`/src/components/radio/test/legacy/a11y`, config);
|
||||
|
||||
if (browserName === 'webkit') {
|
||||
const radio = page.locator('#first-group ion-radio').first();
|
||||
/**
|
||||
* Sometimes Safari does not focus the first radio.
|
||||
* This is a workaround to ensure the first radio is focused.
|
||||
*
|
||||
* Wait for the first radio to be rendered before tabbing.
|
||||
* This is necessary because the first radio may not be rendered
|
||||
* when the page first loads.
|
||||
*
|
||||
* This would cause the first radio to be skipped when tabbing.
|
||||
*/
|
||||
await radio.waitFor();
|
||||
}
|
||||
});
|
||||
test('tabbing should switch between radio groups', async ({ page, pageUtils }) => {
|
||||
const firstGroupRadios = page.locator('#first-group ion-radio');
|
||||
|
||||
Reference in New Issue
Block a user