Skip to content

Commit

Permalink
fix: use recordingId to check loading (calcom#7524)
Browse files Browse the repository at this point in the history
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
  • Loading branch information
Udit-takkar authored Mar 6, 2023
1 parent 89bf832 commit c2668ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions apps/web/playwright/event-types.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ test.describe("Event Types tests", () => {
const fillLocation = async (inputText: string) => {
await page.locator("#location-select").click();
await page.locator("text=In Person (Organizer Address)").click();
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(250);
await page.locator('input[name="locationAddress"]').fill(inputText);
await page.locator("[data-testid=display-location]").check();
await page.locator("[data-testid=update-location]").click();
Expand Down
5 changes: 3 additions & 2 deletions packages/features/ee/video/ViewRecordingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ const useRecordingDownload = () => {
// assume it is still fetching, do nothing.
},
isFetching,
recordingId,
};
};

const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPaidPlan: boolean }) => {
const { t } = useLocale();
const { setRecordingId, isFetching } = useRecordingDownload();
const { setRecordingId, isFetching, recordingId } = useRecordingDownload();

const { data: recordings } = trpc.viewer.getCalVideoRecordings.useQuery(
{ roomName },
Expand Down Expand Up @@ -134,7 +135,7 @@ const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPa
<Button
StartIcon={FiDownload}
className="ml-4 lg:ml-0"
loading={isFetching}
loading={isFetching && recordingId === recording.id}
onClick={() => handleDownloadClick(recording.id)}>
{t("download")}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (IS_EMBED_TEST) {

const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
retries: 0,
retries: 2,
workers: os.cpus().length,
timeout: 60_000,
maxFailures: headless ? 10 : undefined,
Expand Down

0 comments on commit c2668ac

Please sign in to comment.