mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Add environment variable for Person collection name. Use it in submission e2e tests.
(cherry picked from commit a5a89a4b98
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
12a19378f7
commit
2137720602
@@ -25,9 +25,11 @@ export default defineConfig({
|
||||
DSPACE_TEST_ENTITY_PUBLICATION: '6160810f-1e53-40db-81ef-f6621a727398',
|
||||
// Search term (should return results) used in search tests
|
||||
DSPACE_TEST_SEARCH_TERM: 'test',
|
||||
// Collection used for submission tests
|
||||
// Main Collection used for submission tests. Should be able to accept normal Item objects
|
||||
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Sample Collection',
|
||||
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
|
||||
// Collection used for Person entity submission tests. MUST be configured with EntityType=Person.
|
||||
DSPACE_TEST_SUBMIT_PERSON_COLLECTION_NAME: 'People',
|
||||
// Account used to test basic submission process
|
||||
DSPACE_TEST_SUBMIT_USER: 'dspacedemo+submit@gmail.com',
|
||||
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user