Skip to content

Commit f7233ca

Browse files
add test-sharer lists shares shared by him to federated user
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent 3d45d84 commit f7233ca

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

tests/acceptance/features/apiOcm/share.feature

+136
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,142 @@ Feature: an user shares resources usin ScienceMesh application
190190
| folderToShare |
191191
| textfile.txt |
192192

193+
@issue-9908
194+
Scenario: sharer lists the shares shared by him to a federated user
195+
Given using server "LOCAL"
196+
And "Alice" has created the federation share invitation
197+
And using server "REMOTE"
198+
And "Brian" has accepted invitation
199+
And using server "LOCAL"
200+
And user "Alice" has uploaded file with content "ocm test" to "/textfile.txt"
201+
And user "Alice" has sent the following resource share invitation to federated user:
202+
| resource | textfile.txt |
203+
| space | Personal |
204+
| sharee | Brian |
205+
| shareType | user |
206+
| permissionsRole | Viewer |
207+
| federatedServer | @federation-ocis-server:10200 |
208+
When using server "LOCAL"
209+
And user "Alice" lists the shares shared by him using the Graph API
210+
Then the HTTP status code should be "200"
211+
And the JSON data of the response should contain resource "textfile.txt" with the following data:
212+
"""
213+
{
214+
"type": "object",
215+
"required": [
216+
"parentReference",
217+
"permissions",
218+
"name",
219+
"size"
220+
],
221+
"properties": {
222+
"parentReference": {
223+
"type": "object",
224+
"required": [
225+
"driveId",
226+
"driveType",
227+
"path",
228+
"name",
229+
"id"
230+
],
231+
"properties": {
232+
"driveId": {
233+
"type": "string",
234+
"pattern": "^%space_id_pattern%$"
235+
},
236+
"driveType": {
237+
"type": "string",
238+
"enum": ["personal"]
239+
},
240+
"path": {
241+
"type": "string",
242+
"enum": ["/"]
243+
},
244+
"name": {
245+
"type": "string",
246+
"enum": ["/"]
247+
},
248+
"id": {
249+
"type": "string",
250+
"pattern": "^%file_id_pattern%$"
251+
}
252+
}
253+
},
254+
"permissions": {
255+
"type": "array",
256+
"minItems": 1,
257+
"maxItems": 1,
258+
"items": {
259+
"type": "object",
260+
"required": [
261+
"grantedToV2",
262+
"id",
263+
"roles"
264+
],
265+
"properties": {
266+
"grantedToV2": {
267+
"type": "object",
268+
"required": [
269+
"user"
270+
],
271+
"properties": {
272+
"user": {
273+
"type": "object",
274+
"required": [
275+
"displayName",
276+
"id"
277+
],
278+
"properties": {
279+
"@libre.graph.userType": {
280+
"type": "string",
281+
"enum": [
282+
"Federated"
283+
]
284+
},
285+
"id": {
286+
"type": "string",
287+
"pattern": "^%federated_user_id_pattern%$"
288+
},
289+
"displayName": {
290+
"type": "string",
291+
"enum": [
292+
"Brian Murphy"
293+
]
294+
}
295+
}
296+
}
297+
}
298+
},
299+
"id": {
300+
"type": "string",
301+
"pattern": "^%user_id_pattern%$"
302+
},
303+
"roles": {
304+
"type": "array",
305+
"minItems": 1,
306+
"maxItems": 1,
307+
"items": {
308+
"type": "string",
309+
"pattern": "^%role_id_pattern%$"
310+
}
311+
}
312+
}
313+
}
314+
},
315+
"name": {
316+
"type": "string",
317+
"enum": ["textfile.txt"]
318+
},
319+
"size": {
320+
"type": "number",
321+
"enum": [
322+
8
323+
]
324+
}
325+
}
326+
}
327+
"""
328+
193329
@issue-10051
194330
Scenario Outline: try to add federated user as a member of a project space (permissions endpoint)
195331
Given using server "LOCAL"

0 commit comments

Comments
 (0)