Files

14 lines
520 B
TypeScript
Raw Permalink Normal View History

import { test as setup } from "@playwright/test"
import { firstSuperuser, firstSuperuserPassword } from "./config.ts"
const authFile = "playwright/.auth/user.json"
setup("authenticate", async ({ page }) => {
await page.goto("/login")
2025-12-07 13:21:13 +01:00
await page.getByTestId("email-input").fill(firstSuperuser)
await page.getByTestId("password-input").fill(firstSuperuserPassword)
await page.getByRole("button", { name: "Log In" }).click()
await page.waitForURL("/")
await page.context().storageState({ path: authFile })
})