feat: add admin smoke tests and enhance testing documentation with new strategies and configurations

This commit is contained in:
2026-05-12 21:01:25 +00:00
parent c058ec760f
commit 53ad012657
14 changed files with 388 additions and 51 deletions
+30
View File
@@ -0,0 +1,30 @@
import { test, expect, openNovaProjectDashboard } from "./fixtures"
test.describe("Admin smoke", () => {
test("logs in and shows the core collection groups", async ({ page }) => {
await openNovaProjectDashboard(page)
await expect(page.getByRole("heading", { level: 2, name: "Inhalte" })).toBeVisible()
await expect(page.getByRole("heading", { level: 2, name: "Medien" })).toBeVisible()
await expect(page.getByRole("heading", { level: 2, name: "Struktur" })).toBeVisible()
await expect(page.getByRole("link", { name: /Inhalte/ }).first()).toBeVisible()
await expect(page.getByRole("link", { name: /Mediathek/ }).first()).toBeVisible()
await expect(page.getByRole("link", { name: /Navigation/ }).first()).toBeVisible()
})
test("opens the content collection with the current admin configuration", async ({ page }) => {
await openNovaProjectDashboard(page)
await page
.getByRole("link", { name: /Inhalte/ })
.first()
.click()
await expect(page).toHaveURL(/\/collections\/content$/)
await expect(page.locator("main h1")).toHaveText("Inhalte")
await expect(page.getByRole("button", { name: /Neuer Eintrag|New Entry/i })).toBeVisible()
await expect(page.locator("main")).toContainText("Sprache")
await expect(page.locator("main")).toContainText("Inhaltsblöcke")
})
})