You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
444 B

import { test as setup } from "@playwright/test"
const authFile = "playwright/.auth/user.json"
setup("authenticate", async ({ page }) => {
await page.goto("/login")
await page.getByPlaceholder("Email").fill("admin@example.com")
await page.getByPlaceholder("Password").fill("changethis")
await page.getByRole("button", { name: "Log In" }).click()
await page.waitForURL("/")
await page.context().storageState({ path: authFile })
})