1
0
forked from baron/baron-sso

ci: simplify adminfront runner flow and stabilize e2e auth state

This commit is contained in:
Lectom C Han
2026-02-20 10:14:53 +09:00
parent cee5bf13af
commit a14c67f189
3 changed files with 119 additions and 100 deletions

View File

@@ -23,14 +23,27 @@ type UserCreatePayload = {
department?: string;
};
test.use({
storageState: {
cookies: [],
origins: [
{
origin: "http://localhost:5173",
localStorage: [
{
name: "admin_session",
value: "playwright-admin-session",
},
],
},
],
},
});
test("user create and delete flow", async ({ page }) => {
const users: UserSummary[] = [];
let idSeq = 1;
await page.addInitScript(() => {
window.localStorage.setItem("admin_session", "playwright-admin-session");
});
await page.route("**/api/v1/admin/users**", async (route) => {
const request = route.request();
const url = new URL(request.url());