Skip to content

Commit 27f06f5

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 27f06f5

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

tests/acceptance/features/apiOcm/share.feature

+129
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,132 @@ Feature: an user shares resources usin ScienceMesh application
288288
| Space Viewer |
289289
| Space Editor |
290290
| Manager |
291+
292+
@issue-9908
293+
Scenario: sharer lists the shares shared by him to a federated user
294+
Given using server "LOCAL"
295+
And user "Alice" has uploaded file with content "ocm test" to "/textfile.txt"
296+
And "Alice" has created the federation share invitation
297+
And using server "REMOTE"
298+
And "Brian" has accepted invitation
299+
And using server "LOCAL"
300+
And user "Alice" has sent the following resource share invitation to federated user:
301+
| resource | textfile.txt |
302+
| space | Personal |
303+
| sharee | Brian |
304+
| shareType | user |
305+
| permissionsRole | Viewer |
306+
| federatedServer | @federation-ocis-server:10200 |
307+
When user "Alice" lists the shares shared by her using the Graph API
308+
Then the HTTP status code should be "200"
309+
And the JSON data of the response should contain resource "textfile.txt" with the following data:
310+
"""
311+
{
312+
"type": "object",
313+
"required": [
314+
"parentReference",
315+
"permissions",
316+
"name",
317+
"size"
318+
],
319+
"properties": {
320+
"parentReference": {
321+
"type": "object",
322+
"required": [
323+
"driveId",
324+
"driveType",
325+
"path",
326+
"name",
327+
"id"
328+
],
329+
"properties": {
330+
"driveId": {
331+
"type": "string",
332+
"pattern": "^%space_id_pattern%$"
333+
},
334+
"driveType": {
335+
"type": "string",
336+
"const": "personal"
337+
},
338+
"path": {
339+
"type": "string",
340+
"const": "/"
341+
},
342+
"name": {
343+
"type": "string",
344+
"const": "/"
345+
},
346+
"id": {
347+
"type": "string",
348+
"pattern": "^%file_id_pattern%$"
349+
}
350+
}
351+
},
352+
"permissions": {
353+
"type": "array",
354+
"minItems": 1,
355+
"maxItems": 1,
356+
"items": {
357+
"type": "object",
358+
"required": [
359+
"grantedToV2",
360+
"id",
361+
"roles"
362+
],
363+
"properties": {
364+
"grantedToV2": {
365+
"type": "object",
366+
"required": [
367+
"user"
368+
],
369+
"properties": {
370+
"user": {
371+
"type": "object",
372+
"required": [
373+
"displayName",
374+
"id"
375+
],
376+
"properties": {
377+
"@libre.graph.userType": {
378+
"type": "string",
379+
"const": "Federated"
380+
},
381+
"id": {
382+
"type": "string",
383+
"pattern": "^%federated_user_id_pattern%$"
384+
},
385+
"displayName": {
386+
"type": "string",
387+
"const": "Brian Murphy"
388+
}
389+
}
390+
}
391+
}
392+
},
393+
"id": {
394+
"type": "string",
395+
"pattern": "^%user_id_pattern%$"
396+
},
397+
"roles": {
398+
"type": "array",
399+
"minItems": 1,
400+
"maxItems": 1,
401+
"items": {
402+
"type": "string",
403+
"pattern": "^%role_id_pattern%$"
404+
}
405+
}
406+
}
407+
}
408+
},
409+
"name": {
410+
"type": "string",
411+
"const": "textfile.txt"
412+
},
413+
"size": {
414+
"type": "number",
415+
"const": 8
416+
}
417+
}
418+
}
419+
"""

0 commit comments

Comments
 (0)