Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions e2e/timed/edge-focus-sidebar-hint-0084.spec.ts

This file was deleted.

36 changes: 36 additions & 0 deletions e2e/timed/edge-focus-sidebar-hint.spec.ts
Original file line number Diff line number Diff line change
@@ -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);
});
Loading