X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/011705a4f293a0f5737c021b1ad2c5c87cd0cb03..9a59fad2b6a97af963728a5111395f9caa71802f:/cypress/integration/page-not-found.spec.js diff --git a/cypress/integration/page-not-found.spec.js b/cypress/integration/page-not-found.spec.js index 3dd15a67..4df4135c 100644 --- a/cypress/integration/page-not-found.spec.js +++ b/cypress/integration/page-not-found.spec.js @@ -19,12 +19,9 @@ describe('Page not found tests', function() { }); it('shows not found page', function() { - // given - const invalidUUID = '1212r12r12r12r12r12r21r' - // when cy.loginAs(adminUser); - cy.visit(`/collections/${invalidUUID}`); + cy.goToPath(`/this/is/an/invalid/route`); // then cy.get('[data-cy=not-found-page]').should('exist'); @@ -34,14 +31,22 @@ describe('Page not found tests', function() { it('shows not found popup', function() { // given - const notExistingUUID = 'zzzzz-tpzed-5o5tg0l9a57gxxx'; - - // when - cy.loginAs(adminUser); - cy.visit(`/projects/${notExistingUUID}`); - - // then - cy.get('[data-cy=not-found-page]').should('not.exist'); - cy.get('[data-cy=not-found-content]').should('exist'); + [ + '/projects/zzzzz-j7d0g-nonexistingproj', + '/projects/zzzzz-tpzed-nonexistinguser', + '/processes/zzzzz-xvhdp-nonexistingproc', + '/collections/zzzzz-4zz18-nonexistingcoll' + ].forEach(function(path) { + // Using de slower loginAs() method to avoid bumping into dialog + // dismissal issues that are not related to this test. + cy.loginAs(adminUser); + + // when + cy.goToPath(path); + + // then + cy.get('[data-cy=not-found-page]').should('not.exist'); + cy.get('[data-cy=not-found-content]').should('exist'); + }); }); }) \ No newline at end of file