Files
radicle-explorer/explorer/tests/e2e/modal.spec.ts
T
Rūdolfs Ošiņš e37521c739 Move explorer into explorer/
Makes explorer and desktop sibling projects, as proposed in ADR 1.
This commit only moves files; paths in CI, scripts and docs are fixed
in the following commits.
2026-10-22 11:06:33 +02:00

27 lines
818 B
TypeScript

import { test, expect } from "@tests/support/fixtures.js";
test("open and close modal", async ({ page }) => {
await page.goto("/");
await page.locator("body").press(`?`);
await expect(
page.locator(".modal").getByText("Keyboard shortcuts"),
).toBeVisible();
// Close modal by pressing the `Esc` key.
await page.locator("body").press("Escape");
await expect(
page.locator(".modal").getByText("Keyboard shortcuts"),
).not.toBeVisible();
await page.locator("body").press(`?`);
await expect(
page.locator(".modal").getByText("Keyboard shortcuts"),
).toBeVisible();
// Close modal by clicking outside of it.
await page.locator(".overlay").click({ position: { x: 10, y: 10 } });
await expect(
page.locator(".modal").getByText("Keyboard shortcuts"),
).not.toBeVisible();
});