Revert "fix: cancel download fetch when progress toast is closed (#27151)"
This reverts commit fd476bf7f7.
This commit is contained in:
1 parent
23067cd8af
commit
4228f576b1
7 files changed
+268
-256
No files matched your search
@@ -1,9 +1,11 @@
|
||||
import { expect } from "@playwright/test";
|
||||
|
||||
import { FeaturesRepository } from "@calcom/features/flags/features.repository";
|
||||
import { PermissionCheckService } from "@calcom/features/pbac/services/permission-check.service";
|
||||
import { randomString } from "@calcom/lib/random";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { expect } from "@playwright/test";
|
||||
import { applySelectFilter, clearFilters } from "./filter-helpers";
|
||||
|
||||
import { clearFilters, applySelectFilter } from "./filter-helpers";
|
||||
import { test } from "./lib/fixtures";
|
||||
import { createAllPermissionsArray, enablePBACForTeam } from "./lib/test-helpers/pbac";
|
||||
|
||||
@@ -222,13 +224,17 @@ test.describe("Insights", async () => {
|
||||
|
||||
const downloadPromise = page.waitForEvent("download");
|
||||
|
||||
const downloadButton = page.getByRole("button", { name: "Download" });
|
||||
|
||||
// Expect download button to be visible
|
||||
await expect(downloadButton).toBeVisible();
|
||||
await expect(page.locator("text=Download")).toBeVisible();
|
||||
|
||||
// Click on Download button
|
||||
await page.getByText("Download").click();
|
||||
|
||||
// Expect as csv option to be visible
|
||||
await expect(page.locator("text=as CSV")).toBeVisible();
|
||||
|
||||
// Start waiting for download before clicking. Note no await.
|
||||
await downloadButton.click();
|
||||
await page.getByText("as CSV").click();
|
||||
const download = await downloadPromise;
|
||||
|
||||
// Wait for the download process to complete and save the downloaded file somewhere.
|
||||
|
||||
Reference in new issue
Block a user