18549: Cypress test added
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 9 Mar 2022 17:08:51 +0000 (18:08 +0100)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 9 Mar 2022 17:09:48 +0000 (18:09 +0100)
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

cypress/integration/search.spec.js

index 8806d12d48fa486fb9ac9107ee956dd50561bb92..95e0bc95d341226ff5787e6128c0c548b0430e94 100644 (file)
@@ -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