18881: Adds timeouts to flaky tests to avoid false negatives.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 8 Apr 2022 20:28:52 +0000 (17:28 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 8 Apr 2022 20:28:52 +0000 (17:28 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

cypress/integration/collection.spec.js

index 74acd056ffdd21e45f8f8cafb543e7447542982e..39a2af4209db4d3b4b5b15f5d64630ee88c40334 100644 (file)
@@ -252,8 +252,8 @@ describe('Collection panel tests', function () {
                             .and('not.contain', 'anotherKey: anotherValue');
                         // Check that the file listing show both read & write operations
                         cy.get('[data-cy=collection-files-panel]').within(() => {
                             .and('not.contain', 'anotherKey: anotherValue');
                         // Check that the file listing show both read & write operations
                         cy.get('[data-cy=collection-files-panel]').within(() => {
-                            cy.wait(1000);
-                            cy.root().should('contain', fileName);
+                            cy.get('[data-cy=collection-files-right-panel]', { timeout: 5000 })
+                                .should('contain', fileName);
                             if (isWritable) {
                                 cy.get('[data-cy=upload-button]')
                                     .should(`${isWritable ? '' : 'not.'}contain`, 'Upload data');
                             if (isWritable) {
                                 cy.get('[data-cy=upload-button]')
                                     .should(`${isWritable ? '' : 'not.'}contain`, 'Upload data');
@@ -335,7 +335,7 @@ describe('Collection panel tests', function () {
                 ];
                 eachPair(names, (from, to) => {
                     cy.get('[data-cy=collection-files-panel]')
                 ];
                 eachPair(names, (from, to) => {
                     cy.get('[data-cy=collection-files-panel]')
-                        .contains(`${from}`).rightclick();
+                        .contains(`${from}`).rightclick({force: true});
                     cy.get('[data-cy=context-menu]')
                         .contains('Rename')
                         .click();
                     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('[data-cy=form-submit-btn]').click();
 
-                cy.get('.layout-pane-primary', { wait: 12000 }).contains('Projects').click();
+                cy.get('.layout-pane-primary', { timeout: 12000 }).contains('Projects').click();
 
                 cy.get('main').contains(`Files extracted from: ${this.collection.name}`).should('exist');
             });
 
                 cy.get('main').contains(`Files extracted from: ${this.collection.name}`).should('exist');
             });
@@ -976,7 +976,6 @@ describe('Collection panel tests', function () {
                             cy.get('[data-cy=form-submit-btn]').should('not.exist');
                             cy.get('[data-cy=collection-files-right-panel]')
                                  .contains('5mb_b.bin').should('exist');
                             cy.get('[data-cy=form-submit-btn]').should('not.exist');
                             cy.get('[data-cy=collection-files-right-panel]')
                                  .contains('5mb_b.bin').should('exist');
-                            
                         });
                     });
                 });
                         });
                     });
                 });