11import { testA11y } from 'cypress/support/utils' ;
2- import { method } from 'node_modules/cypress/types/bluebird' ;
32
43describe ( 'My DSpace page' , ( ) => {
54 it ( 'should display recent submissions and pass accessibility tests' , ( ) => {
@@ -162,11 +161,11 @@ describe('My DSpace page', () => {
162161 //Check that we have at least one item and that they all have the archived badge.
163162 cy . get ( 'ds-item-search-result-list-element-submission' ) . should ( 'exist' ) ;
164163 cy . get ( 'ds-item-search-result-list-element-submission' )
165- . each ( ( $item ) => {
166- cy . wrap ( $item )
167- . find ( '.badge-archived' )
168- . should ( 'exist' ) ;
169- } ) ;
164+ . each ( ( $item ) => {
165+ cy . wrap ( $item )
166+ . find ( '.badge-archived' )
167+ . should ( 'exist' ) ;
168+ } ) ;
170169 } ) ;
171170
172171 it ( 'should upload a file via drag & drop and display it in the UI' , ( ) => {
@@ -181,7 +180,7 @@ describe('My DSpace page', () => {
181180 cy . get ( 'ds-my-dspace-page' ) . should ( 'be.visible' ) ;
182181
183182 //Select the uploader and perform the drag-and-drop action.
184- cy . get ( 'ds-uploader .ds-base-drop-zone ' ) . selectFile ( `cypress/fixtures/${ fileName } ` , { action : 'drag-drop' } ) ;
183+ cy . get ( 'ds-uploader .well ' ) . selectFile ( `cypress/fixtures/${ fileName } ` , { action : 'drag-drop' } ) ;
185184
186185 //Validate that the file appears in the UI
187186 cy . get ( 'ds-uploader .filename' ) . should ( 'exist' ) . and ( 'contain.text' , fileName ) ;
@@ -214,7 +213,7 @@ describe('My DSpace page', () => {
214213 //Intercept to await backend response
215214 cy . intercept ( {
216215 method : 'GET' ,
217- url : '/server/api/discover/search/objects**'
216+ url : '/server/api/discover/search/objects**' ,
218217 } ) . as ( 'workflowSearch' ) ;
219218
220219 //Change view to see workflow tasks
@@ -225,18 +224,18 @@ describe('My DSpace page', () => {
225224
226225 //Check that we have at least one item and that they all have the archived badge.
227226 cy . get ( '[data-test="objects"]' )
228- . find ( '[data-test="list-object"]' )
229- . each ( ( $item ) => {
230- cy . wrap ( $item )
231- . find ( 'ds-claimed-task-actions, ds-pool-task-actions' ) . should ( 'exist' )
232- . within ( ( ) => {
233- cy . get ( 'button, a.btn' ) . each ( ( $btn ) => {
227+ . find ( '[data-test="list-object"]' )
228+ . each ( ( $item ) => {
229+ cy . wrap ( $item )
230+ . find ( 'ds-claimed-task-actions, ds-pool-task-actions' ) . should ( 'exist' )
231+ . within ( ( ) => {
232+ cy . get ( 'button, a.btn' ) . each ( ( $btn ) => {
234233 cy . wrap ( $btn )
235234 . should ( 'exist' )
236235 . and ( 'be.visible' )
237236 . and ( 'not.be.disabled' ) ;
238237 } ) ;
239- } ) ;
240- } ) ;
238+ } ) ;
239+ } ) ;
241240 } ) ;
242241} ) ;
0 commit comments