File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22import { testA11y } from 'cypress/support/utils' ;
33
44describe ( '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
Original file line number Diff line number Diff line change @@ -2,19 +2,18 @@ import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e';
22import { testA11y } from 'cypress/support/utils' ;
33
44describe ( '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' ) ;
You can’t perform that action at this time.
0 commit comments