1
0
forked from baron/baron-sso

Format adminfront code check targets

This commit is contained in:
2026-04-30 15:59:57 +09:00
parent 6c45eca3d3
commit 790be37930
17 changed files with 2531 additions and 2919 deletions

View File

@@ -39,8 +39,9 @@ test.describe("Users CSV live E2E", () => {
await page.route("**/api/v1/**", async (route) => {
const requestUrl = new URL(route.request().url());
const liveUrl = `${baseURL}${requestUrl.pathname}${requestUrl.search}`;
const headers = { ...route.request().headers() };
delete headers.authorization;
const { authorization: _authorization, ...headers } = route
.request()
.headers();
headers["x-test-role"] = "super_admin";
const response = await route.fetch({ url: liveUrl, headers });
await route.fulfill({ response });
@@ -75,7 +76,9 @@ test.describe("Users CSV live E2E", () => {
expect(path).toBeTruthy();
const csv = fs.readFileSync(path as string, "utf8");
expect(csv).toContain("ID,Email,Name,Phone,Status,Tenant,Position,JobTitle,CreatedAt");
expect(csv).toContain(
"ID,Email,Name,Phone,Status,Tenant,Position,JobTitle,CreatedAt",
);
expect(csv).not.toContain("Role");
expect(csv).not.toContain("Department");
});