Skip to content

Commit

Permalink
resolve differences with version 8
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoMolinaro committed Oct 10, 2024
1 parent 5c0c559 commit caed26d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 43 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/admin-export-modals.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ describe('Admin Export Modals', () => {
cy.get('a[data-test="menu.section.export_batch"]').click();

// Analyze <ds-export-batch-selector> for accessibility
testA11y('ds-export-batch-selector');
testA11y('ds-export-metadata-selector');
});
});
17 changes: 0 additions & 17 deletions cypress/e2e/admin-notifications-publication-claim-page.cy.ts

This file was deleted.

2 changes: 2 additions & 0 deletions cypress/e2e/collection-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ beforeEach(() => {

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
cy.intercept('/server/api/core/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION'))).as('collection');
cy.wait('@collection')
});

describe('Edit Collection > Edit Metadata tab', () => {
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/community-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ beforeEach(() => {

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
cy.intercept('/server/api/core/communities/'.concat(Cypress.env('DSPACE_TEST_COMMUNITY'))).as('community');
cy.wait('@community')
});

describe('Edit Community > Edit Metadata tab', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/community-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Community Statistics Page', () => {

it('should load if you click on "Statistics" from a Community page', () => {
cy.visit('/communities/'.concat(Cypress.env('DSPACE_TEST_COMMUNITY')));
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE);
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/homepage-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../support/commands';
describe('Site Statistics Page', () => {
it('should load if you click on "Statistics" from homepage', () => {
cy.visit('/');
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.location('pathname').should('eq', '/statistics');
});

Expand Down
6 changes: 2 additions & 4 deletions cypress/e2e/item-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ beforeEach(() => {
// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));

// We need to wait for the correction types allowed for the item to be loaded to be sure that each tab is fully loaded.
// This because the edit item page causes often tests to fails due to timeout.
cy.intercept('GET', 'server/api/config/correctiontypes/search/findByItem*').as('correctionTypes');
cy.wait('@correctionTypes');
cy.intercept('GET', 'server/api/core/items/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'))).as('item');
cy.wait('@item');
});

describe('Edit Item > Edit Metadata tab', () => {
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/item-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('Item Page', () => {
// Test that entities will redirect to /entities/[type]/[uuid] when accessed via /items/[uuid]
it('should redirect to the entity page when navigating to an item page', () => {
cy.visit(ITEMPAGE);
cy.wait(1000);
cy.location('pathname').should('eq', ENTITYPAGE);
});

Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/item-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Item Statistics Page', () => {

it('should load if you click on "Statistics" from an Item/Entity page', () => {
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click();
cy.location('pathname').should('eq', ITEMSTATISTICSPAGE);
});

Expand All @@ -23,8 +23,7 @@ describe('Item Statistics Page', () => {

it('should contain a "Total visits per month" section', () => {
cy.visit(ITEMSTATISTICSPAGE);
// Check just for existence because this table is empty in CI environment as it's historical data
cy.get('.'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')).concat('_TotalVisitsPerMonth')).should('exist');
cy.get('table[data-test="TotalVisitsPerMonth"]').should('be.visible');
});

it('should pass accessibility tests', () => {
Expand Down
16 changes: 0 additions & 16 deletions cypress/e2e/quality-assurance-source-page.cy.ts

This file was deleted.

0 comments on commit caed26d

Please sign in to comment.