Skip to content

Commit

Permalink
Change text
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Mar 12, 2024
1 parent 6b93f66 commit 5a89ecc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/Activity/Provider/SignRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function parse($language, IEvent $event, ?IEvent $previousEvent = null):

private function getParsedSubject($l, $subject) {
if ($subject === 'new_sign_request') {
return $l->t('{from} invited you to sign {file}');
return $l->t('{from} requested your signature on {file}');
} elseif ($subject === 'update_sign_request') {
return $l->t('{from} made changes on {file}');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private function parseSignRequest(
$notification
->setIcon($this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg')))
->setLink($parameters['file']['link']);
$subject = $l->t('{from} invited you to sign {file}');
$subject = $l->t('{from} requested your signature on {file}');
$notification->setParsedSubject(
str_replace(
['{from}', '{file}'],
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ public function iFetchTheSignerUuidFromNotification(): void {
$found = array_filter(
$data,
function ($notification) {
return $notification['subject'] === 'admin invited you to sign document';
return $notification['subject'] === 'admin requested your signature on document';
}
);
if (empty($found)) {
throw new Exception('Notification with the subject [admin invited you to sign document] not found');
throw new Exception('Notification with the subject [admin requested your signature on document] not found');
}
$found = current($found);

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/features/page/sign_identify_account.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: page/sign_identify_account
And sending "get" to ocs "/apps/notifications/api/v2/notifications"
Then the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|
When sending "get" to ocs "/apps/libresign/api/v1/file/list"
And the response should have a status code 200
And the file to sign contains
Expand Down Expand Up @@ -71,7 +71,7 @@ Feature: page/sign_identify_account
And sending "get" to ocs "/apps/notifications/api/v2/notifications"
Then the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|
When sending "get" to ocs "/apps/libresign/api/v1/file/list"
And the response should have a status code 200
And the file to sign contains
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/features/sign/request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ Feature: request-signature
Then sending "get" to ocs "/apps/notifications/api/v2/notifications"
And the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|
When sending "get" to ocs "/apps/activity/api/v2/activity/libresign?since=0"
Then the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|

Scenario: Request to sign with error using account as identifier with invalid email
Given as user "admin"
Expand Down Expand Up @@ -257,7 +257,7 @@ Feature: request-signature
And sending "get" to ocs "/apps/notifications/api/v2/notifications"
Then the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|
And there should be 0 emails in my inbox

Scenario: Request to sign with success using email as identifier
Expand Down Expand Up @@ -315,7 +315,7 @@ Feature: request-signature
And sending "get" to ocs "/apps/notifications/api/v2/notifications"
Then the response should be a JSON array with the following mandatory values
| key | value |
| ocs | (jq).data\|.[].subject == "admin invited you to sign document"|
| ocs | (jq).data\|.[].subject == "admin requested your signature on document"|
And there should be 1 emails in my inbox
And I open the latest email to "[email protected]" with subject "LibreSign: There is a file for you to sign"

Expand Down

0 comments on commit 5a89ecc

Please sign in to comment.