From c77d85e1b722e2140736af692235ceed24952563 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kuty=C5=82a?= Date: Wed, 9 Mar 2022 18:08:51 +0100 Subject: [PATCH] 18549: Cypress test added MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- cypress/integration/search.spec.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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 -- 2.30.2