Skip to content

Commit

Permalink
test(segment): remove skip on keyboard navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
thetaPC committed May 30, 2023
1 parent 4a1f9b6 commit 8543b2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/components/segment/test/a11y/segment.e2e.ts
Expand Up @@ -12,19 +12,19 @@ configs().forEach(({ title, config }) => {
});

// TODO FW-3710
test.skip('segment buttons should be keyboard navigable', async ({ page, browserName, skip }, testInfo) => {
test('segment buttons should be keyboard navigable', async ({ page, skip, pageUtils }) => {
// TODO (FW-2979)
skip.browser('webkit', 'Safari 16 only allows text fields and pop-up menus to be focused.');
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
const isRTL = testInfo.project.metadata.rtl === true;

const isRTL = config.direction === 'rtl';
const nextKey = isRTL ? 'ArrowLeft' : 'ArrowRight';
const previousKey = isRTL ? 'ArrowRight' : 'ArrowLeft';

await page.goto('/src/components/segment/test/a11y', config);

const segmentButtons = page.locator('ion-segment-button');

await page.keyboard.press(tabKey);
await pageUtils.pressKeys('Tab');
await expect(segmentButtons.nth(0)).toBeFocused();

await page.keyboard.press(nextKey);
Expand Down

0 comments on commit 8543b2b

Please sign in to comment.