Skip to content

Commit 902b9ff

Browse files
authored
test(web): strengthen shortcuts overlay assertions (#1849)
1 parent 0be5c93 commit 902b9ff

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

packages/web/src/components/PlannerSidebar/ShortcutsOverlay/ShortcutsOverlay.test.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ describe("ShortcutsOverlay", () => {
2626
const overlay = screen.getByRole("dialog", { name: "Keyboard shortcuts" });
2727

2828
expect(overlay.firstElementChild?.className).toContain("translate-x-0");
29-
expect(screen.getByText("Shortcuts")).toBeTruthy();
30-
expect(screen.getByText("Day")).toBeTruthy();
31-
expect(screen.getByText("Previous day")).toBeTruthy();
32-
expect(screen.queryByText("Empty")).toBeNull();
29+
expect(screen.getByText("Shortcuts")).toBeInTheDocument();
30+
expect(
31+
screen.getByText("Keyboard shortcuts for Day view"),
32+
).toBeInTheDocument();
33+
expect(screen.getByText("Day")).toBeInTheDocument();
34+
expect(screen.getByText("Previous day")).toBeInTheDocument();
35+
expect(screen.queryByText("Empty")).not.toBeInTheDocument();
3336
});
3437

35-
it("returns focus to the planner sidebar when closed with Escape", () => {
38+
it("calls onClose when closed with Escape", () => {
3639
const onClose = mock();
3740

3841
render(

0 commit comments

Comments
 (0)