Skip to content

Commit 450971a

Browse files
committed
Fixed cypress e2e test.
1 parent eb93984 commit 450971a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

cypress/e2e/collection-page.cy.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { testA11y } from 'cypress/support/utils';
22

3-
const COLLECTION_PAGE = '/collections/'.concat(Cypress.expose('DSPACE_TEST_COLLECTION'));
3+
const COLLECTION_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION'));
4+
const LOGIN_PAGE = '/login';
45

56
describe('Collection Page', () => {
67

@@ -17,13 +18,16 @@ describe('Collection Page', () => {
1718

1819
describe('Collection Page -> Collection-edit menu', () => {
1920
beforeEach(() => {
20-
// All tests start with visiting the Collection Page
21-
cy.visit(COLLECTION_PAGE);
21+
// All tests start with visiting the Login Page
22+
cy.visit(LOGIN_PAGE);
2223

2324
// These page elements are restricted, so we will be shown the login form. Fill it out & submit.
2425
cy.env(['DSPACE_TEST_ADMIN_USER', 'DSPACE_TEST_ADMIN_PASSWORD']).then(({ DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD }) => {
2526
cy.loginViaForm(DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD);
2627
});
28+
29+
// Now we can visit the collection page:
30+
cy.visit(COLLECTION_PAGE);
2731
});
2832

2933
it('Edit menu should exist for admins.', () => {

0 commit comments

Comments
 (0)