Add environment variable for Person collection name. Use it in submission e2e tests.

This commit is contained in:
Tim Donohue
2024-01-17 12:05:00 -06:00
parent 0aaf3131fa
commit a5a89a4b98
2 changed files with 11 additions and 3 deletions

View File

@@ -168,8 +168,11 @@ describe('New Submission page', () => {
// This should display the <ds-create-item-parent-selector> (popup window)
cy.get('ds-create-item-parent-selector').should('be.visible');
// Click on the first Collection button to seelect a collection (actual collection doesn't matter)
cy.get('ds-authorized-collection-selector button:first-child').click();
// Type in a known Collection name in the search box
cy.get('ds-authorized-collection-selector input[type="search"]').type(Cypress.env('DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME'));
// Click on the button matching that known Collection name
cy.get('ds-authorized-collection-selector button[title="'.concat(Cypress.env('DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME')).concat('"]')).click();
// New URL should include /workspaceitems, as we've started a new submission
cy.url().should('include', '/workspaceitems');
@@ -177,6 +180,9 @@ describe('New Submission page', () => {
// The Submission edit form tag should be visible
cy.get('ds-submission-edit').should('be.visible');
// A Collection menu button should exist & its value should be the selected collection
cy.get('#collectionControlsMenuButton span').should('have.text', Cypress.env('DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME'));
// 3 sections should be visible by default
cy.get('div#section_personStep').should('be.visible');
cy.get('div#section_upload').should('be.visible');