-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vitor Mattos <[email protected]>
- Loading branch information
1 parent
03b683f
commit 9d49cf4
Showing
9 changed files
with
91 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
Feature: page/sign_identify_token | ||
Background: Create users | ||
Given user "signer1" exists | ||
And as user "admin" | ||
And set the email of user "signer1" to "[email protected]" | ||
And my inbox is empty | ||
Given as user "admin" | ||
And the following "libresign" app config is set | ||
| identify_method | email | | ||
And my inbox is empty | ||
And sending "post" to "/apps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DgwOS0wMycwMCcpPj4KZW5kb2JqCgp4cmVmCjAgOQowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAyNzAgMDAwMDAgbiAKMDAwMDAwMDAxOSAwMDAwMCBuIAowMDAwMDAwMTc2IDAwMDAwIG4gCjAwMDAwMDA0MzggMDAwMDAgbiAKMDAwMDAwMDE5NSAwMDAwMCBuIAowMDAwMDAwMjE3IDAwMDAwIG4gCjAwMDAwMDA1MzYgMDAwMDAgbiAKMDAwMDAwMDYxOSAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgOS9Sb290IDcgMCBSCi9JbmZvIDggMCBSCi9JRCBbIDw1RkQ4MDlEMTdFODMwQUU5OTRDODkxNDVBMTMwNUQyQz4KPDVGRDgwOUQxN0U4MzBBRTk5NEM4OTE0NUExMzA1RDJDPiBdCi9Eb2NDaGVja3N1bSAvRDZBQThGQTBBQjMwODg2QkQ5ODU0QzYyMTg5QjI2NDQKPj4Kc3RhcnR4cmVmCjc4NQolJUVPRgo="} | | ||
| users | [{"identifyMethods":{"email":"signer1@domain.test"}}] | | ||
| users | [{"identifyMethods":{"email":"signer2@domain.test"}}] | | ||
| name | document | | ||
And the response should have a status code 200 | ||
And there should be 1 emails in my inbox | ||
|
@@ -18,24 +16,24 @@ Feature: page/sign_identify_token | |
Scenario: Open sign file with invalid data | ||
# With invalid UUID, need to be the signer UUID | ||
When as user "signer1" | ||
And sending "get" to "/apps/libresign/p/sign/<FILE_UUID>" | ||
And sending "get" to "/apps/libresign/p/sign/invalid" | ||
Then the response should contain the initial state "libresign-config" with the following values: | ||
| key | value | | ||
| action | 200 | | ||
| errors | ["Invalid UUID"] | | ||
| settings | {"identificationDocumentsFlow":false,"certificateOk":false,"hasSignatureFile":false,"phoneNumber":"","isApprover":false} | | ||
# With invalid user | ||
When as user "admin" | ||
And sending "get" to "/apps/libresign/p/sign/<SIGN_UUID>" | ||
And follow the link on opened email | ||
Then the response should contain the initial state "libresign-config" with the following values: | ||
| key | value | | ||
| action | 200 | | ||
| errors | ["Invalid user"] | | ||
| errors | ["This is not your file"] | | ||
| settings | {"identificationDocumentsFlow":false,"certificateOk":false,"hasSignatureFile":false,"phoneNumber":"","isApprover":true} | | ||
|
||
Scenario: Open sign file with all data valid | ||
When as user "" | ||
And sending "get" to "/apps/libresign/p/sign/<SIGN_UUID>" | ||
And follow the link on opened email | ||
Then the response should contain the initial state "libresign-config" with the following values: | ||
| key | value | | ||
| action | 250 | | ||
|