Skip to content

Commit

Permalink
Add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Murreey committed Feb 21, 2024
1 parent 947c590 commit 444fcdf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/lrud.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,16 @@ describe('LRUD spatial', () => {

expect(result).toEqual('item-5');
});

it('should move to the second best candidate if first was blocked', async () => {
await page.goto(`${testPath}/3c-h-6f-blocked-exit.html`);
await page.evaluate(() => document.getElementById('item-6').focus());
await page.keyboard.press('ArrowUp');

const result = await page.evaluate(() => document.activeElement.id);

expect(result).toEqual('item-1');
});
});

describe('Page with nested containers', () => {
Expand Down

0 comments on commit 444fcdf

Please sign in to comment.