Commits

Tim Donohue authored b0924b5d983
Ensure Admin sidebar link is visible before clicking links
No tags

cypress/e2e/admin-add-new-modals.cy.ts

Modified
5 5 // Must login as an Admin for sidebar to appear
6 6 cy.visit('/login');
7 7 cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
8 8 });
9 9
10 10 it('Add new Community modal should pass accessibility tests', () => {
11 11 // Pin the sidebar open
12 12 cy.get('#sidebar-collapse-toggle').click();
13 13
14 14 // Click on entry of menu
15 + cy.get('#admin-menu-section-new-title').should('be.visible');
15 16 cy.get('#admin-menu-section-new-title').click();
16 17
17 18 cy.get('a[data-test="menu.section.new_community"]').click();
18 19
19 20 // Analyze <ds-create-community-parent-selector> for accessibility
20 21 testA11y('ds-create-community-parent-selector');
21 22 });
22 23
23 24 it('Add new Collection modal should pass accessibility tests', () => {
24 25 // Pin the sidebar open
25 26 cy.get('#sidebar-collapse-toggle').click();
26 27
27 28 // Click on entry of menu
29 + cy.get('#admin-menu-section-new-title').should('be.visible');
28 30 cy.get('#admin-menu-section-new-title').click();
29 31
30 32 cy.get('a[data-test="menu.section.new_collection"]').click();
31 33
32 34 // Analyze <ds-create-collection-parent-selector> for accessibility
33 35 testA11y('ds-create-collection-parent-selector');
34 36 });
35 37
36 38 it('Add new Item modal should pass accessibility tests', () => {
37 39 // Pin the sidebar open
38 40 cy.get('#sidebar-collapse-toggle').click();
39 41
40 42 // Click on entry of menu
43 + cy.get('#admin-menu-section-new-title').should('be.visible');
41 44 cy.get('#admin-menu-section-new-title').click();
42 45
43 46 cy.get('a[data-test="menu.section.new_item"]').click();
44 47
45 48 // Analyze <ds-create-item-parent-selector> for accessibility
46 49 testA11y('ds-create-item-parent-selector');
47 50 });
48 51 });

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

Add shortcut