Skip to content

Commit 8a0d4ca

Browse files
add test to list copied folder ocm share
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent 82d2193 commit 8a0d4ca

File tree

2 files changed

+92
-2
lines changed

2 files changed

+92
-2
lines changed

tests/acceptance/bootstrap/WebDav.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ public function userCopiesFileUsingTheAPI(
713713
}
714714

715715
/**
716-
* @Given /^user "([^"]*)" has copied file "([^"]*)" to "([^"]*)"$/
716+
* @Given /^user "([^"]*)" has copied (?:file|folder) "([^"]*)" to "([^"]*)"$/
717717
*
718718
* @param string $user
719719
* @param string $fileSource
@@ -729,7 +729,7 @@ public function userHasCopiedFileUsingTheAPI(
729729
$response = $this->copyFile($user, $fileSource, $fileDestination);
730730
$this->theHTTPStatusCodeShouldBe(
731731
["201", "204"],
732-
"HTTP status code was not 201 or 204 while trying to copy file '$fileSource' to '$fileDestination' for user '$user'",
732+
"HTTP status code was not 201 or 204 while trying to copy resource '$fileSource' to '$fileDestination' for user '$user'",
733733
$response
734734
);
735735
}

tests/acceptance/features/apiOcm/share.feature

+90
Original file line numberDiff line numberDiff line change
@@ -814,3 +814,93 @@ Feature: an user shares resources using ScienceMesh application
814814
And for user "Brian" the content of file "textfile.txt" of federated share "textfile.txt" should be "this is a new content"
815815
And using server "LOCAL"
816816
And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "this is a new content"
817+
818+
@issue-10488
819+
Scenario Outline: local user shares copied folder to federation user
820+
Given using server "REMOTE"
821+
And "Brian" has created the federation share invitation
822+
And using server "LOCAL"
823+
And "Alice" has accepted invitation
824+
And user "Alice" has created folder "folderToShare"
825+
And user "Alice" has sent the following resource share invitation to federated user:
826+
| resource | folderToShare |
827+
| space | Personal |
828+
| sharee | Brian |
829+
| shareType | user |
830+
| permissionsRole | <permissions-role> |
831+
And user "Alice" has copied folder "folderToShare" to "folderToShareCopy"
832+
And user "Alice" has sent the following resource share invitation to federated user:
833+
| resource | folderToShareCopy |
834+
| space | Personal |
835+
| sharee | Brian |
836+
| shareType | user |
837+
| permissionsRole | <permissions-role> |
838+
And using server "REMOTE"
839+
When user "Brian" lists the shares shared with him using the Graph API
840+
Then the HTTP status code should be "200"
841+
And the JSON data of the response should match
842+
"""
843+
{
844+
"type": "object",
845+
"required": [
846+
"value"
847+
],
848+
"properties": {
849+
"value": {
850+
"type": "array",
851+
"minItems": 2,
852+
"maxItems": 2,
853+
"uniqueItems": true,
854+
"items": {
855+
"oneOf":[
856+
{
857+
"type": "object",
858+
"required": [
859+
"@UI.Hidden",
860+
"@client.synchronize",
861+
"createdBy",
862+
"eTag",
863+
"folder",
864+
"id",
865+
"lastModifiedDateTime",
866+
"name",
867+
"parentReference",
868+
"remoteItem"
869+
],
870+
"properties": {
871+
"name": {
872+
"const": "folderToShare"
873+
}
874+
}
875+
},
876+
{
877+
"type": "object",
878+
"required": [
879+
"@UI.Hidden",
880+
"@client.synchronize",
881+
"createdBy",
882+
"eTag",
883+
"folder",
884+
"id",
885+
"lastModifiedDateTime",
886+
"name",
887+
"parentReference",
888+
"remoteItem"
889+
],
890+
"properties": {
891+
"name": {
892+
"const": "folderToShareCopy"
893+
}
894+
}
895+
}
896+
]
897+
}
898+
}
899+
}
900+
}
901+
"""
902+
Examples:
903+
| permissions-role |
904+
| Editor |
905+
| Uploader |
906+
| Viewer |

0 commit comments

Comments
 (0)