Skip to content

Commit 988a2a4

Browse files
committed
Switch to cy.env in order to hide sensitive data.
1 parent d718295 commit 988a2a4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cypress/e2e/collection-page.cy.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const COLLECTION_PAGE = '/collections/'.concat(Cypress.expose('DSPACE_TEST_COLLE
55
describe('Collection Page', () => {
66

77
it('should pass accessibility tests', () => {
8-
cy.visit('/collections/'.concat(Cypress.expose('DSPACE_TEST_COLLECTION')));
8+
cy.visit(COLLECTION_PAGE);
99

1010
// <ds-collection-page> tag must be loaded
1111
cy.get('ds-collection-page').should('be.visible');
@@ -21,7 +21,9 @@ describe('Collection Page -> Collection-edit menu', () => {
2121
cy.visit(COLLECTION_PAGE);
2222

2323
// These page elements are restricted, so we will be shown the login form. Fill it out & submit.
24-
cy.loginViaForm(Cypress.expose('DSPACE_TEST_ADMIN_USER'), Cypress.expose('DSPACE_TEST_ADMIN_PASSWORD'));
24+
cy.env(['DSPACE_TEST_ADMIN_USER', 'DSPACE_TEST_ADMIN_PASSWORD']).then(({ DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD }) => {
25+
cy.loginViaForm(DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD);
26+
});
2527
});
2628

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

0 commit comments

Comments
 (0)