@konfuzio/document-validation-ui 0.1.16-dev.4 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,115 +1,107 @@
1
1
  import DocumentAnnotations from "./DocumentAnnotations.vue";
2
2
 
3
3
  describe("Document Annotations", () => {
4
- beforeEach(() => {
5
- cy.fetchDocument();
6
- cy.dispatchAction("document", "setPublicView", false);
7
- });
8
-
9
- it("shows loading when there are no annotation sets loaded yet or when loading the data", () => {
10
- cy.mount(DocumentAnnotations);
11
- cy.dispatchAction("document", "setAnnotationSets", null);
12
- cy.get("#labels-sidebar")
13
- .find(".document-annotations-loading")
14
- .its("length")
15
- .should("equal", 1);
16
-
17
- cy.mount(DocumentAnnotations);
18
- cy.dispatchAction("document", "startLoading");
19
- cy.get("#labels-sidebar")
20
- .find(".document-annotations-loading")
21
- .its("length")
22
- .should("equal", 1);
23
- });
24
-
25
- it("shows 3 rows of loading annotation sets", () => {
26
- cy.mount(DocumentAnnotations);
27
- cy.dispatchAction("document", "startLoading");
28
- cy.get("#labels-sidebar")
29
- .find(".loading-annotation-set")
30
- .its("length")
31
- .should("equal", 3);
32
- });
33
-
34
- it("shows all annotation sets", () => {
35
- cy.mount(DocumentAnnotations);
36
- cy.get("#labels-sidebar")
37
- .find(".annotation-set-group")
38
- .then(($elements) => {
39
- cy.getStore("document")
40
- .then($document => {
41
- expect($document.annotationSets).to.have.lengthOf($elements.length);
42
- })
43
- });
44
- });
45
-
46
- it("shows the empty state if there are no annotation sets", () => {
47
- cy.mount(DocumentAnnotations);
48
- cy.dispatchAction("document", "setAnnotationSets", []);
49
-
50
- cy.get("#labels-sidebar")
51
- .find(".empty-annotation-sets")
52
- .find(".empty-container")
53
- .find(".title")
54
- .should('be.visible')
55
- });
56
-
57
- it("shows no annotation set action buttons if the document is read only", () => {
58
- cy.mount(DocumentAnnotations);
59
- cy.dispatchAction("document", "setPublicView", true);
60
-
61
- cy.get("#labels-sidebar")
62
- .find(".labelset-action-buttons")
63
- .should("not.be.visible");
64
- });
4
+ beforeEach(() => {
5
+ cy.fetchDocument();
6
+ cy.dispatchAction("document", "setPublicView", false);
7
+ cy.dispatchAction("edit", "disableEditMode");
8
+ cy.mount(DocumentAnnotations);
9
+ });
10
+
11
+ it("shows loading when there are no annotation sets loaded yet or when loading the data", () => {
12
+ cy.dispatchAction("document", "setAnnotationSets", null);
13
+ cy.mount(DocumentAnnotations);
14
+ cy.get("#document-annotations")
15
+ .find(".document-annotations-loading")
16
+ .its("length")
17
+ .should("equal", 1);
65
18
 
66
- it("renders action buttons for the annotation sets and annotations", () => {
67
- cy.mount(DocumentAnnotations);
68
19
 
69
- cy.get("#labels-sidebar")
70
- .find(".labelset-action-buttons")
71
- .should("be.visible");
72
-
73
- cy.get("#labels-sidebar")
74
- .find(".label")
75
- .find(".annotation-row")
76
- .find(".buttons-container")
77
- .should("exist");
78
- });
20
+ cy.dispatchAction("document", "startLoading");
21
+ cy.get("#document-annotations")
22
+ .find(".document-annotations-loading")
23
+ .its("length")
24
+ .should("equal", 1);
25
+ });
26
+
27
+ it("shows 3 rows of loading annotation sets", () => {
28
+ cy.dispatchAction("document", "startLoading");
29
+ cy.get("#document-annotations")
30
+ .find(".loading-annotation-set")
31
+ .its("length")
32
+ .should("equal", 3);
33
+ });
34
+
35
+ it("shows all annotation sets", () => {
36
+ cy.get("#document-annotations")
37
+ .find(".annotation-set-group")
38
+ .then(($elements) => {
39
+ cy.getStore("document")
40
+ .then($document => {
41
+ expect($document.annotationSets).to.have.lengthOf($elements.length);
42
+ })
43
+ });
44
+ });
79
45
 
80
- it("does not show annotations action buttons by default", () => {
81
- cy.mount(DocumentAnnotations);
46
+ it("shows the empty state if there are no annotation sets", () => {
47
+ cy.dispatchAction("document", "setAnnotationSets", []);
82
48
 
83
- cy.get("#labels-sidebar")
84
- .find(".label")
85
- .find(".annotation-row")
86
- .find(".buttons-container")
87
- .should("not.be.visible");
88
- });
89
-
90
- it("clicks each annotation and empty annotation and checks that it is in edit mode", () => {
91
- cy.mount(DocumentAnnotations);
92
-
93
- cy.get("#labels-sidebar")
94
- .find(".label")
95
- .find(".annotation-row")
96
- .find(".annotation-value")
97
- .not(".missing-annotation")
98
- .each($annotation => {
99
- cy.wrap($annotation)
100
- .should("not.have.class", "clicked-ann")
101
- cy.wrap($annotation)
102
- .click();
103
- cy.wrap($annotation)
104
- .should("have.class", "clicked-ann")
105
- cy.wait(1000);
106
- })
107
- });
108
-
109
- it("clicks each annotation and shows action buttons", () => {
110
- cy.mount(DocumentAnnotations);
111
-
112
- cy.get("#labels-sidebar")
49
+ cy.get("#document-annotations")
50
+ .find(".empty-annotation-sets")
51
+ .find(".empty-container")
52
+ .find(".title")
53
+ .should('be.visible');
54
+ });
55
+
56
+ it("shows no annotation set action buttons if the document is read only", () => {
57
+ cy.dispatchAction("document", "setPublicView", true);
58
+
59
+ cy.get("#document-annotations")
60
+ .find(".labelset-action-buttons")
61
+ .should("not.be.visible");
62
+ });
63
+
64
+ it("renders action buttons for the annotation sets and annotations", () => {
65
+ cy.get("#document-annotations")
66
+ .find(".labelset-action-buttons")
67
+ .should("be.visible");
68
+
69
+ cy.get("#document-annotations")
70
+ .find(".label")
71
+ .find(".annotation-row")
72
+ .find(".buttons-container")
73
+ .should("exist");
74
+ });
75
+
76
+ it("does not show annotations action buttons by default", () => {
77
+ cy.get("#document-annotations")
78
+ .find(".label")
79
+ .find(".annotation-row")
80
+ .find(".buttons-container")
81
+ .should("not.be.visible");
82
+ });
83
+
84
+ it("clicks each annotation and empty annotation and checks that it is in edit mode", () => {
85
+ cy.get("#document-annotations")
86
+ .find(".label")
87
+ .find(".annotation-row")
88
+ .find(".annotation-value")
89
+ .not(".missing-annotation")
90
+ .each($annotation => {
91
+ cy.wrap($annotation)
92
+ .should("not.have.class", "clicked-ann")
93
+ cy.wrap($annotation)
94
+ .click();
95
+ cy.wrap($annotation)
96
+ .should("have.class", "clicked-ann")
97
+ cy.wait(1000);
98
+ })
99
+ });
100
+
101
+ it("clicks each annotation and shows action buttons", () => {
102
+ cy.getStore("document").then($document => {
103
+ if($document.annotations.length > 0) {
104
+ cy.get("#document-annotations")
113
105
  .find(".label")
114
106
  .find(".annotation-row")
115
107
  .find(".annotation")
@@ -118,7 +110,7 @@ describe("Document Annotations", () => {
118
110
  .find(".annotation-value")
119
111
  .click();
120
112
 
121
- cy.get("#labels-sidebar")
113
+ cy.get("#document-annotations")
122
114
  .find(".label")
123
115
  .find(".annotation-row")
124
116
  .find(".action-buttons")
@@ -126,15 +118,14 @@ describe("Document Annotations", () => {
126
118
  .should("be.visible")
127
119
 
128
120
 
129
- cy.get("#labels-sidebar")
121
+ cy.get("#document-annotations")
130
122
  .find(".label")
131
123
  .find(".annotation-row")
132
124
  .find(".action-buttons")
133
125
  .find(".annotation-cancel-btn")
134
126
  .should("be.visible")
135
-
136
-
137
- cy.get("#labels-sidebar")
127
+
128
+ cy.get("#document-annotations")
138
129
  .find(".label")
139
130
  .find(".annotation-row")
140
131
  .find(".action-buttons")
@@ -142,282 +133,270 @@ describe("Document Annotations", () => {
142
133
  .click();
143
134
 
144
135
  cy.wait(1000);
145
- })
136
+ });
137
+ }
146
138
  });
139
+ });
147
140
 
148
- it("shows accept and decline buttons when hovering annotation", () => {
149
- cy.mount(DocumentAnnotations);
150
-
151
- cy.get("#labels-sidebar")
152
- .find(".label")
153
- .find(".annotation-row")
154
- .find(".not-revised")
155
- .each(($row) => {
156
- cy.wrap($row)
157
- .trigger("mouseover");
158
-
159
- cy.get("#labels-sidebar")
160
- .find(".label")
161
- .find(".annotation-row")
162
- .find(".action-buttons")
163
- .find(".decline-button-container")
164
- .should("be.visible");
165
-
166
- cy.get("#labels-sidebar")
167
- .find(".label")
168
- .find(".annotation-row")
169
- .find(".action-buttons")
170
- .find(".annotation-accept-btn")
171
- .should("be.visible");
172
-
173
- cy.wait(1000);
174
- })
141
+ it("shows accept and decline buttons when hovering annotation", () => {
142
+ cy.getStore("document").then($document => {
143
+ if($document.annotations.length > 0) {
144
+ cy.get("#document-annotations")
145
+ .find(".label")
146
+ .find(".annotation-row")
147
+ .find(".not-revised")
148
+ .each(($row) => {
149
+ cy.wrap($row)
150
+ .trigger("mouseover");
151
+
152
+ cy.get("#document-annotations")
153
+ .find(".label")
154
+ .find(".annotation-row")
155
+ .find(".action-buttons")
156
+ .find(".decline-button-container")
157
+ .should("be.visible");
158
+
159
+ cy.get("#document-annotations")
160
+ .find(".label")
161
+ .find(".annotation-row")
162
+ .find(".action-buttons")
163
+ .find(".annotation-accept-btn")
164
+ .should("be.visible");
165
+
166
+ cy.wait(1000);
167
+ });
168
+ }
175
169
  });
170
+ });
171
+
172
+ it("clicks each empty annotation and shows action buttons", () => {
173
+ cy.get("#document-annotations")
174
+ .find(".label")
175
+ .find(".annotation-row")
176
+ .find(".empty-annotation")
177
+ .find(".annotation-value")
178
+ .each(($annotation) => {
179
+ if ($annotation.hasClass("missing-annotation")) {
180
+ return;
181
+ } else {
182
+ cy.wrap($annotation)
183
+ .click();
176
184
 
177
- it("clicks each empty annotation and shows action buttons", () => {
178
- cy.mount(DocumentAnnotations);
179
-
180
- cy.get("#labels-sidebar")
181
- .find(".label")
182
- .find(".annotation-row")
183
- .find(".empty-annotation")
184
- .find(".annotation-value")
185
- .each(($annotation) => {
186
- if ($annotation.hasClass("missing-annotation")) {
187
- return;
188
- } else {
189
- cy.wrap($annotation)
190
- .click();
191
-
192
- cy.get("#labels-sidebar")
193
- .find(".label")
194
- .find(".annotation-row")
195
- .find(".action-buttons")
196
- .find(".annotation-cancel-btn")
197
- .should("be.visible")
198
-
199
- cy.get("#labels-sidebar")
200
- .find(".label")
201
- .find(".annotation-row")
202
- .find(".action-buttons")
203
- .find(".annotation-cancel-btn")
204
- .click();
205
-
206
- cy.wait(1000);
207
- }
208
- });
209
- });
185
+ cy.get("#document-annotations")
186
+ .find(".label")
187
+ .find(".annotation-row")
188
+ .find(".action-buttons")
189
+ .find(".annotation-cancel-btn")
190
+ .should("be.visible");
191
+
192
+ cy.get("#document-annotations")
193
+ .find(".label")
194
+ .find(".annotation-row")
195
+ .find(".action-buttons")
196
+ .find(".annotation-cancel-btn")
197
+ .click();
198
+
199
+ cy.wait(1000);
200
+ }
201
+ });
202
+ });
203
+
204
+ it("shows mark as missing button when hovering empty annotation", () => {
205
+ cy.get("#document-annotations")
206
+ .find(".label")
207
+ .find(".annotation-row")
208
+ .find(".empty-annotation")
209
+ .find(".annotation-value")
210
+ .not(".missing-annotation")
211
+ .each(($annotation) => {
212
+ cy.wrap($annotation)
213
+ .trigger("mouseover");
214
+
215
+ cy.get("#document-annotations")
216
+ .find(".label")
217
+ .find(".annotation-row")
218
+ .find(".action-buttons")
219
+ .find(".missing-button-container")
220
+ .should("be.visible");
221
+
222
+ cy.wait(1000);
223
+ })
224
+ });
225
+
226
+ it("marks empty annotation as missing", () => {
227
+ cy.get("#document-annotations")
228
+ .find(".label")
229
+ .find(".annotation-row")
230
+ .find(".empty-annotation")
231
+ .find(".annotation-value")
232
+ .not(".missing-annotation")
233
+ .each(($annotation) => {
234
+ cy.wrap($annotation)
235
+ .trigger("mouseover");
236
+
237
+ cy.get("#document-annotations")
238
+ .find(".label")
239
+ .find(".annotation-row")
240
+ .find(".action-buttons")
241
+ .find(".missing-button-container")
242
+ .find(".missing-btn")
243
+ .click();
210
244
 
211
- it("shows mark as missing button when hovering empty annotation", () => {
212
- cy.mount(DocumentAnnotations);
213
-
214
- cy.get("#labels-sidebar")
215
- .find(".label")
216
- .find(".annotation-row")
217
- .find(".empty-annotation")
218
- .find(".annotation-value")
219
- .not(".missing-annotation")
220
- .each(($annotation) => {
221
- cy.wrap($annotation)
222
- .trigger("mouseover");
245
+ cy.wrap($annotation)
246
+ .trigger("mouseleave");
223
247
 
224
- cy.get("#labels-sidebar")
225
- .find(".label")
226
- .find(".annotation-row")
227
- .find(".action-buttons")
228
- .find(".missing-button-container")
229
- .should("be.visible");
230
-
231
- cy.wait(1000);
232
- })
233
- });
248
+ cy.wait(1000);
249
+ });
234
250
 
235
- it("marks empty annotation as missing", () => {
236
- cy.mount(DocumentAnnotations);
237
-
238
- cy.get("#labels-sidebar")
251
+ cy.get("#document-annotations")
239
252
  .find(".label")
240
253
  .find(".annotation-row")
241
254
  .find(".empty-annotation")
242
- .find(".annotation-value")
243
- .not(".missing-annotation")
244
- .each(($annotation) => {
245
- cy.wrap($annotation)
246
- .trigger("mouseover");
255
+ .then($elements => {
247
256
 
248
- cy.get("#labels-sidebar")
249
- .find(".label")
250
- .find(".annotation-row")
251
- .find(".action-buttons")
252
- .find(".missing-button-container")
253
- .find(".missing-btn")
254
- .click();
255
-
256
- cy.wrap($annotation)
257
- .trigger("mouseleave");
258
-
259
- cy.wait(1000);
257
+ cy.getStore("document")
258
+ .then($document => {
259
+ expect($document.missingAnnotations)
260
+ .to.have.lengthOf($elements.length);
261
+ });
260
262
  });
261
-
262
- cy.get("#labels-sidebar")
263
+ });
264
+
265
+ it("restores empty annotation", () => {
266
+ cy.get("#document-annotations")
267
+ .find(".label")
268
+ .find(".annotation-row")
269
+ .find(".empty-annotation")
270
+ .find(".missing-annotation")
271
+ .each(($annotation) => {
272
+ cy.wrap($annotation)
273
+ .trigger("mouseover");
274
+
275
+ cy.get("#document-annotations")
263
276
  .find(".label")
264
277
  .find(".annotation-row")
265
- .find(".empty-annotation")
266
- .then($elements => {
267
-
268
- cy.getStore("document")
269
- .then($document => {
270
- expect($document.missingAnnotations)
271
- .to.have.lengthOf($elements.length);
272
- });
273
- })
274
- });
275
-
276
- it("restores empty annotation", () => {
277
- cy.mount(DocumentAnnotations);
278
+ .find(".action-buttons")
279
+ .find(".restore-btn")
280
+ .click();
281
+
282
+ cy.wrap($annotation)
283
+ .trigger("mouseleave");
284
+
285
+ cy.wait(1000);
286
+ });
287
+
288
+ cy.get("#document-annotations")
289
+ .find(".label")
290
+ .find(".annotation-row")
291
+ .find(".empty-annotation")
292
+ .should("not.have.class", "missing-annotation");
293
+ });
294
+
295
+ it("gets successfull response from the API when accepting annotation", () => {
296
+ cy.get("#document-annotations")
297
+ .find(".label")
298
+ .find(".annotation-row")
299
+ .find(".not-revised")
300
+ .first()
301
+ .then(($element) => {
302
+ const annotationId = $element[0].id;
278
303
 
279
- cy.get("#labels-sidebar")
280
- .find(".label")
281
- .find(".annotation-row")
282
- .find(".empty-annotation")
283
- .find(".missing-annotation")
284
- .each(($annotation) => {
285
- cy.wrap($annotation)
286
- .trigger("mouseover");
287
-
288
- cy.get("#labels-sidebar")
289
- .find(".label")
290
- .find(".annotation-row")
291
- .find(".action-buttons")
292
- .find(".restore-btn")
293
- .click();
294
-
295
- cy.wrap($annotation)
296
- .trigger("mouseleave");
297
-
298
- cy.wait(1000);
299
- });
300
-
301
- cy.get("#labels-sidebar")
302
- .find(".label")
303
- .find(".annotation-row")
304
- .find(".empty-annotation")
305
- .should("not.have.class", "missing-annotation");
306
- });
307
-
308
- it("gets successfull response from the API when accepting annotation", () => {
309
- cy.mount(DocumentAnnotations);
310
-
311
- cy.get("#labels-sidebar")
312
- .find(".label")
313
- .find(".annotation-row")
314
- .find(".not-revised")
315
- .first()
316
- .then(($element) => {
317
- const annotationId = $element[0].id;
318
-
319
- cy.intercept('PATCH', `**/annotations/${annotationId}/`).as('updateAnnotation');
320
-
321
- cy.wrap($element)
322
- .trigger("mouseover");
323
-
324
- cy.wait(1000);
325
-
326
- cy.get("#labels-sidebar")
327
- .find(".label")
328
- .find(".annotation-row")
329
- .find(".action-buttons")
330
- .find(".annotation-accept-btn")
331
- .click();
332
-
333
- cy.wait("@updateAnnotation").its("response.statusCode").should("eq", 200);
334
- })
335
- });
336
-
337
- it("gets successfull response from the API when declining annotation", () => {
338
- cy.mount(DocumentAnnotations);
304
+ cy.intercept('PATCH', `**/annotations/${annotationId}/`).as('updateAnnotation');
305
+
306
+ cy.wrap($element)
307
+ .trigger("mouseover");
339
308
 
340
- cy.get("#labels-sidebar")
341
- .find(".label")
342
- .find(".annotation-row")
343
- .find(".annotation")
344
- .first()
345
- .then(($element) => {
346
- const annotationId = $element[0].id;
347
-
348
- cy.intercept('DELETE', `**/annotations/${annotationId}/`).as('deleteAnnotation');
349
-
350
- cy.wrap($element)
351
- .trigger("mouseover");
309
+ cy.wait(1000);
352
310
 
353
- cy.wait(1000);
354
-
355
- cy.get("#labels-sidebar")
356
- .find(".label")
357
- .find(".annotation-row")
358
- .find(".action-buttons")
359
- .find(".decline-btn")
360
- .click();
361
-
362
- cy.wait("@deleteAnnotation").its("response.statusCode").should("eq", 204);
363
- })
364
- });
311
+ cy.get("#document-annotations")
312
+ .find(".label")
313
+ .find(".annotation-row")
314
+ .find(".action-buttons")
315
+ .find(".annotation-accept-btn")
316
+ .click();
317
+
318
+ cy.wait("@updateAnnotation").its("response.statusCode").should("eq", 200);
319
+ });
320
+ });
321
+
322
+ it("gets successfull response from the API when declining annotation", () => {
323
+ cy.get("#document-annotations")
324
+ .find(".label")
325
+ .find(".annotation-row")
326
+ .find(".annotation")
327
+ .first()
328
+ .then(($element) => {
329
+ const annotationId = $element[0].id;
330
+
331
+ cy.intercept('DELETE', `**/annotations/${annotationId}/`).as('deleteAnnotation');
332
+
333
+ cy.wrap($element)
334
+ .trigger("mouseover");
365
335
 
366
- it("gets successfull response from the API when marking annotation as missing", () => {
367
- cy.mount(DocumentAnnotations);
336
+ cy.wait(1000);
368
337
 
369
- cy.get("#labels-sidebar")
370
- .find(".label")
371
- .find(".annotation-row")
372
- .find(".empty-annotation")
373
- .first()
374
- .then(($element) => {
375
- cy.intercept('POST', `**/missing-annotations/`).as('addMissingAnnotations');
376
-
377
- cy.wrap($element)
378
- .trigger("mouseover");
338
+ cy.get("#document-annotations")
339
+ .find(".label")
340
+ .find(".annotation-row")
341
+ .find(".action-buttons")
342
+ .find(".decline-btn")
343
+ .click();
344
+
345
+ cy.wait("@deleteAnnotation").its("response.statusCode").should("eq", 204);
346
+ });
347
+ });
348
+
349
+ it("gets successfull response from the API when marking annotation as missing", () => {
350
+ cy.get("#document-annotations")
351
+ .find(".label")
352
+ .find(".annotation-row")
353
+ .find(".empty-annotation")
354
+ .first()
355
+ .then(($element) => {
356
+ cy.intercept('POST', `**/missing-annotations/`).as('addMissingAnnotations');
357
+
358
+ cy.wrap($element)
359
+ .trigger("mouseover");
379
360
 
380
- cy.wait(1000);
361
+ cy.wait(1000);
381
362
 
382
- cy.get("#labels-sidebar")
383
- .find(".label")
384
- .find(".annotation-row")
385
- .find(".action-buttons")
386
- .find(".missing-btn")
387
- .click();
388
-
389
- cy.wait("@addMissingAnnotations").its("response.statusCode").should("eq", 201);
363
+ cy.get("#document-annotations")
364
+ .find(".label")
365
+ .find(".annotation-row")
366
+ .find(".action-buttons")
367
+ .find(".missing-btn")
368
+ .click();
369
+
370
+ cy.wait("@addMissingAnnotations").its("response.statusCode").should("eq", 201);
371
+ });
372
+ });
373
+
374
+ it("gets successfull response from the API when restoring missing annotation", () => {
375
+ cy.get("#document-annotations")
376
+ .find(".label")
377
+ .find(".annotation-row")
378
+ .find(".empty-annotation")
379
+ .find(".missing-annotation")
380
+ .first()
381
+ .then(($element) => {
382
+
383
+ cy.getStore("document").then($document => {
384
+ cy.intercept('DELETE', `**/missing-annotations/${$document.missingAnnotations[0].id}/`).as('deleteMissingAnnotation');
390
385
  })
391
- });
392
-
393
- it("gets successfull response from the API when restoring missing annotation", () => {
394
- cy.mount(DocumentAnnotations);
395
-
396
- cy.get("#labels-sidebar")
397
- .find(".label")
398
- .find(".annotation-row")
399
- .find(".empty-annotation")
400
- .find(".missing-annotation")
401
- .first()
402
- .then(($element) => {
403
-
404
- cy.getStore("document").then($document => {
405
- cy.intercept('DELETE', `**/missing-annotations/${$document.missingAnnotations[0].id}/`).as('deleteMissingAnnotation');
406
- })
407
-
408
- cy.wrap($element)
409
- .trigger("mouseover");
386
+
387
+ cy.wrap($element)
388
+ .trigger("mouseover");
410
389
 
411
- cy.wait(1000);
390
+ cy.wait(1000);
412
391
 
413
- cy.get("#labels-sidebar")
414
- .find(".label")
415
- .find(".annotation-row")
416
- .find(".action-buttons")
417
- .find(".restore-btn")
418
- .click();
419
-
420
- cy.wait("@deleteMissingAnnotation").its("response.statusCode").should("eq", 204);
421
- })
422
- });
392
+ cy.get("#document-annotations")
393
+ .find(".label")
394
+ .find(".annotation-row")
395
+ .find(".action-buttons")
396
+ .find(".restore-btn")
397
+ .click();
398
+
399
+ cy.wait("@deleteMissingAnnotation").its("response.statusCode").should("eq", 204);
400
+ });
401
+ });
423
402
  });