@@ -64,7 +64,7 @@ describe('GP Workflow: View Lloyd George record', () => {
64
64
context (
65
65
`View Lloyd George document for ${ roleName ( role ) } role and download warning is present` ,
66
66
( ) => {
67
- it (
67
+ it . skip (
68
68
roleName ( role ) + ' can view a Lloyd George document of an active patient' ,
69
69
{ tags : 'regression' } ,
70
70
( ) => {
@@ -108,7 +108,7 @@ describe('GP Workflow: View Lloyd George record', () => {
108
108
} ,
109
109
) ;
110
110
111
- it (
111
+ it . skip (
112
112
`It displays an empty Lloyd George card when no Lloyd George record exists for the patient for a ${ roleName (
113
113
role ,
114
114
) } `,
@@ -124,7 +124,7 @@ describe('GP Workflow: View Lloyd George record', () => {
124
124
assertEmptyLloydGeorgeCard ( ) ;
125
125
} ,
126
126
) ;
127
- it (
127
+ it . skip (
128
128
`It displays an waiting message when uploading Lloyd George record is in progress for the patient for a ${ roleName (
129
129
role ,
130
130
) } `,
@@ -144,7 +144,7 @@ describe('GP Workflow: View Lloyd George record', () => {
144
144
) ;
145
145
} ,
146
146
) ;
147
- it (
147
+ it . skip (
148
148
`It displays an error when the Lloyd George Stitch API call fails for a ${ roleName (
149
149
role ,
150
150
) } `,
@@ -162,7 +162,7 @@ describe('GP Workflow: View Lloyd George record', () => {
162
162
} ,
163
163
) ;
164
164
165
- it (
165
+ it . skip (
166
166
'Routes to download page when safety checkbox is checked' ,
167
167
{ tags : 'regression' } ,
168
168
( ) => {
@@ -182,7 +182,7 @@ describe('GP Workflow: View Lloyd George record', () => {
182
182
} ,
183
183
) ;
184
184
185
- it (
185
+ it . skip (
186
186
'It displays warning when safety checkbox is not checked' ,
187
187
{ tags : 'regression' } ,
188
188
( ) => {
@@ -201,7 +201,7 @@ describe('GP Workflow: View Lloyd George record', () => {
201
201
} ,
202
202
) ;
203
203
204
- it (
204
+ it . skip (
205
205
'No download option or menu exists when no Lloyd George record exists for the patient' ,
206
206
{ tags : 'regression' } ,
207
207
( ) => {
@@ -218,84 +218,92 @@ describe('GP Workflow: View Lloyd George record', () => {
218
218
} ,
219
219
) ;
220
220
221
- it ( 'Confirm download and delete of Lloyd George' , { tags : 'regression' } , ( ) => {
222
- const isBSOL = false ;
223
- cy . login ( role , isBSOL ) ;
224
- cy . getByTestId ( 'search-patient-btn' ) . click ( ) ;
225
-
226
- // search patient
227
- cy . intercept ( 'GET' , '/SearchPatient*' , {
228
- statusCode : 200 ,
229
- body : searchPatientPayload ,
230
- } ) . as ( 'search' ) ;
221
+ it . skip (
222
+ 'Confirm download and delete of Lloyd George' ,
223
+ { tags : 'regression' } ,
224
+ ( ) => {
225
+ const isBSOL = false ;
226
+ cy . login ( role , isBSOL ) ;
227
+ cy . getByTestId ( 'search-patient-btn' ) . click ( ) ;
231
228
232
- cy . intercept ( 'GET' , '/LloydGeorgeStitch*' , {
233
- statusCode : 200 ,
234
- body : viewLloydGeorgePayload ,
235
- } ) . as ( 'lloydGeorgeStitch' ) ;
229
+ // search patient
230
+ cy . intercept ( 'GET' , '/SearchPatient*' , {
231
+ statusCode : 200 ,
232
+ body : searchPatientPayload ,
233
+ } ) . as ( 'search' ) ;
236
234
237
- cy . intercept ( 'POST' , '/DocumentManifest*' , ( req ) => {
238
- req . reply ( {
235
+ cy . intercept ( 'GET' , '/LloydGeorgeStitch*' , {
239
236
statusCode : 200 ,
240
- body : { jobId : 'test-jobId' } ,
241
- delay : 500 ,
242
- } ) ;
243
- } ) . as ( 'documentManifestPost' ) ;
237
+ body : viewLloydGeorgePayload ,
238
+ } ) . as ( 'lloydGeorgeStitch' ) ;
244
239
245
- cy . intercept ( 'GET' , '/DocumentManifest*' , ( req ) => {
246
- req . reply ( {
240
+ cy . intercept ( 'POST' , '/DocumentManifest*' , ( req ) => {
241
+ req . reply ( {
242
+ statusCode : 200 ,
243
+ body : { jobId : 'test-jobId' } ,
244
+ delay : 500 ,
245
+ } ) ;
246
+ } ) . as ( 'documentManifestPost' ) ;
247
+
248
+ cy . intercept ( 'GET' , '/DocumentManifest*' , ( req ) => {
249
+ req . reply ( {
250
+ statusCode : 200 ,
251
+ body : {
252
+ jobStatus : 'Completed' ,
253
+ url : baseUrl + '/browserconfig.xml' ,
254
+ } , // uses public served file in place of a ZIP file
255
+ delay : 500 ,
256
+ } ) ;
257
+ } ) . as ( 'documentManifest' ) ;
258
+
259
+ cy . intercept ( 'DELETE' , '/DocumentDelete*' , {
247
260
statusCode : 200 ,
248
- body : { jobStatus : 'Completed' , url : baseUrl + '/browserconfig.xml' } , // uses public served file in place of a ZIP file
249
- delay : 500 ,
250
- } ) ;
251
- } ) . as ( 'documentManifest' ) ;
252
-
253
- cy . intercept ( 'DELETE' , '/DocumentDelete*' , {
254
- statusCode : 200 ,
255
- } ) . as ( 'documentDelete' ) ;
256
-
257
- cy . getByTestId ( 'nhs-number-input' ) . type ( searchPatientPayload . nhsNumber ) ;
258
- cy . getByTestId ( 'search-submit-btn' ) . click ( ) ;
259
- cy . wait ( '@search' ) ;
260
-
261
- cy . get ( '#verify-submit' ) . click ( ) ;
262
- cy . wait ( '@lloydGeorgeStitch' , { timeout : 20000 } ) ;
263
-
264
- cy . getByTestId ( 'download-and-remove-record-btn' ) . click ( ) ;
265
- cy . getByTestId ( 'confirm-download-and-remove-checkbox' ) . should ( 'exist' ) ;
266
- cy . getByTestId ( 'confirm-download-and-remove-checkbox' ) . click ( ) ;
267
- cy . getByTestId ( 'confirm-download-and-remove-btn' ) . click ( ) ;
268
- cy . getByTestId ( 'lloydgeorge_downloadall-stage' ) . should ( 'exist' ) ;
269
-
270
- // Assert contents of page when downloading
271
- cy . contains ( 'Downloading documents' ) . should ( 'be.visible' ) ;
272
- cy . getByTestId (
273
- 'download-file-header-' + viewLloydGeorgePayload . number_of_files + '-files' ,
274
- ) . should ( 'be.visible' ) ;
275
- cy . contains ( 'Compressing record into a zip file' ) . should ( 'be.visible' ) ;
276
- cy . contains ( 'Cancel' ) . should ( 'be.visible' ) ;
277
-
278
- cy . wait ( '@documentManifest' ) ;
279
- // Assert contents of page after download
280
- cy . getByTestId ( 'downloaded-record-card-header' ) . should ( 'be.visible' ) ;
281
- cy . contains (
282
- `${ searchPatientPayload . givenName } ${ searchPatientPayload . familyName } ` ,
283
- ) . should ( 'be.visible' ) ;
284
- cy . contains (
285
- `NHS number: ${ formatNhsNumber ( searchPatientPayload . nhsNumber ) } ` ,
286
- ) . should ( 'be.visible' ) ;
287
-
288
- // Assert file has been downloaded
289
- cy . readFile ( `${ Cypress . config ( 'downloadsFolder' ) } /browserconfig.xml` ) ;
290
- cy . wait ( '@documentDelete' ) ;
291
- cy . getByTestId ( 'return-btn' ) . should ( 'exist' ) ;
292
- cy . contains ( 'This record has been removed from our storage.' ) . should (
293
- 'be.visible' ,
294
- ) ;
295
- cy . contains ( 'Follow the Record Management Code of Practice' ) . should (
296
- 'be.visible' ,
297
- ) ;
298
- } ) ;
261
+ } ) . as ( 'documentDelete' ) ;
262
+
263
+ cy . getByTestId ( 'nhs-number-input' ) . type ( searchPatientPayload . nhsNumber ) ;
264
+ cy . getByTestId ( 'search-submit-btn' ) . click ( ) ;
265
+ cy . wait ( '@search' ) ;
266
+ cy . get ( '#verify-submit' ) . click ( ) ;
267
+ cy . wait ( '@lloydGeorgeStitch' , { timeout : 20000 } ) ;
268
+
269
+ cy . getByTestId ( 'download-and-remove-record-btn' ) . click ( ) ;
270
+ cy . getByTestId ( 'confirm-download-and-remove-checkbox' ) . should ( 'exist' ) ;
271
+ cy . getByTestId ( 'confirm-download-and-remove-checkbox' ) . click ( ) ;
272
+ cy . getByTestId ( 'confirm-download-and-remove-btn' ) . click ( ) ;
273
+ cy . getByTestId ( 'lloydgeorge_downloadall-stage' ) . should ( 'exist' ) ;
274
+
275
+ // Assert contents of page when downloading
276
+ cy . contains ( 'Downloading documents' ) . should ( 'be.visible' ) ;
277
+ cy . getByTestId (
278
+ 'download-file-header-' +
279
+ viewLloydGeorgePayload . number_of_files +
280
+ '-files' ,
281
+ ) . should ( 'be.visible' ) ;
282
+ cy . contains ( 'Compressing record into a zip file' ) . should ( 'be.visible' ) ;
283
+ cy . contains ( 'Cancel' ) . should ( 'be.visible' ) ;
284
+
285
+ cy . wait ( '@documentManifest' ) ;
286
+ // Assert contents of page after download
287
+ cy . getByTestId ( 'downloaded-record-card-header' ) . should ( 'be.visible' ) ;
288
+ cy . contains (
289
+ `${ searchPatientPayload . givenName } ${ searchPatientPayload . familyName } ` ,
290
+ ) . should ( 'be.visible' ) ;
291
+ cy . contains (
292
+ `NHS number: ${ formatNhsNumber ( searchPatientPayload . nhsNumber ) } ` ,
293
+ ) . should ( 'be.visible' ) ;
294
+
295
+ // Assert file has been downloaded
296
+ cy . readFile ( `${ Cypress . config ( 'downloadsFolder' ) } /browserconfig.xml` ) ;
297
+ cy . wait ( '@documentDelete' ) ;
298
+ cy . getByTestId ( 'return-btn' ) . should ( 'exist' ) ;
299
+ cy . contains ( 'This record has been removed from our storage.' ) . should (
300
+ 'be.visible' ,
301
+ ) ;
302
+ cy . contains ( 'Follow the Record Management Code of Practice' ) . should (
303
+ 'be.visible' ,
304
+ ) ;
305
+ } ,
306
+ ) ;
299
307
} ,
300
308
) ;
301
309
} ) ;
0 commit comments