@@ -4,10 +4,11 @@ import { testA11y } from 'cypress/support/utils';
44
55describe ( 'My DSpace page' , ( ) => {
66 it ( 'should display recent submissions and pass accessibility tests' , ( ) => {
7- cy . login ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
8-
97 cy . visit ( '/mydspace' ) ;
108
9+ // This page is restricted, so we will be shown the login form. Fill it out & submit.
10+ cy . loginViaForm ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
11+
1112 cy . get ( 'ds-my-dspace-page' ) . should ( 'exist' ) ;
1213
1314 // At least one recent submission should be displayed
@@ -36,10 +37,11 @@ describe('My DSpace page', () => {
3637 } ) ;
3738
3839 it ( 'should have a working detailed view that passes accessibility tests' , ( ) => {
39- cy . login ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
40-
4140 cy . visit ( '/mydspace' ) ;
4241
42+ // This page is restricted, so we will be shown the login form. Fill it out & submit.
43+ cy . loginViaForm ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
44+
4345 cy . get ( 'ds-my-dspace-page' ) . should ( 'exist' ) ;
4446
4547 // Click button in sidebar to display detailed view
@@ -61,9 +63,11 @@ describe('My DSpace page', () => {
6163
6264 // NOTE: Deleting existing submissions is exercised by submission.spec.ts
6365 it ( 'should let you start a new submission & edit in-progress submissions' , ( ) => {
64- cy . login ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
6566 cy . visit ( '/mydspace' ) ;
6667
68+ // This page is restricted, so we will be shown the login form. Fill it out & submit.
69+ cy . loginViaForm ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
70+
6771 // Open the New Submission dropdown
6872 cy . get ( 'button[data-test="submission-dropdown"]' ) . click ( ) ;
6973 // Click on the "Item" type in that dropdown
@@ -131,9 +135,11 @@ describe('My DSpace page', () => {
131135 } ) ;
132136
133137 it ( 'should let you import from external sources' , ( ) => {
134- cy . login ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
135138 cy . visit ( '/mydspace' ) ;
136139
140+ // This page is restricted, so we will be shown the login form. Fill it out & submit.
141+ cy . loginViaForm ( TEST_SUBMIT_USER , TEST_SUBMIT_USER_PASSWORD ) ;
142+
137143 // Open the New Import dropdown
138144 cy . get ( 'button[data-test="import-dropdown"]' ) . click ( ) ;
139145 // Click on the "Item" type in that dropdown
0 commit comments