Skip to content

Commit 4134fc4

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

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

tests/acceptance/features/apiOcm/share.feature

+122
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,125 @@ 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 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+
"const": "personal"
336+
},
337+
"path": {
338+
"const": "/"
339+
},
340+
"name": {
341+
"const": "/"
342+
},
343+
"id": {
344+
"type": "string",
345+
"pattern": "^%file_id_pattern%$"
346+
}
347+
}
348+
},
349+
"permissions": {
350+
"type": "array",
351+
"minItems": 1,
352+
"maxItems": 1,
353+
"items": {
354+
"type": "object",
355+
"required": [
356+
"grantedToV2",
357+
"id",
358+
"roles"
359+
],
360+
"properties": {
361+
"grantedToV2": {
362+
"type": "object",
363+
"required": [
364+
"user"
365+
],
366+
"properties": {
367+
"user": {
368+
"type": "object",
369+
"required": [
370+
"displayName",
371+
"id"
372+
],
373+
"properties": {
374+
"@libre.graph.userType": {
375+
"const": "Federated"
376+
},
377+
"id": {
378+
"type": "string",
379+
"pattern": "^%federated_user_id_pattern%$"
380+
},
381+
"displayName": {
382+
"const": "Brian Murphy"
383+
}
384+
}
385+
}
386+
}
387+
},
388+
"id": {
389+
"type": "string",
390+
"pattern": "^%user_id_pattern%$"
391+
},
392+
"roles": {
393+
"type": "array",
394+
"minItems": 1,
395+
"maxItems": 1,
396+
"items": {
397+
"type": "string",
398+
"pattern": "^%role_id_pattern%$"
399+
}
400+
}
401+
}
402+
}
403+
},
404+
"name": {
405+
"const": "textfile.txt"
406+
},
407+
"size": {
408+
"const": 8
409+
}
410+
}
411+
}
412+
"""

0 commit comments

Comments
 (0)