diff --git a/e2e/timed/edge-focus-sidebar-hint-0084.spec.ts b/e2e/timed/edge-focus-sidebar-hint-0084.spec.ts deleted file mode 100644 index b189a4afbb..0000000000 --- a/e2e/timed/edge-focus-sidebar-hint-0084.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { expect, test } from "@playwright/test"; -import { - createEventTitle, - fillTitleAndSaveEventForm, - openTimedEventFormWithKeyboard, - prepareTimedCalendarPage, -} from "../utils/event-test-utils"; -import path from "node:path"; - -const ARTIFACT_DIR = "/opt/cursor/artifacts"; - -test("@artifact edge focus sidebar teaches nudge keys", async ({ page }) => { - await prepareTimedCalendarPage(page); - const title = createEventTitle("Edge Hint"); - await openTimedEventFormWithKeyboard(page); - await fillTitleAndSaveEventForm(page, title); - - const eventButton = page - .locator("#mainGrid") - .getByRole("button", { name: title }); - await eventButton.focus(); - await page.keyboard.press("Tab"); - - const status = page.locator("[data-edge-focus-indicator]"); - await expect(status).toContainText(/adjusts start/i); - await expect(status).toContainText(/Tab/i); - await expect(status).not.toHaveText(/^Editing start time$/); - - await page.screenshot({ - path: path.join(ARTIFACT_DIR, "edge-focus-start-time-sidebar-hint.png"), - }); - - await page.keyboard.press("Shift+ArrowUp"); - await expect(status).toContainText(/Start /); - await expect(status).toContainText(/adjusts start/i); -}); diff --git a/e2e/timed/edge-focus-sidebar-hint.spec.ts b/e2e/timed/edge-focus-sidebar-hint.spec.ts new file mode 100644 index 0000000000..7af264006c --- /dev/null +++ b/e2e/timed/edge-focus-sidebar-hint.spec.ts @@ -0,0 +1,36 @@ +import { expect, test } from "@playwright/test"; +import { + createEventTitle, + ensureSidebarOpen, + fillTitleAndSaveEventForm, + openTimedEventFormWithKeyboard, + prepareTimedCalendarPage, +} from "../utils/event-test-utils"; + +test("edge focus sidebar teaches Tab and Shift+Arrow nudge keys", async ({ + page, +}) => { + await prepareTimedCalendarPage(page); + await ensureSidebarOpen(page); + const title = createEventTitle("Edge Hint"); + await openTimedEventFormWithKeyboard(page); + await fillTitleAndSaveEventForm(page, title); + + const eventButton = page + .locator("#mainGrid") + .getByRole("button", { name: title }); + await eventButton.focus(); + await page.keyboard.press("Tab"); + + const sidebarStatus = page.locator("#sidebar [data-edge-focus-indicator]"); + await expect(sidebarStatus).toBeVisible(); + await expect(sidebarStatus).toContainText(/adjusts start/i); + await expect(sidebarStatus).toContainText("Tab"); + await expect(sidebarStatus).not.toHaveText(/^Editing start time$/); + + await page.keyboard.press("Shift+ArrowUp"); + await expect(sidebarStatus).toContainText(/Start /); + await expect(sidebarStatus).toContainText(/adjusts start/i); + await expect(sidebarStatus).toContainText(/Shift/); + await expect(sidebarStatus).toContainText(/Arrow/i); +});