21461: Makes properties' test behave better on Firefox.
[arvados.git] / services / workbench2 / cypress / e2e / page-not-found.cy.js
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 describe('Page not found tests', function() {
6     let adminUser;
7
8     before(function() {
9         cy.getUser('admin', 'Admin', 'User', true, true)
10             .as('adminUser').then(function() {
11                 adminUser = this.adminUser;
12             }
13         );
14     });
15
16     it('shows not found page', function() {
17         // when
18         cy.loginAs(adminUser);
19         cy.goToPath(`/this/is/an/invalid/route`);
20
21         // then
22         cy.get('[data-cy=not-found-page]').should('exist');
23         cy.get('[data-cy=not-found-content]').should('exist');
24     });
25
26
27     it('shows not found popup', function() {
28         // given
29         [
30             '/projects/zzzzz-j7d0g-nonexistingproj',
31             '/projects/zzzzz-tpzed-nonexistinguser',
32             '/processes/zzzzz-xvhdp-nonexistingproc',
33             '/collections/zzzzz-4zz18-nonexistingcoll'
34         ].forEach(function(path) {
35             // Using de slower loginAs() method to avoid bumping into dialog
36             // dismissal issues that are not related to this test.
37             cy.loginAs(adminUser);
38
39             // when
40             cy.goToPath(path);
41
42             // then
43             cy.get('[data-cy=not-found-view]').should('exist');
44         });
45     });
46 })