mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Add environment variable for Person collection name. Use it in submission e2e tests.
This commit is contained in:
@@ -25,9 +25,11 @@ export default defineConfig({
|
|||||||
DSPACE_TEST_ENTITY_PUBLICATION: '6160810f-1e53-40db-81ef-f6621a727398',
|
DSPACE_TEST_ENTITY_PUBLICATION: '6160810f-1e53-40db-81ef-f6621a727398',
|
||||||
// Search term (should return results) used in search tests
|
// Search term (should return results) used in search tests
|
||||||
DSPACE_TEST_SEARCH_TERM: 'test',
|
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_NAME: 'Sample Collection',
|
||||||
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
|
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
|
// Account used to test basic submission process
|
||||||
DSPACE_TEST_SUBMIT_USER: 'dspacedemo+submit@gmail.com',
|
DSPACE_TEST_SUBMIT_USER: 'dspacedemo+submit@gmail.com',
|
||||||
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
|
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)
|
// This should display the <ds-create-item-parent-selector> (popup window)
|
||||||
cy.get('ds-create-item-parent-selector').should('be.visible');
|
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)
|
// Type in a known Collection name in the search box
|
||||||
cy.get('ds-authorized-collection-selector button:first-child').click();
|
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
|
// New URL should include /workspaceitems, as we've started a new submission
|
||||||
cy.url().should('include', '/workspaceitems');
|
cy.url().should('include', '/workspaceitems');
|
||||||
@@ -177,6 +180,9 @@ describe('New Submission page', () => {
|
|||||||
// The Submission edit form tag should be visible
|
// The Submission edit form tag should be visible
|
||||||
cy.get('ds-submission-edit').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
|
// 3 sections should be visible by default
|
||||||
cy.get('div#section_personStep').should('be.visible');
|
cy.get('div#section_personStep').should('be.visible');
|
||||||
cy.get('div#section_upload').should('be.visible');
|
cy.get('div#section_upload').should('be.visible');
|
||||||
|
Reference in New Issue
Block a user