119602: Accept cookies in specs where cookie window covers other elements

This commit is contained in:
Andreas Awouters
2025-02-25 15:51:12 +01:00
parent 958b3b8c05
commit c9b2717344
4 changed files with 15 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
beforeEach(() => {
cy.visit('/collections/create?parent='.concat(Cypress.env('DSPACE_TEST_COMMUNITY')));
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
// Accept all cookies to make sure cookie window does not block other elements
cy.get('.orejime-Button--save').click();
});
it('should show loading component while saving', () => {

View File

@@ -1,6 +1,9 @@
beforeEach(() => {
cy.visit('/communities/create');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
// Accept all cookies to make sure cookie window does not block other elements
cy.get('.orejime-Button--save').click();
});
it('should show loading component while saving', () => {

View File

@@ -44,6 +44,9 @@ describe('My DSpace page', () => {
// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_SUBMIT_USER'), Cypress.env('DSPACE_TEST_SUBMIT_USER_PASSWORD'));
// Accept all cookies to make sure cookie window does not block other elements
cy.get('.orejime-Button--save').click();
// Open the New Submission dropdown
cy.get('button[data-test="submission-dropdown"]').click();
// Click on the "Item" type in that dropdown

View File

@@ -59,6 +59,9 @@ describe('New Submission page', () => {
// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_SUBMIT_USER'), Cypress.env('DSPACE_TEST_SUBMIT_USER_PASSWORD'));
// Accept all cookies to make sure cookie window does not block other elements
cy.get('.orejime-Button--save').click();
// Attempt an immediate deposit without filling out any fields
cy.get('button#deposit').click();
@@ -119,6 +122,9 @@ describe('New Submission page', () => {
// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_SUBMIT_USER'), Cypress.env('DSPACE_TEST_SUBMIT_USER_PASSWORD'));
// Accept all cookies to make sure cookie window does not block other elements
cy.get('.orejime-Button--save').click();
// Fill out all required fields (Title, Date)
cy.get('input#dc_title').type('DSpace logo uploaded via e2e tests');
cy.get('input#dc_date_issued_year').type('2022');