forked from baron/baron-sso
Format adminfront code check targets
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user