forked from baron/baron-sso
ci: simplify adminfront runner flow and stabilize e2e auth state
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user