chore(): sync

This commit is contained in:
Liam DeBeasi
2024-01-25 12:35:32 -05:00
110 changed files with 1819 additions and 585 deletions

View File

@ -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 }) => {

View File

@ -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');