19049: Add waitfordom to flaky collection test
[arvados-workbench2.git] / cypress / integration / collection.spec.js
index 39a2af4209db4d3b4b5b15f5d64630ee88c40334..b62a34414fb58b57c4e6ac0d418f14dbce78553f 100644 (file)
@@ -251,7 +251,7 @@ describe('Collection panel tests', function () {
                             .should('contain', 'someKey: someValue')
                             .and('not.contain', 'anotherKey: anotherValue');
                         // Check that the file listing show both read & write operations
-                        cy.get('[data-cy=collection-files-panel]').within(() => {
+                        cy.waitForDom().get('[data-cy=collection-files-panel]').within(() => {
                             cy.get('[data-cy=collection-files-right-panel]', { timeout: 5000 })
                                 .should('contain', fileName);
                             if (isWritable) {
@@ -334,8 +334,8 @@ describe('Collection panel tests', function () {
                     'bar' // make sure we can go back to the original name as a last step
                 ];
                 eachPair(names, (from, to) => {
-                    cy.get('[data-cy=collection-files-panel]')
-                        .contains(`${from}`).rightclick({force: true});
+                    cy.waitForDom().get('[data-cy=collection-files-panel]')
+                        .contains(`${from}`).rightclick();
                     cy.get('[data-cy=context-menu]')
                         .contains('Rename')
                         .click();
@@ -842,7 +842,7 @@ describe('Collection panel tests', function () {
 
                 cy.get('[data-cy=form-submit-btn]').click();
 
-                cy.get('.layout-pane-primary', { timeout: 12000 }).contains('Projects').click();
+                cy.waitForDom().get('.layout-pane-primary', { timeout: 12000 }).contains('Projects').click();
 
                 cy.get('main').contains(`Files extracted from: ${this.collection.name}`).should('exist');
             });