From: Daniel Kutyła Date: Wed, 9 Mar 2022 17:08:51 +0000 (+0100) Subject: 18549: Cypress test added X-Git-Tag: 2.4.0~4^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/c77d85e1b722e2140736af692235ceed24952563?hp=7ace628b611d7674e420262d9fc5e757e8c686a6 18549: Cypress test added Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- diff --git a/cypress/integration/search.spec.js b/cypress/integration/search.spec.js index 8806d12d..95e0bc95 100644 --- a/cypress/integration/search.spec.js +++ b/cypress/integration/search.spec.js @@ -81,4 +81,27 @@ describe('Search tests', function() { cy.get('[data-cy=search-results]').should('contain', 'version 1'); }); }); + + it('can search for old collection versions', function() { + const colName = `Collection ${Math.floor(Math.random() * Math.floor(999999))}`; + + // Creates the collection using the admin token so we can set up + // a bogus manifest text without block signatures. + cy.createCollection(adminUser.token, { + name: colName, + owner_uuid: activeUser.user.uuid, + preserve_version: true, + manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n" + }).then(function() { + cy.loginAs(activeUser); + + cy.doSearch(colName); + + cy.get('[data-cy=search-results]').should('contain', colName); + + cy.get('[data-cy=search-results]').contains(colName).closest('tr').click(); + + cy.get('[data-cy=snackbar]').should('contain', `/ Projects / ${colName}`); + }); + }); }); \ No newline at end of file