Skip to content

Commit

Permalink
feat(modal): fix e2e navigation test
Browse files Browse the repository at this point in the history
  • Loading branch information
Leotheluck authored and dpellier committed Jul 29, 2024
1 parent 4b65d3b commit 101065b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ describe('ods-modal navigation', () => {
<input type="text" id="input1" />
<button id="button1">Button 1</button>
</ods-modal>
<button id="button2">Button 2</button>
`);

await page.keyboard.press('Tab');
await page.keyboard.press('Tab');

expect(await page.evaluate(() => document.activeElement?.id)).toBe('input1');
expect(await page.evaluate(() => document.activeElement?.id)).not.toBe('button2');
});

it('should focus the dismissible button first if set', async() => {
Expand Down

0 comments on commit 101065b

Please sign in to comment.