Commits
Tim Donohue authored and github-actions[bot] committed 13ead8174ab
1 - | import { Options } from 'cypress-axe'; |
2 1 | import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e'; |
3 2 | import { testA11y } from 'cypress/support/utils'; |
4 3 | |
5 4 | describe('Item Page', () => { |
6 5 | const ITEMPAGE = '/items/'.concat(TEST_ENTITY_PUBLICATION); |
7 6 | const ENTITYPAGE = '/entities/publication/'.concat(TEST_ENTITY_PUBLICATION); |
8 7 | |
9 8 | // Test that entities will redirect to /entities/[type]/[uuid] when accessed via /items/[uuid] |
10 9 | it('should redirect to the entity page when navigating to an item page', () => { |
11 10 | cy.visit(ITEMPAGE); |
12 11 | cy.location('pathname').should('eq', ENTITYPAGE); |
13 12 | }); |
14 13 | |
15 14 | it('should pass accessibility tests', () => { |
16 15 | cy.visit(ENTITYPAGE); |
17 16 | |
18 17 | // <ds-item-page> tag must be loaded |
19 18 | cy.get('ds-item-page').should('be.visible'); |
20 19 | |
21 20 | // Analyze <ds-item-page> for accessibility issues |
22 - | // Disable heading-order checks until it is fixed |
23 - | testA11y('ds-item-page', |
24 - | { |
25 - | rules: { |
26 - | 'heading-order': { enabled: false } |
27 - | } |
28 - | } as Options |
29 - | ); |
21 + | testA11y('ds-item-page'); |
22 + | }); |
23 + | |
24 + | it('should pass accessibility tests on full item page', () => { |
25 + | cy.visit(ENTITYPAGE + '/full'); |
26 + | |
27 + | // <ds-full-item-page> tag must be loaded |
28 + | cy.get('ds-full-item-page').should('be.visible'); |
29 + | |
30 + | // Analyze <ds-full-item-page> for accessibility issues |
31 + | testA11y('ds-full-item-page'); |
30 32 | }); |
31 33 | }); |