fix: use recordingId to check loading (#7524)

Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
pull/7426/head^2
Udit Takkar 2023-03-06 16:09:54 +05:30 committed by GitHub
parent 89bf8321ba
commit c2668acd33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -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();

View File

@ -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>

View File

@ -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,