Skip to content

Commit 8e277a6

Browse files
committed
Focus SVG mode control in page context
1 parent 1f23a20 commit 8e277a6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/mode-solo-e2e.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ jobs:
106106
const firstPressed = await page.$eval(`${selector}[data-mode-index="0"]`, node => node.getAttribute('aria-pressed'));
107107
if (firstPressed !== 'true') throw new Error('first mode did not become selected');
108108
109-
await page.focus(`${selector}[data-mode-index="1"]`);
109+
const focused = await page.$eval(`${selector}[data-mode-index="1"]`, node => {
110+
node.focus();
111+
return document.activeElement === node;
112+
});
113+
if (!focused) throw new Error('second SVG mode did not accept keyboard focus');
110114
await page.keyboard.press('Space');
111115
await page.waitForFunction(label => document.body.innerText.includes(`SOLO ${label} HZ`), {}, frequencies[1].toFixed(1));
112116
const pressed = await page.$$eval(selector, nodes => nodes.map(node => node.getAttribute('aria-pressed')));
@@ -123,6 +127,7 @@ jobs:
123127
interactiveModeCount: count,
124128
frequenciesHz: frequencies,
125129
clickSolo: true,
130+
keyboardFocus: focused,
126131
keyboardSolo: true,
127132
reconstructionClearsSolo: true,
128133
pageErrors: pageErrors.length,

0 commit comments

Comments
 (0)