Skip to content

Commit

Permalink
Add waiters
Browse files Browse the repository at this point in the history
  • Loading branch information
sviatlana-stsiapanava committed Dec 23, 2024
1 parent a88373b commit 1b387a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down
5 changes: 4 additions & 1 deletion cypress/support/fragments/bulk-edit/bulk-edit-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
},

Expand Down Expand Up @@ -1159,6 +1161,7 @@ export default {

downloadChangedCSV() {
cy.do(downloadChnagedRecordsButton.click());
cy.wait(5000);
BulkEditSearchPane.waitingFileDownload();
},

Expand Down

0 comments on commit 1b387a1

Please sign in to comment.