From 1b387a11752cd44a92ca63f261264f9a58ca988a Mon Sep 17 00:00:00 2001 From: sviatlana-stsiapanava Date: Mon, 23 Dec 2024 11:50:00 +0500 Subject: [PATCH] Add waiters --- ...app-items-suppress-from-discovery-in-central-tenant.cy.js | 3 ++- cypress/support/fragments/bulk-edit/bulk-edit-actions.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/consortia/bulk-edit/in-app/bulk-edit-in-app-items-suppress-from-discovery-in-central-tenant.cy.js b/cypress/e2e/consortia/bulk-edit/in-app/bulk-edit-in-app-items-suppress-from-discovery-in-central-tenant.cy.js index 4427c901bf..62b70b2ffb 100644 --- a/cypress/e2e/consortia/bulk-edit/in-app/bulk-edit-in-app-items-suppress-from-discovery-in-central-tenant.cy.js +++ b/cypress/e2e/consortia/bulk-edit/in-app/bulk-edit-in-app-items-suppress-from-discovery-in-central-tenant.cy.js @@ -26,6 +26,7 @@ import QueryModal, { QUERY_OPERATIONS, itemFieldValues, } from '../../../../support/fragments/bulk-edit/query-modal'; +import { getLongDelay } from '../../../../support/utils/cypressTools'; let user; let instanceTypeId; @@ -223,7 +224,7 @@ describe('Bulk-edit', () => { () => { QueryModal.clickRunQuery(); QueryModal.verifyClosed(); - cy.wait('@getPreview').then((interception) => { + cy.wait('@getPreview', getLongDelay()).then((interception) => { const interceptedUuid = interception.request.url.match( /bulk-operations\/([a-f0-9-]+)\/preview/, )[1]; diff --git a/cypress/support/fragments/bulk-edit/bulk-edit-actions.js b/cypress/support/fragments/bulk-edit/bulk-edit-actions.js index 3578090b9a..6d7f4a9b12 100644 --- a/cypress/support/fragments/bulk-edit/bulk-edit-actions.js +++ b/cypress/support/fragments/bulk-edit/bulk-edit-actions.js @@ -243,7 +243,7 @@ export default { downloadPreview() { cy.do(downloadPreviewBtn.click()); // Wait for file to download - cy.wait(3000); + cy.wait(5000); }, verifyDownloadPreviewButtonDisabled(isDisabled = true) { @@ -994,11 +994,13 @@ export default { cy.do(actionsBtn.click()); cy.wait(500); cy.do(Button('Download matched records (CSV)').click()); + cy.wait(5000); BulkEditSearchPane.waitingFileDownload(); }, downloadErrors() { cy.do(Button('Download errors (CSV)').click()); + cy.wait(5000); BulkEditSearchPane.waitingFileDownload(); }, @@ -1159,6 +1161,7 @@ export default { downloadChangedCSV() { cy.do(downloadChnagedRecordsButton.click()); + cy.wait(5000); BulkEditSearchPane.waitingFileDownload(); },