🐛(frontend) keyboard navigation language picker

- add temporary fix to language picker to
ignore select on keyboard navigation. Needs
to be fixed directly in Cunningham Select
- update related e2e test
This commit is contained in:
daproclaima
2024-09-06 02:01:16 +02:00
committed by Sebastien Nobour
parent bd6cd59df6
commit e7aebfe59e
2 changed files with 18 additions and 14 deletions

View File

@@ -65,21 +65,10 @@ test.describe('Keyboard navigation', () => {
)
.all();
expect(focusableElements.length).toEqual(20);
expect(focusableElements.length).toEqual(19);
for (let i = 0; i < focusableElements.length; i++) {
await page.keyboard.press('Tab');
// check language picker language option navigation. 4th element is inner language picker arrow button
// eslint-disable-next-line playwright/no-conditional-in-test
if (i === 3) {
await page.keyboard.press('Enter');
// eslint-disable-next-line playwright/no-conditional-expect
await expect(focusableElements[i]).toBeFocused();
continue;
}
await expect(focusableElements[i]).toBeFocused();
}
});