File tree 4 files changed +33
-27
lines changed
4 files changed +33
-27
lines changed Original file line number Diff line number Diff line change @@ -329,20 +329,18 @@ public function filterResponseAccordingToNotificationSubject(
329
329
?ResponseInterface $ response = null
330
330
): object {
331
331
$ response = $ response ?? $ this ->featureContext ->getResponse ();
332
+
332
333
if (isset ($ this ->featureContext ->getJsonDecodedResponseBodyContent ($ response )->ocs ->data )) {
333
334
$ responseBody = $ this ->featureContext ->getJsonDecodedResponseBodyContent ($ response )->ocs ->data ;
334
335
foreach ($ responseBody as $ value ) {
335
336
if (isset ($ value ->subject ) && $ value ->subject === $ subject ) {
336
- $ responseBody = $ value ;
337
337
// set notificationId
338
338
$ this ->notificationIds [] = $ value ->notification_id ;
339
- break ;
339
+ return $ value ;
340
340
}
341
341
}
342
- } else {
343
- $ responseBody = $ this ->featureContext ->getJsonDecodedResponseBodyContent ($ response );
344
342
}
345
- return $ responseBody ;
343
+ return ( object ) [] ;
346
344
}
347
345
348
346
/**
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ Feature: Notification
8
8
| username |
9
9
| Alice |
10
10
| Brian |
11
- | Carol |
12
11
And user "Alice" has uploaded file with content "other data" to "/textfile1.txt"
13
12
And user "Alice" has created folder "my_data"
14
13
Original file line number Diff line number Diff line change
1
+ @email
2
+ Feature : Share Expiry Notification
3
+ As a user
4
+ I want to be notified when share expires
5
+ So that I can stay updated about the share
6
+
7
+ Background :
8
+ Given these users have been created with default attributes:
9
+ | username |
10
+ | Alice |
11
+ | Brian |
12
+
13
+
14
+ Scenario : check share expired in-app and mail notification for Personal space resource
15
+ Given user "Alice" has uploaded file with content "hello world" to "testfile.txt"
16
+ And user "Alice" has sent the following resource share invitation:
17
+ | resource | testfile .txt |
18
+ | space | Personal |
19
+ | sharee | Brian |
20
+ | shareType | user |
21
+ | permissionsRole | Viewer |
22
+ | expirationDateTime | 2025 -07 -15T14 :00 :00Z |
23
+ When user "Alice" expires the last created share:
24
+ | space | Personal |
25
+ | resource | testfile .txt |
26
+ Then the HTTP status code should be "200"
27
+ And user "Brian" should get a notification with subject "Membership expired" and message:
28
+ | message |
29
+ | Access to Space Alice Hansen lost |
30
+ And user "Brian" should have "2" emails
Original file line number Diff line number Diff line change @@ -758,24 +758,3 @@ Feature: Notification Settings
758
758
Then the HTTP status code should be "200"
759
759
And the notifications should be empty
760
760
And user "Brian" should have "0" emails
761
-
762
-
763
- Scenario : check share expired in-app and mail notification for Personal space resource
764
- Given user "Alice" has uploaded file with content "hello world" to "testfile.txt"
765
- And user "Alice" has sent the following resource share invitation:
766
- | resource | testfile .txt |
767
- | space | Personal |
768
- | sharee | Brian |
769
- | shareType | user |
770
- | permissionsRole | Viewer |
771
- | expirationDateTime | 2025 -07 -15T14 :00 :00Z |
772
- When user "Alice" expires the last created share:
773
- | space | Personal |
774
- | resource | testfile .txt |
775
- Then the HTTP status code should be "200"
776
- And for user "Brian" the space "Shares" should not contain these entries:
777
- | testfile .txt |
778
- And user "Brian" should get a notification with subject "Membership expired" and message:
779
- | message |
780
- | Access to Space Alice Hansen lost |
781
- And user "Brian" should have "2" emails
You can’t perform that action at this time.
0 commit comments