Skip to content

Commit f5b440b

Browse files
add ocm test to activities of resource shared to federated user
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent 9ac104f commit f5b440b

File tree

2 files changed

+82
-3
lines changed

2 files changed

+82
-3
lines changed

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
259259

260260
#### [OCM. Prevent federated users from being added as members of the space](https://github.com/owncloud/ocis/issues/10051)
261261

262-
- [apiOcm/share.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L231)
263-
- [apiOcm/share.feature:232](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L232)
264-
- [apiOcm/share.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L233)
262+
- [apiOcm/share.feature:310](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L310)
263+
- [apiOcm/share.feature:311](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L311)
264+
- [apiOcm/share.feature:312](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L312)
265265

266266
#### [same href in REPORT request for all dav-path-version](https://github.com/owncloud/ocis/issues/7060)
267267

tests/acceptance/features/apiOcm/share.feature

+79
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,85 @@ Feature: an user shares resources usin ScienceMesh application
100100
| folderToShare |
101101
| textfile.txt |
102102

103+
104+
Scenario: local user shares resources from project space to federation user
105+
Given using server "LOCAL"
106+
And "Alice" has created the federation share invitation
107+
And using server "REMOTE"
108+
And "Brian" has accepted invitation
109+
And using server "LOCAL"
110+
And using spaces DAV path
111+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
112+
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
113+
And user "Alice" has created a folder "folderToShare" in space "projectSpace"
114+
When user "Alice" sends the following resource share invitation to federated user using the Graph API:
115+
| resource | folderToShare |
116+
| space | projectSpace |
117+
| sharee | Brian |
118+
| shareType | user |
119+
| permissionsRole | Viewer |
120+
| federatedServer | @federation-ocis-server:10200 |
121+
Then the HTTP status code should be "200"
122+
When using server "REMOTE"
123+
And user "Brian" lists the shares shared with him without retry using the Graph API
124+
Then the HTTP status code should be "200"
125+
And the JSON data of the response should match
126+
"""
127+
{
128+
"type": "object",
129+
"required": [ "value" ],
130+
"properties": {
131+
"value": {
132+
"type": "array",
133+
"minItems": 1,
134+
"maxItems": 1,
135+
"items": {
136+
"type": "object",
137+
"required": [
138+
"@UI.Hidden",
139+
"@client.synchronize",
140+
"createdBy",
141+
"name"
142+
],
143+
"properties": {
144+
"@UI.Hidden": {
145+
"type": "boolean",
146+
"enum": [ false ]
147+
},
148+
"@client.synchronize": {
149+
"type": "boolean",
150+
"enum": [ false ]
151+
},
152+
"createdBy": {
153+
"type": "object",
154+
"required": [ "user" ],
155+
"properties": {
156+
"user": {
157+
"type": "object",
158+
"required": [ "displayName", "id" ],
159+
"properties": {
160+
"displayName": {
161+
"type": "string",
162+
"const": "Alice Hansen"
163+
},
164+
"id": {
165+
"type": "string",
166+
"pattern": "^%federated_user_id_pattern%$"
167+
}
168+
}
169+
}
170+
}
171+
},
172+
"name": {
173+
"const": "folderToShare"
174+
}
175+
}
176+
}
177+
}
178+
}
179+
}
180+
"""
181+
103182
@issue-9534
104183
Scenario Outline: federation user shares resource to local user after accepting invitation
105184
Given using server "LOCAL"

0 commit comments

Comments
 (0)