Skip to content

Commit 9f328cb

Browse files
committed
test: add authenticated signature element scenario
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 1c28331 commit 9f328cb

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/integration/features/account/signature.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,22 @@ Feature: account/signature
238238
When sending "delete" to ocs "/apps/libresign/api/v1/signature/elements/<NODE_ID>"
239239
Then the response should have a status code 200
240240

241+
Scenario: CRUD of signature element authenticated with public sign header
242+
Given user "signer1" exists
243+
And as user "signer1"
244+
And set the custom http header "libresign-sign-request-uuid" with "11111111-1111-1111-1111-111111111111" as value to next request
245+
When sending "post" to ocs "/apps/libresign/api/v1/signature/elements"
246+
| elements | [{"type":"signature","file":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}}] |
247+
Then the response should have a status code 200
248+
When sending "get" to ocs "/apps/libresign/api/v1/signature/elements"
249+
Then the response should be a JSON array with the following mandatory values
250+
| key | value |
251+
| (jq).ocs.data.elements\|length | 1 |
252+
| (jq).ocs.data.elements[0].type | signature |
253+
And fetch field "(NODE_ID)ocs.data.elements.0.file.nodeId" from previous JSON response
254+
When sending "delete" to ocs "/apps/libresign/api/v1/signature/elements/<NODE_ID>"
255+
Then the response should have a status code 200
256+
241257
Scenario: CRUD of signature element to signer by email without account
242258
Given run the command "config:app:set guests whitelist --value=libresign" with result code 0
243259
And run the command "libresign:configure:openssl --cn test" with result code 0

0 commit comments

Comments
 (0)