Skip to content

Commit

Permalink
Added scenarios to check activity list after share is expired for fed…
Browse files Browse the repository at this point in the history
…erated share
  • Loading branch information
grgprarup committed Jun 20, 2022
1 parent 0c17242 commit e0b3539
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ default:
- TrashbinContext:
- PublicWebDavContext:
- FeatureContext: *common_feature_context_params
- FederationContext:
49 changes: 49 additions & 0 deletions tests/acceptance/features/apiActivity/list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1197,3 +1197,52 @@ Feature: List activity
# | object_type | /^files$/ |
# | typeicon | /^icon-rename/ |
# | subject_prepared | /^The public renamed <file link=\"%base_url%\/(index\.php\/)?apps\/files\/\?dir=\/parent&scrollto=textfile0\.txt\" id=\"\">textfile0\.txt<\/file> to <file link=\"%base_url%\/(index\.php\/)?apps\/files\/\?dir=\/parent&scrollto=textfile\.txt\" id=\"\d+\">textfile\.txt<\/file>$/ |


Scenario: Check activity list after share is expired for federated share
Given using server "REMOTE"
And user "Brian" has been created with default attributes and without skeleton files
And using server "LOCAL"
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/lorem.txt"
And user "Alice" from server "LOCAL" has shared "/lorem.txt" with user "Brian" from server "REMOTE"
And user "Alice" has updated the last share with
| expireDate | +15 days |
And user "Brian" from server "REMOTE" has accepted the last pending share
When the administrator expires the last created share using the testing API
And user "Alice" gets all shares shared by him using the sharing API
Then the activity number 1 of user "Alice" should match these properties:
| type | /^remote_share/ |
| affecteduser | /^Alice$/ |
| app | /^files_sharing$/ |
| subject | /^remote_share_accepted$/ |
| object_name | /^\/lorem.txt$/ |
| object_type | /^files$/ |
| subject_prepared | /^<federated-cloud-id display-name=\"Brian@\…\" user=\"Brian\" server=\"%remote_server%\">Brian@%remote_server%<\/federated-cloud-id> accepted federated share <file link=\"%base_url%\/(index\.php\/)?apps\/files\/\?dir=\/&scrollto=lorem\.txt\" id=\"\d+\">lorem\.txt<\/file>$/ |
And the activity number 2 of user "Alice" should match these properties:
| type | /^file_created/ |
| user | /^Alice$/ |
| affecteduser | /^Alice$/ |
| app | /^files$/ |
| subject | /^created_self$/ |
| object_name | /^\/lorem.txt$/ |
| object_type | /^files$/ |
| subject_prepared | /^You created <collection><file link=\"%base_url%\/(index\.php\/)?apps\/files\/\?dir=\/&scrollto=lorem\.txt\" id=\"\d+\">lorem\.txt<\/file><file link=\"%base_url%\/(index\.php\/)?apps\/files\/\?dir=\/" id=\"\d+\">\/<\/file><\/collection>$/ |
And using server "REMOTE"
And the activity number 1 of user "Brian" should match these properties:
| type | /^remote_share$/ |
| affecteduser | /^Brian$/ |
| app | /^files_sharing$/ |
| subject | /^remote_share_unshared$/ |
| object_name | /^$/ |
| object_type | /^files$/ |
| subject_prepared | /^<federated-cloud-id display-name=\"Alice@\…\" user=\"Alice\" server=\"%local_server%\">Alice@%local_server%<\/federated-cloud-id> unshared <parameter>lorem\.txt<\/parameter> from you$/ |
And the activity number 2 of user "Brian" should match these properties:
| type | /^remote_share$/ |
| affecteduser | /^Brian$/ |
| app | /^files_sharing$/ |
| subject | /^remote_share_received$/ |
| object_name | /^$/ |
| object_type | /^files$/ |
| subject_prepared | /^You received a new federated share <parameter>lorem\.txt<\/parameter> from <federated-cloud-id display-name=\"Alice@\…\" user=\"Alice\" server=\"%local_server%\">Alice@%local_server%<\/federated-cloud-id>$/ |
And the last share id should not be included in the response

0 comments on commit e0b3539

Please sign in to comment.