Skip to content

Commit 50eb6d5

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 50eb6d5

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
@@ -288,3 +288,139 @@ 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 "Alice" has created the federation share invitation
296+
And using server "REMOTE"
297+
And "Brian" has accepted invitation
298+
And using server "LOCAL"
299+
And user "Alice" has uploaded file with content "ocm test" to "/textfile.txt"
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 using server "LOCAL"
308+
And user "Alice" lists the shares shared by him using the Graph API
309+
Then the HTTP status code should be "200"
310+
And the JSON data of the response should contain resource "textfile.txt" with the following data:
311+
"""
312+
{
313+
"type": "object",
314+
"required": [
315+
"parentReference",
316+
"permissions",
317+
"name",
318+
"size"
319+
],
320+
"properties": {
321+
"parentReference": {
322+
"type": "object",
323+
"required": [
324+
"driveId",
325+
"driveType",
326+
"path",
327+
"name",
328+
"id"
329+
],
330+
"properties": {
331+
"driveId": {
332+
"type": "string",
333+
"pattern": "^%space_id_pattern%$"
334+
},
335+
"driveType": {
336+
"type": "string",
337+
"enum": ["personal"]
338+
},
339+
"path": {
340+
"type": "string",
341+
"enum": ["/"]
342+
},
343+
"name": {
344+
"type": "string",
345+
"enum": ["/"]
346+
},
347+
"id": {
348+
"type": "string",
349+
"pattern": "^%file_id_pattern%$"
350+
}
351+
}
352+
},
353+
"permissions": {
354+
"type": "array",
355+
"minItems": 1,
356+
"maxItems": 1,
357+
"items": {
358+
"type": "object",
359+
"required": [
360+
"grantedToV2",
361+
"id",
362+
"roles"
363+
],
364+
"properties": {
365+
"grantedToV2": {
366+
"type": "object",
367+
"required": [
368+
"user"
369+
],
370+
"properties": {
371+
"user": {
372+
"type": "object",
373+
"required": [
374+
"displayName",
375+
"id"
376+
],
377+
"properties": {
378+
"@libre.graph.userType": {
379+
"type": "string",
380+
"enum": [
381+
"Federated"
382+
]
383+
},
384+
"id": {
385+
"type": "string",
386+
"pattern": "^%federated_user_id_pattern%$"
387+
},
388+
"displayName": {
389+
"type": "string",
390+
"enum": [
391+
"Brian Murphy"
392+
]
393+
}
394+
}
395+
}
396+
}
397+
},
398+
"id": {
399+
"type": "string",
400+
"pattern": "^%user_id_pattern%$"
401+
},
402+
"roles": {
403+
"type": "array",
404+
"minItems": 1,
405+
"maxItems": 1,
406+
"items": {
407+
"type": "string",
408+
"pattern": "^%role_id_pattern%$"
409+
}
410+
}
411+
}
412+
}
413+
},
414+
"name": {
415+
"type": "string",
416+
"enum": ["textfile.txt"]
417+
},
418+
"size": {
419+
"type": "number",
420+
"enum": [
421+
8
422+
]
423+
}
424+
}
425+
}
426+
"""

0 commit comments

Comments
 (0)