Skip to content

Commit aee6060

Browse files
Revert "[DURACOM-145] Fixed e2e failing tests"
This reverts commit b9c7391b1452e9a79d9c5615595b08cd7ac8b14c.
1 parent 8e25a02 commit aee6060

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

cypress/e2e/my-dspace.cy.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,8 @@ describe('My DSpace page', () => {
8888
// The Submission edit form tag should be visible
8989
cy.get('ds-submission-edit').should('be.visible');
9090

91-
// A Collection menu button should exist(based on collection visibility) & its value should be the selected collection
92-
cy.get('#collectionControlsMenuButton span')
93-
.should(($span) => {
94-
if ($span.length > 0) {
95-
// If the element exists in the DOM (it's visible or read-only)
96-
expect($span).to.have.text(TEST_SUBMIT_COLLECTION_NAME);
97-
} else {
98-
// If the element doesn't exist in the DOM, the length will be 0
99-
expect($span).to.have.length(0);
100-
}
101-
});
91+
// A Collection menu button should exist & its value should be the selected collection
92+
cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME);
10293

10394
// Now that we've created a submission, we'll test that we can go back and Edit it.
10495
// Get our Submission URL, to parse out the ID of this new submission

cypress/e2e/submission.cy.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,8 @@ describe('New Submission page', () => {
1616
// The Submission edit form tag should be visible
1717
cy.get('ds-submission-edit').should('be.visible');
1818

19-
// A Collection menu button should exist(if it's visible or read-only) & it's value should be the selected collection
20-
cy.get('#collectionControlsMenuButton span')
21-
.should(($span) => {
22-
if ($span.length > 0) {
23-
// If the element exists in the DOM (it's visible or read-only)
24-
expect($span).to.have.text(TEST_SUBMIT_COLLECTION_NAME);
25-
} else {
26-
// If the element doesn't exist in the DOM, the length will be 0
27-
expect($span).to.have.length(0);
28-
}
29-
});
19+
// A Collection menu button should exist & it's value should be the selected collection
20+
cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME);
3021

3122
// 4 sections should be visible by default
3223
cy.get('div#section_traditionalpageone').should('be.visible');

0 commit comments

Comments
 (0)