Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Corner menu test: wait for the menu to take focus before pressing Home, so the key can't land on the button a frame early

christianmate8bd8cafb811
diff --git a/app/e2e/updatePill.spec.ts b/app/e2e/updatePill.spec.ts
index 347df0ae..b7603952 100644
--- a/app/e2e/updatePill.spec.ts
+++ b/app/e2e/updatePill.spec.ts
@@ -92,6 +92,9 @@ test('a row moving beneath the pointer stays neutral and the keyboard can highli
await expect.poll(() => trash.evaluate((el, p) => el.contains(document.elementFromPoint(p.x, p.y)), point)).toBe(true)
await expect(trash).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
await expect(trash).not.toHaveAttribute('data-highlighted', '')
+ // A click leaves focus on the button until the next frame, when the menu takes it. A key sent before that
+ // frame goes to the button, which ignores Home. The entrance is still running, so this is still "immediately".
+ await expect(menu).toBeFocused()
await page.keyboard.press('Home')
const first = menu.getByRole('menuitem').first()
await expect(first).toBeFocused()