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) => {
|
const fillLocation = async (inputText: string) => {
|
||||||
await page.locator("#location-select").click();
|
await page.locator("#location-select").click();
|
||||||
await page.locator("text=In Person (Organizer Address)").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('input[name="locationAddress"]').fill(inputText);
|
||||||
await page.locator("[data-testid=display-location]").check();
|
await page.locator("[data-testid=display-location]").check();
|
||||||
await page.locator("[data-testid=update-location]").click();
|
await page.locator("[data-testid=update-location]").click();
|
||||||
|
|
|
@ -94,12 +94,13 @@ const useRecordingDownload = () => {
|
||||||
// assume it is still fetching, do nothing.
|
// assume it is still fetching, do nothing.
|
||||||
},
|
},
|
||||||
isFetching,
|
isFetching,
|
||||||
|
recordingId,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPaidPlan: boolean }) => {
|
const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPaidPlan: boolean }) => {
|
||||||
const { t } = useLocale();
|
const { t } = useLocale();
|
||||||
const { setRecordingId, isFetching } = useRecordingDownload();
|
const { setRecordingId, isFetching, recordingId } = useRecordingDownload();
|
||||||
|
|
||||||
const { data: recordings } = trpc.viewer.getCalVideoRecordings.useQuery(
|
const { data: recordings } = trpc.viewer.getCalVideoRecordings.useQuery(
|
||||||
{ roomName },
|
{ roomName },
|
||||||
|
@ -134,7 +135,7 @@ const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPa
|
||||||
<Button
|
<Button
|
||||||
StartIcon={FiDownload}
|
StartIcon={FiDownload}
|
||||||
className="ml-4 lg:ml-0"
|
className="ml-4 lg:ml-0"
|
||||||
loading={isFetching}
|
loading={isFetching && recordingId === recording.id}
|
||||||
onClick={() => handleDownloadClick(recording.id)}>
|
onClick={() => handleDownloadClick(recording.id)}>
|
||||||
{t("download")}
|
{t("download")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -34,7 +34,7 @@ if (IS_EMBED_TEST) {
|
||||||
|
|
||||||
const config: PlaywrightTestConfig = {
|
const config: PlaywrightTestConfig = {
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
retries: 0,
|
retries: 2,
|
||||||
workers: os.cpus().length,
|
workers: os.cpus().length,
|
||||||
timeout: 60_000,
|
timeout: 60_000,
|
||||||
maxFailures: headless ? 10 : undefined,
|
maxFailures: headless ? 10 : undefined,
|
||||||
|
|
Loading…
Reference in New Issue