Skip to content

Commit d216821

Browse files
committed
test: migrate sign request feature to identifyMethods
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> (cherry picked from commit f1d2489)
1 parent d016a7a commit d216821

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

tests/integration/features/sign/request.feature

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: request-signature
77
And as user "signer1"
88
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
99
| file | {"base64":""} |
10-
| signers | [{"identify":{"account":"signer1"}}] |
10+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
1111
| name | document |
1212
Then the response should have a status code 422
1313
And the response should be a JSON array with the following mandatory values
@@ -21,7 +21,7 @@ Feature: request-signature
2121
| rootCert | {"commonName":"test"} |
2222
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
2323
| file | {"invalid":""} |
24-
| signers | [{"identify":{"account":"signer1"}}] |
24+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
2525
| name | |
2626
Then the response should have a status code 422
2727
And the response should be a JSON array with the following mandatory values
@@ -43,7 +43,7 @@ Feature: request-signature
4343
| rootCert | {"commonName":"test"} |
4444
And sending "post" to ocs "/apps/libresign/api/v1/request-signature"
4545
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
46-
| signers | [{"identify":{"account":"signer1"}}] |
46+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
4747
| name | document |
4848
And the response should have a status code 200
4949
And there should be 1 emails in my inbox
@@ -80,7 +80,7 @@ Feature: request-signature
8080
| rootCert | {"commonName":"test"} |
8181
And sending "post" to ocs "/apps/libresign/api/v1/request-signature"
8282
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
83-
| signers | [{"identify":{"account":"signer1"}}] |
83+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
8484
| name | document |
8585
And the response should have a status code 200
8686
And there should be 1 emails in my inbox
@@ -110,7 +110,7 @@ Feature: request-signature
110110
And my inbox is empty
111111
And sending "post" to ocs "/apps/libresign/api/v1/request-signature"
112112
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
113-
| signers | [{"identify":{"account":"signer1"}}] |
113+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
114114
| name | document |
115115
Then the response should have a status code 200
116116
And as user "signer1"
@@ -133,7 +133,7 @@ Feature: request-signature
133133
And my inbox is empty
134134
And sending "post" to ocs "/apps/libresign/api/v1/request-signature"
135135
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
136-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
136+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
137137
| name | document |
138138
Then the response should have a status code 200
139139
And there should be 1 emails in my inbox
@@ -157,7 +157,7 @@ Feature: request-signature
157157
And run the command "config:app:set libresign maximum_validity --value=1 --type=integer" with result code 0
158158
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
159159
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
160-
| signers | [{"identify":{"email":"signer2@domain.test"}}] |
160+
| signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] |
161161
| name | document |
162162
Then the response should have a status code 200
163163
And there should be 1 emails in my inbox
@@ -181,7 +181,7 @@ Feature: request-signature
181181
| value | (string)[{"name":"email","enabled":true,"mandatory":true,"can_create_account":false}] |
182182
And sending "post" to ocs "/apps/libresign/api/v1/request-signature"
183183
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
184-
| signers | [{"identify":{"email":"signer2@domain.test"}}] |
184+
| signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] |
185185
| name | document |
186186
And the response should have a status code 200
187187
And there should be 1 emails in my inbox
@@ -233,7 +233,7 @@ Feature: request-signature
233233
| value | (string)[{"name":"account","enabled":true}] |
234234
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
235235
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
236-
| signers | [{"identify":{"account":"signer2"}}] |
236+
| signers | [{"identifyMethods":[{"method":"account","value":"signer2"}]}] |
237237
| name | document |
238238
Then the response should be a JSON array with the following mandatory values
239239
| key | value |
@@ -249,7 +249,7 @@ Feature: request-signature
249249
And my inbox is empty
250250
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
251251
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
252-
| signers | [{"identify":{"account":"signer1"}}] |
252+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
253253
| name | document |
254254
Then the response should have a status code 200
255255
And fetch field "(FILE_UUID)ocs.data.uuid" from previous JSON response
@@ -266,7 +266,7 @@ Feature: request-signature
266266
When as user "admin"
267267
And sending "patch" to ocs "/apps/libresign/api/v1/request-signature"
268268
| uuid | <FILE_UUID> |
269-
| signers | [{"identify":{"account":"signer1"}}] |
269+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
270270
And the response should have a status code 200
271271
When as user "signer1"
272272
Then sending "get" to ocs "/apps/notifications/api/v2/notifications"
@@ -285,7 +285,7 @@ Feature: request-signature
285285
| rootCert | {"commonName":"test"} |
286286
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
287287
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
288-
| signers | [{"identify":{"account":"invaliddomain.test"}}] |
288+
| signers | [{"identifyMethods":[{"method":"account","value":"invaliddomain.test"}]}] |
289289
| name | document |
290290
Then the response should have a status code 422
291291
Then the response should be a JSON array with the following mandatory values
@@ -298,7 +298,7 @@ Feature: request-signature
298298
| rootCert | {"commonName":"test"} |
299299
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
300300
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
301-
| signers | [{"identify":{"account":"signer3@domain.test"}}] |
301+
| signers | [{"identifyMethods":[{"method":"account","value":"signer3@domain.test"}]}] |
302302
| name | document |
303303
Then the response should have a status code 422
304304
Then the response should be a JSON array with the following mandatory values
@@ -313,7 +313,7 @@ Feature: request-signature
313313
And my inbox is empty
314314
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
315315
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
316-
| signers | [{"identify":{"email":"signer2@domain.test"}}] |
316+
| signers | [{"identifyMethods":[{"method":"email","value":"signer2@domain.test"}]}] |
317317
| name | document |
318318
Then the response should have a status code 200
319319
And there should be 1 emails in my inbox
@@ -329,7 +329,7 @@ Feature: request-signature
329329
And my inbox is empty
330330
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
331331
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
332-
| signers | [{"identify":{"account":"signer1"}}] |
332+
| signers | [{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
333333
| name | document |
334334
Then the response should have a status code 200
335335
When as user "signer1"
@@ -347,7 +347,7 @@ Feature: request-signature
347347
And my inbox is empty
348348
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
349349
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
350-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
350+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
351351
| name | document |
352352
Then the response should have a status code 200
353353
And there should be 1 emails in my inbox
@@ -361,7 +361,7 @@ Feature: request-signature
361361
| value | (string)[{"name":"email","enabled":true,"mandatory":true,"can_create_account":false}] |
362362
And I send a file to be signed
363363
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
364-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
364+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
365365
| status | 0 |
366366
| name | document |
367367
And fetch field "(FILE_UUID)ocs.data.uuid" from previous JSON response
@@ -391,7 +391,7 @@ Feature: request-signature
391391
And my inbox is empty
392392
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
393393
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
394-
| signers | [{"identify":{"email":"signer1@domain.test"}},{"identify":{"account":"signer1"}}] |
394+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]},{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
395395
| name | document |
396396
Then the response should have a status code 200
397397
When as user "signer1"
@@ -410,7 +410,7 @@ Feature: request-signature
410410
And my inbox is empty
411411
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
412412
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
413-
| signers | [{"identify":{"email":"11111@domain.test"}},{"identify":{"email":"22222@domain.test"}}] |
413+
| signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]},{"identifyMethods":[{"method":"email","value":"22222@domain.test"}]}] |
414414
| name | document |
415415
Then the response should have a status code 200
416416
When I open the latest email to "11111@domain.test" with subject "LibreSign: There is a file for you to sign"
@@ -452,7 +452,7 @@ Feature: request-signature
452452
And my inbox is empty
453453
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
454454
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
455-
| signers | [{"identify":{"email":"11111@domain.test"}}] |
455+
| signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]}] |
456456
| name | document |
457457
Then the response should have a status code 200
458458
When I open the latest email to "11111@domain.test" with subject "LibreSign: There is a file for you to sign"
@@ -497,7 +497,7 @@ Feature: request-signature
497497
And my inbox is empty
498498
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
499499
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
500-
| signers | [{"identify":{"email":"11111@domain.test"}}] |
500+
| signers | [{"identifyMethods":[{"method":"email","value":"11111@domain.test"}]}] |
501501
| name | document |
502502
Then the response should have a status code 200
503503
When I open the latest email to "11111@domain.test" with subject "LibreSign: There is a file for you to sign"
@@ -536,7 +536,7 @@ Feature: request-signature
536536
And as user "admin"
537537
When I send a file to be signed
538538
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
539-
| signers | [{"identify":{"email":"signer1@domain.test"}},{"identify":{"account":"signer1"}}] |
539+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]},{"identifyMethods":[{"method":"account","value":"signer1"}]}] |
540540
| name | document |
541541
And fetch field "(FILE_UUID)ocs.data.uuid" from previous JSON response
542542
And the response should have a status code 200
@@ -554,7 +554,7 @@ Feature: request-signature
554554
| (jq).ocs.data.data[0].signers[1].me | false |
555555
And sending "patch" to ocs "/apps/libresign/api/v1/request-signature"
556556
| uuid | <FILE_UUID> |
557-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
557+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
558558
And the response should have a status code 200
559559
When sending "get" to ocs "/apps/libresign/api/v1/file/list?details=1"
560560
And the response should be a JSON array with the following mandatory values
@@ -577,13 +577,13 @@ Feature: request-signature
577577
| value | (string)[{"name":"email","enabled":true,"mandatory":true,"signatureMethods":{"emailToken":{"enabled":true}}}] |
578578
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
579579
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
580-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
580+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
581581
| name | document |
582582
| status | 0 |
583583
And there should be 0 emails in my inbox
584584
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
585585
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
586-
| signers | [{"identify":{"email":"signer1@domain.test"}}] |
586+
| signers | [{"identifyMethods":[{"method":"email","value":"signer1@domain.test"}]}] |
587587
| name | document |
588588
| status | 1 |
589589
And there should be 1 email in my inbox

0 commit comments

Comments
 (0)