@@ -3,126 +3,126 @@ import { testA11y } from 'cypress/support/utils';
33const COLLECTION_EDIT_PAGE = '/collections/' . concat ( Cypress . env ( 'DSPACE_TEST_COLLECTION' ) ) . concat ( '/edit' ) ;
44
55beforeEach ( ( ) => {
6- // All tests start with visiting the Edit Collection Page
7- cy . visit ( COLLECTION_EDIT_PAGE ) ;
6+ // All tests start with visiting the Edit Collection Page
7+ cy . visit ( COLLECTION_EDIT_PAGE ) ;
88
9- // This page is restricted, so we will be shown the login form. Fill it out & submit.
10- cy . loginViaForm ( Cypress . env ( 'DSPACE_TEST_ADMIN_USER' ) , Cypress . env ( 'DSPACE_TEST_ADMIN_PASSWORD' ) ) ;
9+ // This page is restricted, so we will be shown the login form. Fill it out & submit.
10+ cy . loginViaForm ( Cypress . env ( 'DSPACE_TEST_ADMIN_USER' ) , Cypress . env ( 'DSPACE_TEST_ADMIN_PASSWORD' ) ) ;
1111} ) ;
1212
1313describe ( 'Edit Collection > Edit Metadata tab' , ( ) => {
14- it ( 'should pass accessibility tests' , ( ) => {
15- // <ds-edit-collection> tag must be loaded
16- cy . get ( 'ds-edit-collection' ) . should ( 'be.visible' ) ;
14+ it ( 'should pass accessibility tests' , ( ) => {
15+ // <ds-edit-collection> tag must be loaded
16+ cy . get ( 'ds-edit-collection' ) . should ( 'be.visible' ) ;
1717
18- // Analyze <ds-edit-collection> for accessibility issues
19- testA11y ( 'ds-edit-collection' ) ;
20- } ) ;
18+ // Analyze <ds-edit-collection> for accessibility issues
19+ testA11y ( 'ds-edit-collection' ) ;
20+ } ) ;
2121} ) ;
2222
2323describe ( 'Edit Collection > Assign Roles tab' , ( ) => {
2424
25- it ( 'should pass accessibility tests' , ( ) => {
26- cy . get ( 'a[data-test="roles"]' ) . click ( ) ;
25+ it ( 'should pass accessibility tests' , ( ) => {
26+ cy . get ( 'a[data-test="roles"]' ) . click ( ) ;
2727
28- // <ds-collection-roles> tag must be loaded
29- cy . get ( 'ds-collection-roles' ) . should ( 'be.visible' ) ;
28+ // <ds-collection-roles> tag must be loaded
29+ cy . get ( 'ds-collection-roles' ) . should ( 'be.visible' ) ;
3030
31- // Analyze for accessibility issues
32- testA11y ( 'ds-collection-roles' ) ;
33- } ) ;
31+ // Analyze for accessibility issues
32+ testA11y ( 'ds-collection-roles' ) ;
33+ } ) ;
3434} ) ;
3535
3636describe ( 'Edit Collection > Content Source tab' , ( ) => {
3737
38- it ( 'should pass accessibility tests' , ( ) => {
39- cy . get ( 'a[data-test="source"]' ) . click ( ) ;
38+ it ( 'should pass accessibility tests' , ( ) => {
39+ cy . get ( 'a[data-test="source"]' ) . click ( ) ;
4040
41- // <ds-collection-source> tag must be loaded
42- cy . get ( 'ds-collection-source' ) . should ( 'be.visible' ) ;
41+ // <ds-collection-source> tag must be loaded
42+ cy . get ( 'ds-collection-source' ) . should ( 'be.visible' ) ;
4343
44- // Check the external source checkbox (to display all fields on the page)
45- cy . get ( '#externalSourceCheck' ) . check ( ) ;
44+ // Check the external source checkbox (to display all fields on the page)
45+ cy . get ( '#externalSourceCheck' ) . check ( ) ;
4646
47- // Wait for the source controls to appear
48- // cy.get('ds-collection-source-controls').should('be.visible');
47+ // Wait for the source controls to appear
48+ // cy.get('ds-collection-source-controls').should('be.visible');
4949
50- // Analyze entire page for accessibility issues
51- testA11y ( 'ds-collection-source' ) ;
52- } ) ;
50+ // Analyze entire page for accessibility issues
51+ testA11y ( 'ds-collection-source' ) ;
52+ } ) ;
5353} ) ;
5454
5555describe ( 'Edit Collection > Curate tab' , ( ) => {
5656
57- it ( 'should pass accessibility tests' , ( ) => {
58- cy . get ( 'a[data-test="curate"]' ) . click ( ) ;
57+ it ( 'should pass accessibility tests' , ( ) => {
58+ cy . get ( 'a[data-test="curate"]' ) . click ( ) ;
5959
60- // <ds-collection-curate> tag must be loaded
61- cy . get ( 'ds-collection-curate' ) . should ( 'be.visible' ) ;
60+ // <ds-collection-curate> tag must be loaded
61+ cy . get ( 'ds-collection-curate' ) . should ( 'be.visible' ) ;
6262
63- // Analyze for accessibility issues
64- testA11y ( 'ds-collection-curate' ) ;
65- } ) ;
63+ // Analyze for accessibility issues
64+ testA11y ( 'ds-collection-curate' ) ;
65+ } ) ;
6666} ) ;
6767
6868describe ( 'Edit Collection > Access Control tab' , ( ) => {
6969
70- it ( 'should pass accessibility tests' , ( ) => {
71- cy . get ( 'a[data-test="access-control"]' ) . click ( ) ;
70+ it ( 'should pass accessibility tests' , ( ) => {
71+ cy . get ( 'a[data-test="access-control"]' ) . click ( ) ;
7272
73- // <ds-collection-access-control> tag must be loaded
74- cy . get ( 'ds-collection-access-control' ) . should ( 'be.visible' ) ;
73+ // <ds-collection-access-control> tag must be loaded
74+ cy . get ( 'ds-collection-access-control' ) . should ( 'be.visible' ) ;
7575
76- // Analyze for accessibility issues
77- testA11y ( 'ds-collection-access-control' ) ;
78- } ) ;
76+ // Analyze for accessibility issues
77+ testA11y ( 'ds-collection-access-control' ) ;
78+ } ) ;
7979} ) ;
8080
8181describe ( 'Edit Collection > Authorizations tab' , ( ) => {
8282
83- it ( 'should pass accessibility tests' , ( ) => {
84- cy . get ( 'a[data-test="authorizations"]' ) . click ( ) ;
83+ it ( 'should pass accessibility tests' , ( ) => {
84+ cy . get ( 'a[data-test="authorizations"]' ) . click ( ) ;
8585
86- // <ds-collection-authorizations> tag must be loaded
87- cy . get ( 'ds-collection-authorizations' ) . should ( 'be.visible' ) ;
86+ // <ds-collection-authorizations> tag must be loaded
87+ cy . get ( 'ds-collection-authorizations' ) . should ( 'be.visible' ) ;
8888
89- // Analyze for accessibility issues
90- testA11y ( 'ds-collection-authorizations' ) ;
91- } ) ;
89+ // Analyze for accessibility issues
90+ testA11y ( 'ds-collection-authorizations' ) ;
91+ } ) ;
9292} ) ;
9393
9494describe ( 'Edit Collection > Item Mapper tab' , ( ) => {
9595
96- it ( 'should pass accessibility tests' , ( ) => {
97- cy . get ( 'a[data-test="mapper"]' ) . click ( ) ;
96+ it ( 'should pass accessibility tests' , ( ) => {
97+ cy . get ( 'a[data-test="mapper"]' ) . click ( ) ;
9898
99- // <ds-collection-item-mapper> tag must be loaded
100- cy . get ( 'ds-collection-item-mapper' ) . should ( 'be.visible' ) ;
99+ // <ds-collection-item-mapper> tag must be loaded
100+ cy . get ( 'ds-collection-item-mapper' ) . should ( 'be.visible' ) ;
101101
102- // Analyze entire page for accessibility issues
103- testA11y ( 'ds-collection-item-mapper' ) ;
102+ // Analyze entire page for accessibility issues
103+ testA11y ( 'ds-collection-item-mapper' ) ;
104104
105- // Click on the "Map new Items" tab
106- cy . get ( 'li[data-test="mapTab"] a' ) . click ( ) ;
105+ // Click on the "Map new Items" tab
106+ cy . get ( 'li[data-test="mapTab"] a' ) . click ( ) ;
107107
108- // Make sure search form is now visible
109- cy . get ( 'ds-search-form' ) . should ( 'be.visible' ) ;
108+ // Make sure search form is now visible
109+ cy . get ( 'ds-search-form' ) . should ( 'be.visible' ) ;
110110
111- // Analyze entire page (again) for accessibility issues
112- testA11y ( 'ds-collection-item-mapper' ) ;
113- } ) ;
111+ // Analyze entire page (again) for accessibility issues
112+ testA11y ( 'ds-collection-item-mapper' ) ;
113+ } ) ;
114114} ) ;
115115
116116
117117describe ( 'Edit Collection > Delete page' , ( ) => {
118118
119- it ( 'should pass accessibility tests' , ( ) => {
120- cy . get ( 'a[data-test="delete-button"]' ) . click ( ) ;
119+ it ( 'should pass accessibility tests' , ( ) => {
120+ cy . get ( 'a[data-test="delete-button"]' ) . click ( ) ;
121121
122- // <ds-delete-collection> tag must be loaded
123- cy . get ( 'ds-delete-collection' ) . should ( 'be.visible' ) ;
122+ // <ds-delete-collection> tag must be loaded
123+ cy . get ( 'ds-delete-collection' ) . should ( 'be.visible' ) ;
124124
125- // Analyze for accessibility issues
126- testA11y ( 'ds-delete-collection' ) ;
127- } ) ;
125+ // Analyze for accessibility issues
126+ testA11y ( 'ds-delete-collection' ) ;
127+ } ) ;
128128} ) ;
0 commit comments