forked from baron/baron-sso
fix(adminfront): resolve biome lint errors and refine test stability
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { type Download, expect, test } from "@playwright/test";
|
||||
|
||||
test.describe("Tenants Management", () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@@ -731,9 +731,11 @@ test.describe("Tenants Management", () => {
|
||||
const item = page.getByTestId(testId);
|
||||
await item.waitFor({ state: "attached" });
|
||||
|
||||
let downloadObj;
|
||||
let downloadObj: Download;
|
||||
await expect(async () => {
|
||||
const downloadPromise = page.waitForEvent("download", { timeout: 10000 });
|
||||
const downloadPromise = page.waitForEvent("download", {
|
||||
timeout: 10000,
|
||||
});
|
||||
// Use dispatchEvent for more reliable trigger in webkit
|
||||
await item.dispatchEvent("click");
|
||||
downloadObj = await downloadPromise;
|
||||
@@ -750,9 +752,7 @@ test.describe("Tenants Management", () => {
|
||||
await expect(
|
||||
page.getByTestId("tenant-export-with-ids-menu-item"),
|
||||
).toBeVisible();
|
||||
const exportWithIdsDownload = await safeDownload(
|
||||
"tenant-export-with-ids-menu-item",
|
||||
);
|
||||
await safeDownload("tenant-export-with-ids-menu-item");
|
||||
expect(exportUrl).toContain("includeIds=true");
|
||||
|
||||
await openDataManagementMenu();
|
||||
|
||||
Reference in New Issue
Block a user