Skip to content

Commit 16836a7

Browse files
author
Andrea Barbasso
committed
[DSC-2193] fix e2e tests
1 parent 8ef0515 commit 16836a7

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

cypress/e2e/end-user-agreement.cy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ describe('End User Agreement', () => {
88
cy.get('ds-end-user-agreement').should('be.visible');
99

1010
// Analyze <ds-end-user-agreement> for accessibility
11-
testA11y('ds-end-user-agreement');
11+
testA11y({
12+
include: ['ds-end-user-agreement'],
13+
exclude: ['ds-markdown-viewer'],
14+
});
1215
});
1316
});

cypress/e2e/health-page.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ beforeEach(() => {
1010

1111
describe('Health Page > Status Tab', () => {
1212
it('should pass accessibility tests', () => {
13-
cy.intercept('GET', '*/server/actuator/health').as('status');
13+
cy.intercept('GET', '**/server/actuator/health').as('status');
1414
cy.wait('@status');
1515

1616
cy.get('a[data-test="health-page.status-tab"]').click();
@@ -36,7 +36,7 @@ describe('Health Page > Status Tab', () => {
3636

3737
describe('Health Page > Info Tab', () => {
3838
it('should pass accessibility tests', () => {
39-
cy.intercept('GET', '*/server/actuator/info').as('info');
39+
cy.intercept('GET', '**/server/actuator/info').as('info');
4040
cy.wait('@info');
4141

4242
cy.get('a[data-test="health-page.info-tab"]').click();

cypress/e2e/login-modal.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const page = {
2525
},
2626
submitLogoutByPressingButton() {
2727
// This is the POST command that will actually log us out
28-
cy.intercept('POST', '*/server/api/authn/logout').as('logout');
28+
cy.intercept('POST', '**/server/api/authn/logout').as('logout');
2929
// Click logout button
3030
cy.get('[data-test="logout-button"]').click();
3131
// Wait until above POST command responds before continuing

cypress/e2e/my-dspace.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('My DSpace page', () => {
8787
cy.get('[data-dismiss="alert"]').click({ multiple: true });
8888

8989
// This is the GET command that will actually run the search
90-
cy.intercept('GET', '*/server/api/discover/search/objects*').as('search-results');
90+
cy.intercept('GET', '**/server/api/discover/search/objects*').as('search-results');
9191
// On MyDSpace, find the submission we just created via its ID
9292
cy.get('[data-test="search-box"]').type(id);
9393
cy.get('[data-test="search-button"]').click();

cypress/e2e/search-navbar.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('Search from Navigation Bar', () => {
2020
it('should go to search page with correct query if submitted (from home)', () => {
2121
cy.visit('/');
2222
// This is the GET command that will actually run the search
23-
cy.intercept('GET', '*/server/api/discover/search/objects*').as('search-results');
23+
cy.intercept('GET', '**/server/api/discover/search/objects*').as('search-results');
2424
// Run the search
2525
page.fillOutQueryInNavBar(query);
2626
page.submitQueryByPressingEnter();
@@ -35,7 +35,7 @@ describe('Search from Navigation Bar', () => {
3535
it('should go to search page with correct query if submitted (from search)', () => {
3636
cy.visit('/search');
3737
// This is the GET command that will actually run the search
38-
cy.intercept('GET', '*/server/api/discover/search/objects*').as('search-results');
38+
cy.intercept('GET', '**/server/api/discover/search/objects*').as('search-results');
3939
// Run the search
4040
page.fillOutQueryInNavBar(query);
4141
page.submitQueryByPressingEnter();
@@ -50,7 +50,7 @@ describe('Search from Navigation Bar', () => {
5050
it('should allow user to also submit query by clicking icon', () => {
5151
cy.visit('/');
5252
// This is the GET command that will actually run the search
53-
cy.intercept('GET', '*/server/api/discover/search/objects*').as('search-results');
53+
cy.intercept('GET', '**/server/api/discover/search/objects*').as('search-results');
5454
// Run the search
5555
page.fillOutQueryInNavBar(query);
5656
page.submitQueryByPressingIcon();

cypress/e2e/submission.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('New Submission page', () => {
9797
cy.get('[data-dismiss="alert"]').click({ multiple: true });
9898

9999
// This is the GET command that will actually run the search
100-
cy.intercept('GET', '*/server/api/discover/search/objects*').as('search-results');
100+
cy.intercept('GET', '**/server/api/discover/search/objects*').as('search-results');
101101
// On MyDSpace, find the submission we just saved via its ID
102102
cy.get('[data-test="search-box"]').type(id);
103103
cy.get('[data-test="search-button"]').click();
@@ -131,7 +131,7 @@ describe('New Submission page', () => {
131131
cy.get('ds-uploader').trigger('dragover');
132132

133133
// This is the POST command that will upload the file
134-
cy.intercept('POST', '*/server/api/submission/workspaceitems/*').as('upload');
134+
cy.intercept('POST', '**/server/api/submission/workspaceitems/*').as('upload');
135135

136136
// Upload our DSpace logo via drag & drop onto submission form
137137
// cy.get('div#section_upload')

0 commit comments

Comments
 (0)