fix: use recordingId to check loading (#7524)
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>pull/7426/head^2
parent
89bf8321ba
commit
c2668acd33
|
@ -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();
|
||||
|
|
|
@ -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 },
|
||||
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue