Skip to content

Commit bb224fe

Browse files
committed
test: add custom message notification scenarios
Add integration tests for custom signer messages: - Account method with and without custom description - Email method with default and custom description via reminder - Verifies description appears in email body before default message - Uses Activity email notification settings in background setup Tests cover the complete flow from request creation to email delivery. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent fd09811 commit bb224fe

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Feature: Custom message for signers
2+
In order to provide personalized instructions to signers
3+
As a document owner
4+
I want to send custom messages to signers via email
5+
6+
Background:
7+
Given as user "admin"
8+
And user "signer1" exists
9+
And set the email of user "signer1" to "signer1@test.com"
10+
And my inbox is empty
11+
And reset notifications of user "signer1"
12+
And run the command "libresign:configure:openssl --cn test" with result code 0
13+
And run the command "config:app:set activity notify_email_libresign_file_to_sign --value=1" with result code 0
14+
And run the command "user:setting signer1 activity notify_email_libresign_file_to_sign 1" with result code 0
15+
16+
Scenario: Account method - default message without custom description
17+
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
18+
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
19+
| name | Document without custom message |
20+
| users | [{"identify":{"account":"signer1"}}] |
21+
Then the response should have a status code 200
22+
And there should be 1 emails in my inbox
23+
When I open the latest email to "signer1@test.com" with subject "LibreSign: There is a file for you to sign"
24+
Then I should see "There is a document for you to sign" in the opened email
25+
26+
Scenario: Account method - custom description in email
27+
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
28+
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
29+
| name | Document with custom message |
30+
| users | [{"identify":{"account":"signer1"},"description":"Please review section 3 and the appendix before signing."}] |
31+
Then the response should have a status code 200
32+
And there should be 1 emails in my inbox
33+
When I open the latest email to "signer1@test.com" with subject "LibreSign: There is a file for you to sign"
34+
Then I should see "Please review section 3 and the appendix before signing" in the opened email
35+
And I should see "There is a document for you to sign" in the opened email
36+
37+
Scenario: Email method - default notification
38+
When sending "post" to ocs "/apps/libresign/api/v1/request-signature"
39+
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
40+
| name | Document for email method |
41+
| users | [{"identify":{"email":"external@domain.test"},"displayName":"External Signer"}] |
42+
Then the response should have a status code 200
43+
44+
Scenario: Email method - custom description via reminder
45+
Given sending "post" to ocs "/apps/libresign/api/v1/request-signature"
46+
| file | {"url":"<BASE_URL>/apps/libresign/develop/pdf"} |
47+
| name | Document for email with description |
48+
| users | [{"identify":{"email":"external@domain.test"},"displayName":"External Signer","description":"Urgent: Please sign by end of day."}] |
49+
And the response should have a status code 200
50+
And fetch field "(FILE_ID)ocs.data.data.nodeId" from previous JSON response
51+
And fetch field "(SIGN_REQUEST_ID)ocs.data.data.signers.0.signRequestId" from previous JSON response
52+
And my inbox is empty
53+
When sending "post" to ocs "/apps/libresign/api/v1/notify/signer"
54+
| fileId | <FILE_ID> |
55+
| signRequestId | <SIGN_REQUEST_ID> |
56+
Then the response should have a status code 200
57+
And there should be 1 emails in my inbox
58+
When I open the latest email to "external@domain.test"
59+
Then I should see "Urgent: Please sign by end of day" in the opened email

0 commit comments

Comments
 (0)