17266: Avoids reloading the app on cypress tests by using search.
[arvados-workbench2.git] / cypress / integration / search.spec.js
index 06131a2ef09c3966f8e009c661e78aea0fb174f9..8806d12d48fa486fb9ac9107ee956dd50561bb92 100644 (file)
@@ -72,11 +72,11 @@ describe('Search tests', function() {
             cy.loginAs(activeUser);
             const searchQuery = `${colName} type:arvados#collection`;
             // Search for only collection's current version
-            cy.visit(`/search-results?q=${encodeURIComponent(searchQuery)}`);
+            cy.doSearch(`${searchQuery}`);
             cy.get('[data-cy=search-results]').should('contain', 'head version');
             cy.get('[data-cy=search-results]').should('not.contain', 'version 1');
             // ...and then, include old versions.
-            cy.visit(`/search-results?q=${encodeURIComponent(searchQuery + ' is:pastVersion')}`);
+            cy.doSearch(`${searchQuery} is:pastVersion`);
             cy.get('[data-cy=search-results]').should('contain', 'head version');
             cy.get('[data-cy=search-results]').should('contain', 'version 1');
         });