|
1 | | -import { REGEX_MATCH_NON_EMPTY_TEXT } from 'cypress/support/e2e'; |
2 | | -import { testA11y } from 'cypress/support/utils'; |
3 | | -import '../support/commands'; |
| 1 | +// Commented out because exposing of the config.json was changed and the `generateViewEvent` cannot be used. |
4 | 2 |
|
5 | | -describe('Site Statistics Page', () => { |
6 | | - // CLARIN |
7 | | - // NOTE: statistics were removed from the navbar |
8 | | - // it('should load if you click on "Statistics" from homepage', () => { |
9 | | - // cy.visit('/'); |
10 | | - // cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click(); |
11 | | - // cy.location('pathname').should('eq', '/statistics'); |
12 | | - // }); |
13 | | - |
14 | | - it('should pass accessibility tests', () => { |
15 | | - // generate 2 view events on an Item's page |
16 | | - cy.generateViewEvent(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'), 'item'); |
17 | | - cy.generateViewEvent(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'), 'item'); |
18 | | - |
19 | | - cy.visit('/statistics'); |
20 | | - |
21 | | - // <ds-site-statistics-page> tag must be visable |
22 | | - cy.get('ds-site-statistics-page').should('be.visible'); |
23 | | - |
24 | | - // Verify / wait until "Total Visits" table's *last* label is non-empty |
25 | | - // (This table loads these labels asynchronously, so we want to wait for them before analyzing page) |
26 | | - cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT); |
27 | | - // Wait an extra 500ms, just so all entries in Total Visits have loaded. |
28 | | - cy.wait(500); |
29 | | - |
30 | | - // Analyze <ds-site-statistics-page> for accessibility issues |
31 | | - // CLARIN |
32 | | - // NOTE: accessibility tests are failing because the UI has been changed |
33 | | - // testA11y('ds-site-statistics-page'); |
34 | | - // CLARIN |
35 | | - }); |
36 | | -}); |
| 3 | +// describe('Site Statistics Page', () => { |
| 4 | +// // CLARIN |
| 5 | +// // NOTE: statistics were removed from the navbar |
| 6 | +// // it('should load if you click on "Statistics" from homepage', () => { |
| 7 | +// // cy.visit('/'); |
| 8 | +// // cy.get('a[data-test="link-menu-item.menu.section.statistics"]').click(); |
| 9 | +// // cy.location('pathname').should('eq', '/statistics'); |
| 10 | +// // }); |
| 11 | +// |
| 12 | +// it('should pass accessibility tests', () => { |
| 13 | +// // generate 2 view events on an Item's page |
| 14 | +// cy.generateViewEvent(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'), 'item'); |
| 15 | +// cy.generateViewEvent(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION'), 'item'); |
| 16 | +// |
| 17 | +// cy.visit('/statistics'); |
| 18 | +// |
| 19 | +// // <ds-site-statistics-page> tag must be visable |
| 20 | +// cy.get('ds-site-statistics-page').should('be.visible'); |
| 21 | +// |
| 22 | +// // Verify / wait until "Total Visits" table's *last* label is non-empty |
| 23 | +// // (This table loads these labels asynchronously, so we want to wait for them before analyzing page) |
| 24 | +// cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT); |
| 25 | +// // Wait an extra 500ms, just so all entries in Total Visits have loaded. |
| 26 | +// cy.wait(500); |
| 27 | +// |
| 28 | +// // Analyze <ds-site-statistics-page> for accessibility issues |
| 29 | +// // CLARIN |
| 30 | +// // NOTE: accessibility tests are failing because the UI has been changed |
| 31 | +// // testA11y('ds-site-statistics-page'); |
| 32 | +// // CLARIN |
| 33 | +// }); |
| 34 | +// }); |
0 commit comments