Commits

Tim Donohue authored and GitHub committed 41eccbbfe15 Merge
Merge pull request #2750 from 4Science/DURACOM-191

Migration to standalone components
No tags
gidlmaster

cypress/e2e/admin-sidebar.cy.ts

Modified
1 -import { Options } from 'cypress-axe';
2 1 import { testA11y } from 'cypress/support/utils';
2 +import { Options } from 'cypress-axe';
3 3
4 4 describe('Admin Sidebar', () => {
5 - beforeEach(() => {
6 - // Must login as an Admin for sidebar to appear
7 - cy.visit('/login');
8 - cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9 - });
5 + beforeEach(() => {
6 + // Must login as an Admin for sidebar to appear
7 + cy.visit('/login');
8 + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9 + });
10 10
11 - it('should be pinnable and pass accessibility tests', () => {
12 - // Pin the sidebar open
13 - cy.get('#sidebar-collapse-toggle').click();
11 + it('should be pinnable and pass accessibility tests', () => {
12 + // Pin the sidebar open
13 + cy.get('#sidebar-collapse-toggle').click();
14 14
15 - // Click on every expandable section to open all menus
16 - cy.get('ds-expandable-admin-sidebar-section').click({multiple: true});
15 + // Click on every expandable section to open all menus
16 + cy.get('ds-expandable-admin-sidebar-section').click({ multiple: true });
17 17
18 - // Analyze <ds-admin-sidebar> for accessibility
19 - testA11y('ds-admin-sidebar',
18 + // Analyze <ds-admin-sidebar> for accessibility
19 + testA11y('ds-admin-sidebar',
20 20 {
21 - rules: {
22 - // Currently all expandable sections have nested interactive elements
23 - // See https://github.com/DSpace/dspace-angular/issues/2178
24 - 'nested-interactive': { enabled: false },
25 - }
21 + rules: {
22 + // Currently all expandable sections have nested interactive elements
23 + // See https://github.com/DSpace/dspace-angular/issues/2178
24 + 'nested-interactive': { enabled: false },
25 + },
26 26 } as Options);
27 - });
27 + });
28 28 });

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut