2023-06-20 12:49:48 +00:00
|
|
|
import { test as setup } from "@playwright/test";
|
2023-07-07 14:34:54 +00:00
|
|
|
import { login } from "./login";
|
2023-08-14 14:41:58 +00:00
|
|
|
import { useTheme } from "./admin-client";
|
2023-06-20 12:49:48 +00:00
|
|
|
|
|
|
|
const authFile = ".auth/user.json";
|
|
|
|
|
|
|
|
setup("authenticate", async ({ page }) => {
|
2023-08-14 14:41:58 +00:00
|
|
|
useTheme();
|
|
|
|
await page.goto("./");
|
2023-07-07 14:34:54 +00:00
|
|
|
await login(page, "admin", "admin");
|
2023-08-14 14:41:58 +00:00
|
|
|
await page.waitForURL("./");
|
2023-06-20 12:49:48 +00:00
|
|
|
|
|
|
|
await page.context().storageState({ path: authFile });
|
|
|
|
});
|