Skip to content

Commit ce979f2

Browse files
committed
adding test coverage for sharing file with ocm
1 parent 1104846 commit ce979f2

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

tests/acceptance/features/apiOcm/share.feature

+87
Original file line numberDiff line numberDiff line change
@@ -611,3 +611,90 @@ Feature: an user shares resources using ScienceMesh application
611611
}
612612
}
613613
"""
614+
615+
@issue-10222
616+
Scenario: user lists permissions of a resource shared to a federated user
617+
Given using server "LOCAL"
618+
And "Alice" has created the federation share invitation
619+
And using server "REMOTE"
620+
And "Brian" has accepted invitation
621+
And user "Brian" has uploaded file with content "ocm test" to "/textfile.txt"
622+
And user "Brian" has created folder "folderToShare"
623+
And user "Brian" has sent the following resource share invitation to federated user:
624+
| resource | folderToShare |
625+
| space | Personal |
626+
| sharee | Alice |
627+
| shareType | user |
628+
| permissionsRole | Viewer |
629+
| federatedServer | @federation-ocis-server:10200 |
630+
And user "Brian" has sent the following resource share invitation to federated user:
631+
| resource | textfile.txt |
632+
| space | Personal |
633+
| sharee | Alice |
634+
| shareType | user |
635+
| permissionsRole | Viewer |
636+
| federatedServer | @federation-ocis-server:10200 |
637+
And using server "LOCAL"
638+
When user "Alice" lists the shares shared with her using the Graph API
639+
Then the HTTP status code should be "200"
640+
And the JSON data of the response should match
641+
"""
642+
{
643+
"type": "object",
644+
"required": [
645+
"value"
646+
],
647+
"properties": {
648+
"value": {
649+
"type": "array",
650+
"minItems": 2,
651+
"maxItems": 2,
652+
"uniqueItems": true,
653+
"items": {
654+
"oneOf":[
655+
{
656+
"type": "object",
657+
"required": [
658+
"@UI.Hidden",
659+
"@client.synchronize",
660+
"createdBy",
661+
"eTag",
662+
"folder",
663+
"id",
664+
"lastModifiedDateTime",
665+
"name",
666+
"parentReference",
667+
"remoteItem"
668+
],
669+
"properties": {
670+
"name": {
671+
"const": "folderToShare"
672+
}
673+
}
674+
},
675+
{
676+
"type": "object",
677+
"required": [
678+
"@UI.Hidden",
679+
"@client.synchronize",
680+
"createdBy",
681+
"eTag",
682+
"file",
683+
"id",
684+
"lastModifiedDateTime",
685+
"name",
686+
"parentReference",
687+
"remoteItem"
688+
],
689+
"properties": {
690+
"name": {
691+
"const": "textfile.txt"
692+
}
693+
}
694+
}
695+
]
696+
}
697+
}
698+
}
699+
}
700+
"""

0 commit comments

Comments
 (0)