Skip to content

Commit e315801

Browse files
Fix again de cy files
1 parent 12b1974 commit e315801

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

cypress/e2e/collection-statistics.cy.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

44
describe('Collection Statistics Page', () => {
5-
const id = Cypress.env('DSPACE_TEST_COLLECTION');
6-
const COLLECTIONSTATISTICSPAGE = `/statistics/collections/${id}`;
5+
const COLLECTIONSTATISTICSPAGE = `/statistics/collections/${Cypress.env('DSPACE_TEST_COLLECTION')}`;
76

87
it('should load if you click on "Statistics" from a Collection page', () => {
9-
cy.visit(`/collections/${id}`);
10-
cy.get('ds-link-menu-item[data-test="link-menu-item.menu.section.statistics"]', { timeout: 10000 })
8+
cy.visit(`/collections/${Cypress.env('DSPACE_TEST_COLLECTION')}`);
9+
// Ahora buscamos el enlace dentro de ds-dso-edit-menu, no ds-navbar
10+
cy.get(
11+
'ds-dso-edit-menu ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]',
12+
)
1113
.should('be.visible')
1214
.click();
13-
1415
cy.location('pathname').should('eq', COLLECTIONSTATISTICSPAGE);
1516
});
1617

cypress/e2e/community-statistics.cy.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@ import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

44
describe('Community Statistics Page', () => {
5-
const id = Cypress.env('DSPACE_TEST_COMMUNITY');
6-
const COMMUNITYSTATISTICSPAGE = `/statistics/communities/${id}`;
5+
const COMMUNITYSTATISTICSPAGE = `/statistics/communities/${Cypress.env('DSPACE_TEST_COMMUNITY')}`;
76

87
it('should load if you click on "Statistics" from a Community page', () => {
9-
cy.visit(`/communities/${id}`);
10-
cy.get('ds-link-menu-item[data-test="link-menu-item.menu.section.statistics"]', { timeout: 10000 })
8+
cy.visit(`/communities/${Cypress.env('DSPACE_TEST_COMMUNITY')}`);
9+
cy.get(
10+
'ds-dso-edit-menu ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]',
11+
)
1112
.should('be.visible')
1213
.click();
13-
1414
cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE);
1515
});
1616

17-
1817
it('should contain a "Total visits" section', () => {
1918
cy.visit(COMMUNITYSTATISTICSPAGE);
2019
cy.get('table[data-test="TotalVisits"]').should('be.visible');

0 commit comments

Comments
 (0)