[ARVADOS-WORKBENCH2] created: 2.1.0-186-g8ac173e6

Git user git at public.arvados.org
Tue Feb 2 22:50:26 UTC 2021


        at  8ac173e662fc2f734ff55737bb60b17a88ece91c (commit)


commit 8ac173e662fc2f734ff55737bb60b17a88ece91c
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Tue Feb 2 19:48:49 2021 -0300

    Hopefully fixes flaky test by asserting on different file names when looping.
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/cypress/integration/collection-panel.spec.js b/cypress/integration/collection-panel.spec.js
index 3e241ceb..44e55c34 100644
--- a/cypress/integration/collection-panel.spec.js
+++ b/cypress/integration/collection-panel.spec.js
@@ -64,6 +64,10 @@ describe('Collection panel tests', function() {
     it('shows collection by URL', function() {
         cy.loginAs(activeUser);
         [true, false].map(function(isWritable) {
+            // Using different file names to avoid test flakyness: the second iteration
+            // on this loop may pass an assertion from the first iteration by looking
+            // for the same file name.
+            const fileName = isWritable ? 'bar' : 'foo';
             cy.createGroup(adminUser.token, {
                 name: 'Shared project',
                 group_class: 'project',
@@ -74,7 +78,7 @@ describe('Collection panel tests', function() {
                     name: 'Test collection',
                     owner_uuid: this.sharedGroup.uuid,
                     properties: {someKey: 'someValue'},
-                    manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"})
+                    manifest_text: `. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:${fileName}\n`})
                 .as('testCollection').then(function() {
                     // Share the group with active user.
                     cy.createLink(adminUser.token, {
@@ -125,14 +129,14 @@ describe('Collection panel tests', function() {
                     }
                     // Check that the file listing show both read & write operations
                     cy.get('[data-cy=collection-files-panel]').within(() => {
-                        cy.root().should('contain', 'bar');
+                        cy.root().should('contain', fileName);
                         if (isWritable) {
                             cy.get('[data-cy=upload-button]')
                                 .should(`${isWritable ? '' : 'not.'}contain`, 'Upload data');
                         }
                     });
                     cy.get('[data-cy=collection-files-panel]')
-                        .contains('bar').rightclick();
+                        .contains(fileName).rightclick();
                     cy.get('[data-cy=context-menu]')
                         .should('contain', 'Download')
                         .and('contain', 'Open in new tab')

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list