Skip to content

Commit 3d09b78

Browse files
add ocm test to activities of resource shared to federated user
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
1 parent 3d45d84 commit 3d09b78

File tree

2 files changed

+93
-3
lines changed

2 files changed

+93
-3
lines changed

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
272272

273273
#### [OCM. Prevent federated users from being added as members of the space](https://github.com/owncloud/ocis/issues/10051)
274274

275-
- [apiOcm/share.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L231)
276-
- [apiOcm/share.feature:232](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L232)
277-
- [apiOcm/share.feature:233](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L233)
275+
- [apiOcm/share.feature:321](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L321)
276+
- [apiOcm/share.feature:322](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L322)
277+
- [apiOcm/share.feature:323](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiOcm/share.feature#L323)
278278

279279
Note: always have an empty line at the end of this file.
280280
The bash script that processes this file requires that the last line has a newline on the end.

tests/acceptance/features/apiOcm/share.feature

+90
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,96 @@ Feature: an user shares resources usin ScienceMesh application
100100
| folderToShare |
101101
| textfile.txt |
102102

103+
104+
Scenario: local user shares resources from project space to federation user
105+
Given using server "LOCAL"
106+
And "Alice" has created the federation share invitation
107+
And using server "REMOTE"
108+
And "Brian" has accepted invitation
109+
And using server "LOCAL"
110+
And using spaces DAV path
111+
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
112+
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
113+
And user "Alice" has created a folder "folderToShare" in space "projectSpace"
114+
When user "Alice" sends the following resource share invitation to federated user using the Graph API:
115+
| resource | folderToShare |
116+
| space | projectSpace |
117+
| sharee | Brian |
118+
| shareType | user |
119+
| permissionsRole | Viewer |
120+
| federatedServer | @federation-ocis-server:10200 |
121+
Then the HTTP status code should be "200"
122+
When using server "REMOTE"
123+
And user "Brian" lists the shares shared with him without retry using the Graph API
124+
Then the HTTP status code should be "200"
125+
And the JSON data of the response should match
126+
"""
127+
{
128+
"type": "object",
129+
"required": [
130+
"value"
131+
],
132+
"properties": {
133+
"value": {
134+
"type": "array",
135+
"minItems": 1,
136+
"maxItems": 1,
137+
"items": {
138+
"type": "object",
139+
"required": [
140+
"@UI.Hidden",
141+
"@client.synchronize",
142+
"createdBy",
143+
"name"
144+
],
145+
"properties": {
146+
"@UI.Hidden": {
147+
"type": "boolean",
148+
"enum": [
149+
false
150+
]
151+
},
152+
"@client.synchronize": {
153+
"type": "boolean",
154+
"enum": [
155+
false
156+
]
157+
},
158+
"createdBy": {
159+
"type": "object",
160+
"required": [
161+
"user"
162+
],
163+
"properties": {
164+
"user": {
165+
"type": "object",
166+
"required": [
167+
"displayName",
168+
"id"
169+
],
170+
"properties": {
171+
"displayName": {
172+
"type": "string",
173+
"const": "Alice Hansen"
174+
},
175+
"id": {
176+
"type": "string",
177+
"pattern": "^%federated_user_id_pattern%$"
178+
}
179+
}
180+
}
181+
}
182+
},
183+
"name": {
184+
"const": "folderToShare"
185+
}
186+
}
187+
}
188+
}
189+
}
190+
}
191+
"""
192+
103193
@issue-9534
104194
Scenario Outline: federation user shares resource to local user after accepting invitation
105195
Given using server "LOCAL"

0 commit comments

Comments
 (0)