import { expect, test } from "@playwright/test" const BUILD_INFO_PATTERN = /Build v\S+ \+sha\.[a-z0-9]{5,7}/i test("smoke", async ({ page }, testInfo) => { await page.goto("/") if (testInfo.project.name === "web-chromium") { await expect( page.getByRole("heading", { name: /home|your next\.js cms frontend/i }), ).toBeVisible() await expect(page.getByText(BUILD_INFO_PATTERN)).toBeVisible() return } const dashboardHeading = page.getByRole("heading", { name: /content dashboard/i }) if (await dashboardHeading.isVisible({ timeout: 2000 })) { await expect(dashboardHeading).toBeVisible() await expect(page.getByText(BUILD_INFO_PATTERN)).toBeVisible() return } await expect(page.getByRole("heading", { name: /sign in to cms admin/i })).toBeVisible() })