Files
Simo c389c3893d
CI / check (push) Successful in 52s
CI / deploy (push) Successful in 2m10s
CI / publish-container (push) Failing after 1m18s
feat(cms): improve catalog, editorial recovery and operations
2026-09-09 19:36:15 +02:00

28 lines
1.2 KiB
TypeScript

import { expect, test } from "@playwright/test";
// Read-only production checks. Content mutation tests belong to a seeded staging DB.
test("login remains usable on a narrow viewport", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 720 });
const response = await page.goto("/login");
expect(response?.ok()).toBe(true);
await expect(page.locator('input[type="password"]').first()).toBeVisible();
await expect(page.locator('button[type="submit"]').first()).toBeVisible();
expect(
await page.evaluate(
() => document.documentElement.scrollWidth <= innerWidth + 1,
),
).toBe(true);
await expect(page.locator("body")).not.toContainText("Application error");
});
test("public news is rendered without a server error", async ({ page }) => {
const response = await page.goto("/news");
expect(response?.ok()).toBe(true);
await expect(page.locator("main").first()).toBeVisible();
await expect(page.locator("body")).not.toContainText("Application error");
});
test("staff page is available", async ({ page }) => {
const response = await page.goto("/staff");
expect(response?.ok()).toBe(true);
await expect(page.locator("main").first()).toBeVisible();
});