Files
cms.fellies.org/e2e/smoke.pw.ts

20 lines
590 B
TypeScript

import { expect, test } from "@playwright/test"
test("smoke", async ({ page }, testInfo) => {
await page.goto("/")
if (testInfo.project.name === "web-chromium") {
await expect(page.getByRole("heading", { name: /your next\.js cms frontend/i })).toBeVisible()
return
}
const dashboardHeading = page.getByRole("heading", { name: /content dashboard/i })
if (await dashboardHeading.isVisible({ timeout: 2000 })) {
await expect(dashboardHeading).toBeVisible()
return
}
await expect(page.getByRole("heading", { name: /sign in to cms admin/i })).toBeVisible()
})