Skip to content

Commit e6c66f5

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 e6c66f5

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

tests/acceptance/features/apiOcm/share.feature

+135
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,138 @@ 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 him 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+
"enum": ["personal"]
337+
},
338+
"path": {
339+
"type": "string",
340+
"enum": ["/"]
341+
},
342+
"name": {
343+
"type": "string",
344+
"enum": ["/"]
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+
"enum": [
380+
"Federated"
381+
]
382+
},
383+
"id": {
384+
"type": "string",
385+
"pattern": "^%federated_user_id_pattern%$"
386+
},
387+
"displayName": {
388+
"type": "string",
389+
"enum": [
390+
"Brian Murphy"
391+
]
392+
}
393+
}
394+
}
395+
}
396+
},
397+
"id": {
398+
"type": "string",
399+
"pattern": "^%user_id_pattern%$"
400+
},
401+
"roles": {
402+
"type": "array",
403+
"minItems": 1,
404+
"maxItems": 1,
405+
"items": {
406+
"type": "string",
407+
"pattern": "^%role_id_pattern%$"
408+
}
409+
}
410+
}
411+
}
412+
},
413+
"name": {
414+
"type": "string",
415+
"enum": ["textfile.txt"]
416+
},
417+
"size": {
418+
"type": "number",
419+
"enum": [
420+
8
421+
]
422+
}
423+
}
424+
}
425+
"""

0 commit comments

Comments
 (0)