From baf32b9616d72db746ac3fe3ff9f24d94e6e6df9 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 22 Mar 2024 14:22:39 -0300 Subject: [PATCH] Recactor integration tests to cover notifications of new and changed file Signed-off-by: Vitor Mattos --- .../integration/features/sign/request.feature | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/integration/features/sign/request.feature b/tests/integration/features/sign/request.feature index 1a5f47a6a3..f12452cef2 100644 --- a/tests/integration/features/sign/request.feature +++ b/tests/integration/features/sign/request.feature @@ -195,12 +195,28 @@ Feature: request-signature When as user "signer1" 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 requested your signature on document"| + | key | value | + | ocs | (jq).data\|.[0].subject == "admin requested your signature on document"| + | ocs | (jq).data\|.[0].message == "" | 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 requested your signature on document"| + | key | value | + | ocs | (jq).data\|.[0].subject == "admin requested your signature on document"| + When as user "admin" + And sending "patch" to ocs "/apps/libresign/api/v1/request-signature" + | uuid | | + | users | [{"identify":{"account":"signer1"}}] | + And the response should have a status code 200 + When as user "signer1" + 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\|.[0].subject == "admin requested your signature on document" | + | ocs | (jq).data\|.[0].message == "Changes have been made in a file that you have to sign."| + 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\|.[0].subject == "admin made changes on document"| Scenario: Request to sign with error using account as identifier with invalid email Given as user "admin"