diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index dce2fd8831..93a355aaa5 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -51,8 +51,8 @@ Synchronization features like etag propagation, setting mtime and locking files #### [Uploading an old method chunked file with checksum should fail using new DAV path](https://github.com/owncloud/ocis/issues/2323) -- [coreApiMain/checksums.feature:268](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L268) -- [coreApiMain/checksums.feature:273](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L273) +- [coreApiMain/checksums.feature:269](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L269) +- [coreApiMain/checksums.feature:274](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L274) ### Share @@ -129,8 +129,8 @@ cannot share a folder with create permission #### [Edit user share response has a "name" field](https://github.com/owncloud/ocis/issues/1225) +- [coreApiShareUpdateToShares/updateShare.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L200) - [coreApiShareUpdateToShares/updateShare.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L201) -- [coreApiShareUpdateToShares/updateShare.feature:202](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L202) #### [deleting a share with wrong authentication returns OCS status 996 / HTTP 500](https://github.com/owncloud/ocis/issues/1229) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 929c40deb4..5f8726e9e2 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -242,39 +242,39 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiSharingNgLinkShare/linkShare.feature:544](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L544) - [apiSharingNgLinkShare/linkShare.feature:545](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L545) - [apiSharingNgLinkShare/linkShare.feature:611](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L611) -- [apiSharingNgLinkShare/linkShare.feature:958](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L958) -- [apiSharingNgLinkShare/linkShare.feature:1104](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1104) -- [apiSharingNgLinkShare/linkShare.feature:1160](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1160) +- [apiSharingNgLinkShare/linkShare.feature:959](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L959) +- [apiSharingNgLinkShare/linkShare.feature:1105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1105) - [apiSharingNgLinkShare/linkShare.feature:1161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1161) - [apiSharingNgLinkShare/linkShare.feature:1162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1162) -- [apiSharingNgLinkShare/linkShare.feature:1267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1267) -- [apiSharingNgLinkShare/linkShare.feature:1333](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1333) -- [apiSharingNgLinkShare/linkShare.feature:1477](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1477) -- [apiSharingNgLinkShare/linkShare.feature:1546](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1546) -- [apiSharingNgLinkShare/linkShare.feature:1596](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1596) +- [apiSharingNgLinkShare/linkShare.feature:1163](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1163) +- [apiSharingNgLinkShare/linkShare.feature:1268](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1268) +- [apiSharingNgLinkShare/linkShare.feature:1334](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1334) +- [apiSharingNgLinkShare/linkShare.feature:1478](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1478) +- [apiSharingNgLinkShare/linkShare.feature:1547](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1547) - [apiSharingNgLinkShare/linkShare.feature:1597](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1597) - [apiSharingNgLinkShare/linkShare.feature:1598](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1598) -- [apiSharingNgLinkShare/linkShare.feature:1837](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1837) -- [apiSharingNgLinkShare/linkShare.feature:1977](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1977) -- [apiSharingNgLinkShare/linkShare.feature:2031](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2031) +- [apiSharingNgLinkShare/linkShare.feature:1599](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1599) +- [apiSharingNgLinkShare/linkShare.feature:1838](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1838) +- [apiSharingNgLinkShare/linkShare.feature:1978](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1978) - [apiSharingNgLinkShare/linkShare.feature:2032](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2032) - [apiSharingNgLinkShare/linkShare.feature:2033](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2033) -- [apiSharingNgLinkShare/linkShare.feature:2101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2101) -- [apiSharingNgLinkShare/linkShare.feature:2168](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2168) -- [apiSharingNgLinkShare/linkShare.feature:2239](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2239) -- [apiSharingNgLinkShare/linkShare.feature:2420](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2420) -- [apiSharingNgLinkShare/linkShare.feature:2679](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2679) -- [apiSharingNgLinkShare/linkShare.feature:2733](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2733) +- [apiSharingNgLinkShare/linkShare.feature:2034](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2034) +- [apiSharingNgLinkShare/linkShare.feature:2102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2102) +- [apiSharingNgLinkShare/linkShare.feature:2169](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2169) +- [apiSharingNgLinkShare/linkShare.feature:2240](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2240) +- [apiSharingNgLinkShare/linkShare.feature:2421](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2421) +- [apiSharingNgLinkShare/linkShare.feature:2680](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2680) - [apiSharingNgLinkShare/linkShare.feature:2734](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2734) - [apiSharingNgLinkShare/linkShare.feature:2735](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2735) -- [apiSharingNgLinkShare/linkShare.feature:2803](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2803) -- [apiSharingNgLinkShare/linkShare.feature:2889](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2889) +- [apiSharingNgLinkShare/linkShare.feature:2736](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2736) +- [apiSharingNgLinkShare/linkShare.feature:2804](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2804) +- [apiSharingNgLinkShare/linkShare.feature:2890](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2890) - [apiSharingNg/removeAccessToDriveItem.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L125) - [apiSharingNg/removeAccessToDriveItem.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L141) - [apiSharingNg/removeAccessToDriveItem.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L161) - [apiSharingNg/removeAccessToDriveItem.feature:179](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L179) -- [apiSharingNg/removeAccessToDrive.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature#L178) -- [apiSharingNg/removeAccessToDrive.feature:207](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature#L207) +- [apiSharingNg/removeAccessToDrive.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature#L177) +- [apiSharingNg/removeAccessToDrive.feature:206](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature#L206) ### [sharee (editor role) MOVE a file by file-id into same shared folder returns 403](https://github.com/owncloud/ocis/issues/7617) diff --git a/tests/acceptance/features/apiContract/spacesReport.feature b/tests/acceptance/features/apiContract/spacesReport.feature index 36104d09f9..bf84872d43 100644 --- a/tests/acceptance/features/apiContract/spacesReport.feature +++ b/tests/acceptance/features/apiContract/spacesReport.feature @@ -80,7 +80,7 @@ Feature: REPORT request to project space | /folderMain/sub-folder | And the following headers should match these regular expressions | X-Request-Id | /^[a-zA-Z]+\/[a-zA-Z]+\.feature:\d+(-\d+)?$/ | - Then the HTTP status code should be "207" + And the HTTP status code should be "207" And the "REPORT" response to user "Alice" should contain a mountpoint "findData" with these key and value pairs: | key | value | | oc:fileid | UUIDof:folderMain/sub-folder | diff --git a/tests/acceptance/features/apiCors/cors.feature b/tests/acceptance/features/apiCors/cors.feature index fb35b2df57..431ba125f7 100644 --- a/tests/acceptance/features/apiCors/cors.feature +++ b/tests/acceptance/features/apiCors/cors.feature @@ -101,7 +101,6 @@ Feature: CORS headers | header | value | | Access-Control-Allow-Origin | https://aphno.badal | - @issue-8380 Scenario: CORS headers should be returned when uploading file using Tus and when CORS domain sending origin header in the Webdav api Given user "Alice" has created a new TUS resource for the space "Personal" with content "" using the WebDAV API with these headers: diff --git a/tests/acceptance/features/apiDownloads/download.feature b/tests/acceptance/features/apiDownloads/download.feature index eb6066f324..ea88f2f57c 100644 --- a/tests/acceptance/features/apiDownloads/download.feature +++ b/tests/acceptance/features/apiDownloads/download.feature @@ -27,6 +27,7 @@ Feature: Download file in project space | shareType | user | | permissionsRole | Space Viewer | + Scenario Outline: user downloads a file in the project space When user "" downloads the file "file.txt" of the space "download file" using the WebDAV API Then the HTTP status code should be "200" diff --git a/tests/acceptance/features/apiGraph/userGDPRExport.feature b/tests/acceptance/features/apiGraph/userGDPRExport.feature index ae5448f7dc..fb5a140a79 100644 --- a/tests/acceptance/features/apiGraph/userGDPRExport.feature +++ b/tests/acceptance/features/apiGraph/userGDPRExport.feature @@ -13,170 +13,171 @@ Feature: user GDPR (General Data Protection Regulation) report And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain key 'user' and match - """ - { - "type": "object", - "required": [ - "id", - "username", - "mail", - "display_name", - "uid_number", - "gid_number" - ], - "properties": { - "id": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] + """ + { + "type": "object", + "required": [ + "id", + "username", + "mail", + "display_name", + "uid_number", + "gid_number" + ], + "properties": { + "id": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } } + }, + "username": { + "type": "string", + "enum": ["Alice"] + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "display_name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "uid_number": { + "type": "number", + "enum": [99] + }, + "gid_number": { + "type": "number", + "enum": [99] } - }, - "username": { - "type": "string", - "enum": ["Alice"] - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "display_name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "uid_number": { - "type": "number", - "enum": [99] - }, - "gid_number": { - "type": "number", - "enum": [99] } } - } - """ + """ + Scenario: generate a GDPR report and check events when a user is created When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain event type "events.UserCreated" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "UserID" - ], - "properties": { - "Executant": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "UserID" + ], + "properties": { + "Executant": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } } + }, + "UserID": { + "type": "string", + "pattern": "^%user_id_pattern%$" } - }, - "UserID": { - "type": "string", - "pattern": "^%user_id_pattern%$" } } } } - } - """ + """ And the downloaded JSON content should contain event type "events.SpaceCreated" for "personal" space and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Name", - "Type", - "Quota" - ], - "properties": { - "Executant": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Name", + "Type", + "Quota" + ], + "properties": { + "Executant": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } } + }, + "Name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "Type": { + "type": "string", + "enum": ["personal"] + }, + "Quota": { + "type": ["number", "null"], + "enum": [null] } - }, - "Name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "Type": { - "type": "string", - "enum": ["personal"] - }, - "Quota": { - "type": ["number", "null"], - "enum": [null] } } } } - } - """ + """ Scenario: generate a GDPR report and check events when user uploads a file @@ -185,123 +186,123 @@ Feature: user GDPR (General Data Protection Regulation) report And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain event type "events.BytesReceived" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "ExecutingUser", - "Filename", - "ResourceID", - "Filesize", - "UploadID", - "SpaceOwner" - ], - "properties": { - "ExecutingUser": { - "type": "object", - "required": [ - "username" - ], - "properties": { - "username": { - "type": "string", - "enum": ["Alice"] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "ExecutingUser", + "Filename", + "ResourceID", + "Filesize", + "UploadID", + "SpaceOwner" + ], + "properties": { + "ExecutingUser": { + "type": "object", + "required": [ + "username" + ], + "properties": { + "username": { + "type": "string", + "enum": ["Alice"] + } } + }, + "Filename": { + "type": "string", + "enum": ["lorem.txt"] + }, + "Filesize": { + "type": "number", + "enum": [11] + }, + "Quota": { + "type": ["number", "null"], + "enum": [null] } - }, - "Filename": { - "type": "string", - "enum": ["lorem.txt"] - }, - "Filesize": { - "type": "number", - "enum": [11] - }, - "Quota": { - "type": ["number", "null"], - "enum": [null] } } } } - } - """ + """ And the downloaded JSON content should contain event type "events.FileUploaded" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Owner", - "Ref", - "SpaceOwner" - ], - "properties": { - "Ref": { - "type": "object", - "required": [ - "path" - ], - "properties": { - "path" : { - "type": "string", - "enum": ["./lorem.txt"] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Owner", + "Ref", + "SpaceOwner" + ], + "properties": { + "Ref": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path" : { + "type": "string", + "enum": ["./lorem.txt"] + } } } } } } } - } - """ + """ And the downloaded JSON content should contain event type "events.PostprocessingFinished" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "ExecutingUser", - "Filename" - ], - "properties": { - "ExecutingUser": { - "type": "object", - "required": [ - "username" - ], - "properties": { - "username": { - "type": "string", - "enum": ["Alice"] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "ExecutingUser", + "Filename" + ], + "properties": { + "ExecutingUser": { + "type": "object", + "required": [ + "username" + ], + "properties": { + "username": { + "type": "string", + "enum": ["Alice"] + } } + }, + "Filename": { + "type": "string", + "enum": ["lorem.txt"] } - }, - "Filename": { - "type": "string", - "enum": ["lorem.txt"] } } } } - } - """ + """ Scenario: generate a GDPR report and check events when a user is added to a group @@ -311,102 +312,102 @@ Feature: user GDPR (General Data Protection Regulation) report And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain event type "events.GroupMemberAdded" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "GroupID", - "UserID" - ], - "properties": { - "Executant": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "GroupID", + "UserID" + ], + "properties": { + "Executant": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } } + }, + "GroupID": { + "type": "string", + "pattern": "^%group_id_pattern%$" + }, + "UserID": { + "type": "string", + "pattern": "^%user_id_pattern%$" } - }, - "GroupID": { - "type": "string", - "pattern": "^%group_id_pattern%$" - }, - "UserID": { - "type": "string", - "pattern": "^%user_id_pattern%$" } } } } - } - """ + """ And the downloaded JSON content should contain key 'user' and match - """ - { - "type": "object", - "required": [ - "id", - "username", - "mail", - "display_name", - "groups", - "uid_number", - "gid_number" - ], - "properties": { - "username": { - "type": "string", - "enum": ["Alice"] - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "display_name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "groups": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "id", + "username", + "mail", + "display_name", + "groups", + "uid_number", + "gid_number" + ], + "properties": { + "username": { "type": "string", - "pattern": "^%group_id_pattern%$" + "enum": ["Alice"] + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "display_name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "groups": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } + }, + "uid_number": { + "type": "number", + "enum": [99] + }, + "gid_number": { + "type": "number", + "enum": [99] } - }, - "uid_number": { - "type": "number", - "enum": [99] - }, - "gid_number": { - "type": "number", - "enum": [99] } } - } - """ + """ Scenario: generate a GDPR report after the admin updates the quota of personal space @@ -415,82 +416,82 @@ Feature: user GDPR (General Data Protection Regulation) report And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain event type "events.SpaceUpdated" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Space" - ], - "properties": { - "Executant": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] - } - } - }, - "Space": { - "type": "object", - "required": [ - "name", - "quota", - "space_type" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "quota": { - "type": "object", - "required": [ - "quota_max_bytes", - "quota_max_files" - ], - "properties": { - "quota_max_bytes": { - "type": "number", - "enum": [10000] - }, - "quota_max_files": { - "type": "number", - "enum": [18446744073709552000] - } + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Space" + ], + "properties": { + "Executant": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } + } + }, + "Space": { + "type": "object", + "required": [ + "name", + "quota", + "space_type" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "quota": { + "type": "object", + "required": [ + "quota_max_bytes", + "quota_max_files" + ], + "properties": { + "quota_max_bytes": { + "type": "number", + "enum": [10000] + }, + "quota_max_files": { + "type": "number", + "enum": [18446744073709552000] + } + } + }, + "space_type": { + "type": "string", + "enum": ["personal"] } - }, - "space_type": { - "type": "string", - "enum": ["personal"] } } } } } } - } - """ + """ Scenario Outline: user tries to generate GDPR report of other users @@ -525,23 +526,445 @@ Feature: user GDPR (General Data Protection Regulation) report And user "Alice" downloads the content of GDPR report ".personal_data_export.json" Then the HTTP status code of responses on each endpoint should be "202, 200" respectively And the downloaded JSON content should contain event type "events.ContainerCreated" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Owner", - "Ref", - "SpaceOwner" - ], - "properties": { - "Executant": { + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Owner", + "Ref", + "SpaceOwner" + ], + "properties": { + "Executant": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } + } + }, + "Ref": { + "type": "object", + "required": [ + "path", + "resource_id" + ], + "properties": { + "path" : { + "type": "string", + "enum": ["./folderMain"] + } + } + } + } + } + } + } + """ + + + Scenario: generate a GDPR report and check events when a user shares a folder + Given user "Brian" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/folderMain" + And user "Alice" has sent the following resource share invitation: + | resource | folderMain | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API + And user "Alice" downloads the content of GDPR report ".personal_data_export.json" + Then the HTTP status code of responses on each endpoint should be "202, 200" respectively + And the downloaded JSON content should contain event type "events.ShareCreated" in item 'events' and should match + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "CTime", + "Executant", + "GranteeGroupID", + "GranteeUserID", + "ItemID", + "Permissions", + "ShareID", + "Sharee", + "Sharer" + ], + "properties": { + "GranteeGroupID": { + "type": ["number", "null"], + "enum": [null] + }, + "Permissions": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "type": "object", + "required": [ + "get_path", + "get_quota", + "initiate_file_download", + "list_container", + "list_recycle", + "stat" + ], + "properties": { + "get_path" : { + "type": "boolean", + "enum": [true] + }, + "get_quota" : { + "type": "boolean", + "enum": [true] + }, + "initiate_file_download" : { + "type": "boolean", + "enum": [true] + }, + "list_container" : { + "type": "boolean", + "enum": [true] + }, + "list_recycle" : { + "type": "boolean", + "enum": [true] + }, + "stat" : { + "type": "boolean", + "enum": [true] + } + } + } + } + }, + "ShareID": { + "type": "object", + "required": [ + "opaque_id" + ], + "properties": { + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%:%user_id_pattern%:%user_id_pattern%$" + } + } + }, + "Sharee": { + "type": ["number", "null"], + "enum": [null] + }, + "Sharer": { + "type": "object", + "required": [ + "idp", + "opaque_id", + "type" + ], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "type": "number", + "enum": [1] + } + } + } + } + } + } + } + """ + + + Scenario: generate a GDPR report and check events when a user creates a public link share + Given user "Brian" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/folderMain" + And user "Alice" has created the following resource link share: + | resource | folderMain | + | space | Personal | + | permissionsRole | view | + | password | %public% | + | displayName | sharedlink | + When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API + And user "Alice" downloads the content of GDPR report ".personal_data_export.json" + Then the HTTP status code of responses on each endpoint should be "202, 200" respectively + And the downloaded JSON content should contain event type "events.LinkCreated" in item 'events' and should match + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "CTime", + "DisplayName", + "Executant", + "Expiration", + "ItemID", + "PasswordProtected", + "Permissions", + "ShareID", + "Sharer", + "Token" + ], + "properties": { + "DisplayName": { + "type": "string", + "enum": ["sharedlink"] + }, + "Expiration": { + "type": ["string", "null"], + "enum": [null] + }, + "PasswordProtected": { + "type": "boolean", + "enum": [true] + }, + "Permissions": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "type": "object", + "required": [ + "get_path", + "get_quota", + "initiate_file_download", + "list_container", + "list_recycle", + "stat" + ], + "properties": { + "get_path" : { + "type": "boolean", + "enum": [true] + }, + "get_quota" : { + "type": "boolean", + "enum": [true] + }, + "initiate_file_download" : { + "type": "boolean", + "enum": [true] + }, + "list_container" : { + "type": "boolean", + "enum": [true] + }, + "list_recycle" : { + "type": "boolean", + "enum": [true] + }, + "stat" : { + "type": "boolean", + "enum": [true] + } + } + } + } + }, + "Token": { + "type": "string", + "pattern": "^[a-zA-Z]{15}$" + } + } + } + } + } + """ + + + Scenario: generate a GDPR report and check events when user deletes a resource + Given user "Alice" has created folder "/folderMain" + And user "Alice" has deleted folder "/folderMain" + When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API + And user "Alice" downloads the content of GDPR report ".personal_data_export.json" + Then the HTTP status code of responses on each endpoint should be "202, 200" respectively + And the downloaded JSON content should contain event type "events.ItemTrashed" in item 'events' and should match + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Owner", + "ID", + "Ref", + "SpaceOwner" + ], + "properties": { + "Ref": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "path" : { + "type": "string", + "enum": ["./folderMain"] + } + } + } + } + } + } + } + """ + + + Scenario: generate a GDPR report and check events when a space is shared + Given user "Brian" has been created with default attributes and without skeleton files + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API + And user "Alice" has sent the following space share invitation: + | space | GDPR Space | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Viewer | + When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API + And user "Alice" downloads the content of GDPR report ".personal_data_export.json" + Then the HTTP status code of responses on each endpoint should be "202, 200" respectively + And the downloaded JSON content should contain event type "events.SpaceShared" in item 'events' and should match + """ + { + "type": "object", + "required": ["event", "type"], + "properties": { + "event": { + "type": "object", + "required": [ + "Creator", + "Executant", + "GranteeGroupID", + "GranteeUserID" + ], + "properties": { + "Creator": { + "type": "object", + "required": ["idp", "opaque_id", "type"], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "const": 1 + } + } + }, + "Executant": { + "type": "object", + "required": ["idp", "opaque_id", "type"], + "properties": { + "idp": { + "type": "string", + "pattern": "^%base_url%$" + }, + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "type": { + "const": 1 + } + } + }, + "GranteeGroupID": { + "const": null + }, + "GranteeUserID": { + "type": "object", + "required": ["opaque_id"], + "properties": { + "opaque_id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "type": { + "const": "events.SpaceShared" + } + } + } + """ + + + Scenario: generate a GDPR report and check events when a space is created + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API + When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API + And user "Alice" downloads the content of GDPR report ".personal_data_export.json" + Then the HTTP status code of responses on each endpoint should be "202, 200" respectively + And the downloaded JSON content should contain event type "events.SpaceCreated" for "project" space and should match + """ + { + "type": "object", + "required": [ + "event" + ], + "properties": { + "event" : { + "type": "object", + "required": [ + "Executant", + "Name", + "Type" + ], + "properties": { + "Executant": { "type": "object", "required": [ "idp", @@ -563,438 +986,16 @@ Feature: user GDPR (General Data Protection Regulation) report } } }, - "Ref": { - "type": "object", - "required": [ - "path", - "resource_id" - ], - "properties": { - "path" : { - "type": "string", - "enum": ["./folderMain"] - } + "Name": { + "type": "string", + "enum": ["GDPR Space"] + }, + "Type": { + "type": "string", + "enum": ["project"] } } } } } - } - """ - - - Scenario: generate a GDPR report and check events when a user shares a folder - Given user "Brian" has been created with default attributes and without skeleton files - And user "Alice" has created folder "/folderMain" - And user "Alice" has sent the following resource share invitation: - | resource | folderMain | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API - And user "Alice" downloads the content of GDPR report ".personal_data_export.json" - Then the HTTP status code of responses on each endpoint should be "202, 200" respectively - And the downloaded JSON content should contain event type "events.ShareCreated" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "CTime", - "Executant", - "GranteeGroupID", - "GranteeUserID", - "ItemID", - "Permissions", - "ShareID", - "Sharee", - "Sharer" - ], - "properties": { - "GranteeGroupID": { - "type": ["number", "null"], - "enum": [null] - }, - "Permissions": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "permissions": { - "type": "object", - "required": [ - "get_path", - "get_quota", - "initiate_file_download", - "list_container", - "list_recycle", - "stat" - ], - "properties": { - "get_path" : { - "type": "boolean", - "enum": [true] - }, - "get_quota" : { - "type": "boolean", - "enum": [true] - }, - "initiate_file_download" : { - "type": "boolean", - "enum": [true] - }, - "list_container" : { - "type": "boolean", - "enum": [true] - }, - "list_recycle" : { - "type": "boolean", - "enum": [true] - }, - "stat" : { - "type": "boolean", - "enum": [true] - } - } - } - } - }, - "ShareID": { - "type": "object", - "required": [ - "opaque_id" - ], - "properties": { - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%:%user_id_pattern%:%user_id_pattern%$" - } - } - }, - "Sharee": { - "type": ["number", "null"], - "enum": [null] - }, - "Sharer": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] - } - } - } - } - } - } - } - """ - - - Scenario: generate a GDPR report and check events when a user creates a public link share - Given user "Brian" has been created with default attributes and without skeleton files - And user "Alice" has created folder "/folderMain" - And user "Alice" has created the following resource link share: - | resource | folderMain | - | space | Personal | - | permissionsRole | view | - | password | %public% | - | displayName | sharedlink | - When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API - And user "Alice" downloads the content of GDPR report ".personal_data_export.json" - Then the HTTP status code of responses on each endpoint should be "202, 200" respectively - And the downloaded JSON content should contain event type "events.LinkCreated" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "CTime", - "DisplayName", - "Executant", - "Expiration", - "ItemID", - "PasswordProtected", - "Permissions", - "ShareID", - "Sharer", - "Token" - ], - "properties": { - "DisplayName": { - "type": "string", - "enum": ["sharedlink"] - }, - "Expiration": { - "type": ["string", "null"], - "enum": [null] - }, - "PasswordProtected": { - "type": "boolean", - "enum": [true] - }, - "Permissions": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "permissions": { - "type": "object", - "required": [ - "get_path", - "get_quota", - "initiate_file_download", - "list_container", - "list_recycle", - "stat" - ], - "properties": { - "get_path" : { - "type": "boolean", - "enum": [true] - }, - "get_quota" : { - "type": "boolean", - "enum": [true] - }, - "initiate_file_download" : { - "type": "boolean", - "enum": [true] - }, - "list_container" : { - "type": "boolean", - "enum": [true] - }, - "list_recycle" : { - "type": "boolean", - "enum": [true] - }, - "stat" : { - "type": "boolean", - "enum": [true] - } - } - } - } - }, - "Token": { - "type": "string", - "pattern": "^[a-zA-Z]{15}$" - } - } - } - } - } - """ - - - Scenario: generate a GDPR report and check events when user deletes a resource - Given user "Alice" has created folder "/folderMain" - And user "Alice" has deleted folder "/folderMain" - When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API - And user "Alice" downloads the content of GDPR report ".personal_data_export.json" - Then the HTTP status code of responses on each endpoint should be "202, 200" respectively - And the downloaded JSON content should contain event type "events.ItemTrashed" in item 'events' and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Owner", - "ID", - "Ref", - "SpaceOwner" - ], - "properties": { - "Ref": { - "type": "object", - "required": [ - "path" - ], - "properties": { - "path" : { - "type": "string", - "enum": ["./folderMain"] - } - } - } - } - } - } - } - """ - - - Scenario: generate a GDPR report and check events when a space is shared - Given user "Brian" has been created with default attributes and without skeleton files - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API - And user "Alice" has sent the following space share invitation: - | space | GDPR Space | - | sharee | Brian | - | shareType | user | - | permissionsRole | Space Viewer | - When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API - And user "Alice" downloads the content of GDPR report ".personal_data_export.json" - Then the HTTP status code of responses on each endpoint should be "202, 200" respectively - And the downloaded JSON content should contain event type "events.SpaceShared" in item 'events' and should match - """ - { - "type": "object", - "required": ["event", "type"], - "properties": { - "event": { - "type": "object", - "required": [ - "Creator", - "Executant", - "GranteeGroupID", - "GranteeUserID" - ], - "properties": { - "Creator": { - "type": "object", - "required": ["idp", "opaque_id", "type"], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "const": 1 - } - } - }, - "Executant": { - "type": "object", - "required": ["idp", "opaque_id", "type"], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "const": 1 - } - } - }, - "GranteeGroupID": { - "const": null - }, - "GranteeUserID": { - "type": "object", - "required": ["opaque_id"], - "properties": { - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "type": { - "const": "events.SpaceShared" - } - } - } - """ - - - Scenario: generate a GDPR report and check events when a space is created - Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API - When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API - And user "Alice" downloads the content of GDPR report ".personal_data_export.json" - Then the HTTP status code of responses on each endpoint should be "202, 200" respectively - And the downloaded JSON content should contain event type "events.SpaceCreated" for "project" space and should match - """ - { - "type": "object", - "required": [ - "event" - ], - "properties": { - "event" : { - "type": "object", - "required": [ - "Executant", - "Name", - "Type" - ], - "properties": { - "Executant": { - "type": "object", - "required": [ - "idp", - "opaque_id", - "type" - ], - "properties": { - "idp": { - "type": "string", - "pattern": "^%base_url%$" - }, - "opaque_id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "type": { - "type": "number", - "enum": [1] - } - } - }, - "Name": { - "type": "string", - "enum": ["GDPR Space"] - }, - "Type": { - "type": "string", - "enum": ["project"] - } - } - } - } - } - """ + """ diff --git a/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature b/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature index c7414bf6e9..ad936dd205 100644 --- a/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature +++ b/tests/acceptance/features/apiGraphUserGroup/addUserToGroup.feature @@ -125,28 +125,28 @@ Feature: add users to group When user "Alice" tries to add herself to group "groupA" using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Unauthorized"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["Unauthorized"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -161,28 +161,28 @@ Feature: add users to group When user "Alice" tries to add user "Brian" to group "groupA" using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message" : { - "type": "string", - "enum": ["Unauthorized"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message" : { + "type": "string", + "enum": ["Unauthorized"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | diff --git a/tests/acceptance/features/apiGraphUserGroup/changeOwnPassword.feature b/tests/acceptance/features/apiGraphUserGroup/changeOwnPassword.feature index 66f04c31bb..d666a41917 100644 --- a/tests/acceptance/features/apiGraphUserGroup/changeOwnPassword.feature +++ b/tests/acceptance/features/apiGraphUserGroup/changeOwnPassword.feature @@ -3,6 +3,7 @@ Feature: an user changes its own password I want to change my password So that I can use new combination as password + Scenario Outline: change own password Given user "Alice" has been created with default attributes and without skeleton files When the user "Alice" changes its own password "" to "" using the Graph API diff --git a/tests/acceptance/features/apiGraphUserGroup/createUser.feature b/tests/acceptance/features/apiGraphUserGroup/createUser.feature index ce6d0b9f4f..63b4df65b8 100644 --- a/tests/acceptance/features/apiGraphUserGroup/createUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/createUser.feature @@ -91,7 +91,6 @@ Feature: create user Then the HTTP status code should be "201" And user "Brian" should exist - @env-config Scenario Outline: create user with setting OCIS no restriction on the user name Given the config "GRAPH_USERNAME_MATCH" has been set to "none" @@ -109,7 +108,6 @@ Feature: create user | 1248Bob | user names starts with the number | | (*:!;+-&$%)_alice | user names starts with the ASCII characters | - @env-config Scenario: create user with setting OCIS not to assign the default user role Given the config "GRAPH_ASSIGN_DEFAULT_USER_ROLE" has been set to "false" @@ -125,7 +123,6 @@ Feature: create user Then the HTTP status code should be "200" And the Graph API response should have no role - @env-config Scenario: create user with setting OCIS assign the default user role Given the config "GRAPH_ASSIGN_DEFAULT_USER_ROLE" has been set to "true" diff --git a/tests/acceptance/features/apiGraphUserGroup/editUser.feature b/tests/acceptance/features/apiGraphUserGroup/editUser.feature index 89f9bc31b5..14c88df546 100644 --- a/tests/acceptance/features/apiGraphUserGroup/editUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/editUser.feature @@ -21,19 +21,19 @@ Feature: edit user When the user "Alice" changes the user name of user "Carol" to "" using the Graph API Then the HTTP status code should be "" And the user information of "" should match this JSON schema - """ - { - "type": "object", - "required": [ - "onPremisesSamAccountName" - ], - "properties": { - "onPremisesSamAccountName": { - "enum": [""] + """ + { + "type": "object", + "required": [ + "onPremisesSamAccountName" + ], + "properties": { + "onPremisesSamAccountName": { + "enum": [""] + } } } - } - """ + """ Examples: | action description | user | http-status-code | new-user | | change to a valid user name | Lionel | 200 | Lionel | @@ -52,20 +52,20 @@ Feature: edit user When the user "Alice" changes the user name of user "sam" to "Brian" using the Graph API Then the HTTP status code should be "409" And the user information of "sam" should match this JSON schema - """ - { - "type": "object", - "required": [ - "onPremisesSamAccountName" - ], - "properties": { - "onPremisesSamAccountName": { - "type": "string", - "enum": ["sam"] + """ + { + "type": "object", + "required": [ + "onPremisesSamAccountName" + ], + "properties": { + "onPremisesSamAccountName": { + "type": "string", + "enum": ["sam"] + } } } - } - """ + """ Scenario: admin user changes the name of a user to the name of a previously deleted user @@ -78,40 +78,40 @@ Feature: edit user When the user "Alice" changes the user name of user "Brian" to "sam" using the Graph API Then the HTTP status code should be "200" And the user information of "sam" should match this JSON schema - """ - { - "type": "object", - "required": [ - "onPremisesSamAccountName" - ], - "properties": { - "onPremisesSamAccountName": { - "type": "string", - "enum": ["sam"] + """ + { + "type": "object", + "required": [ + "onPremisesSamAccountName" + ], + "properties": { + "onPremisesSamAccountName": { + "type": "string", + "enum": ["sam"] + } } } - } - """ + """ Scenario Outline: admin user can edit another user display name When the user "Alice" changes the display name of user "Brian" to "" using the Graph API Then the HTTP status code should be "200" And the user information of "Brian" should match this JSON schema - """ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": [""] + """ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": [""] + } } } - } - """ + """ Examples: | action description | new-display-name | expected-display-name | | change to a display name | Olaf Scholz | Olaf Scholz | @@ -125,20 +125,20 @@ Feature: edit user When the user "Brian" tries to change the display name of user "Brian" to "Brian Murphy" using the Graph API Then the HTTP status code should be "401" And the user information of "Alice" should match this JSON schema - """ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] + """ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -157,20 +157,20 @@ Feature: edit user When the user "Brian" tries to change the display name of user "Carol" to "Alice Hansen" using the Graph API Then the HTTP status code should be "401" And the user information of "Carol" should match this JSON schema - """ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Carol King"] + """ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + } } } - } - """ + """ Examples: | user-role | user-role-2 | | Space Admin | Space Admin | @@ -229,35 +229,35 @@ Feature: edit user When user "Alice" gets information of user "Brian" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id", - "onPremisesSamAccountName", - "accountEnabled" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [false] + """ + { + "type": "object", + "required": [ + "displayName", + "id", + "onPremisesSamAccountName", + "accountEnabled" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [false] + } } } - } - """ + """ Scenario Outline: normal user should not be able to disable another user @@ -268,35 +268,35 @@ Feature: edit user When user "Alice" gets information of user "Carol" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id", - "onPremisesSamAccountName", - "accountEnabled" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Carol King"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Carol"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [true] + """ + { + "type": "object", + "required": [ + "displayName", + "id", + "onPremisesSamAccountName", + "accountEnabled" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Carol"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [true] + } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -311,35 +311,35 @@ Feature: edit user When user "Alice" gets information of user "Brian" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id", - "onPremisesSamAccountName", - "accountEnabled" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [true] + """ + { + "type": "object", + "required": [ + "displayName", + "id", + "onPremisesSamAccountName", + "accountEnabled" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [true] + } } } - } - """ + """ Scenario Outline: normal user should not be able to enable another user @@ -351,35 +351,35 @@ Feature: edit user When user "Alice" gets information of user "Carol" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id", - "onPremisesSamAccountName", - "accountEnabled" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Carol King"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Carol"] - }, - "accountEnabled": { - "type": "boolean", - "enum": [false] + """ + { + "type": "object", + "required": [ + "displayName", + "id", + "onPremisesSamAccountName", + "accountEnabled" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Carol"] + }, + "accountEnabled": { + "type": "boolean", + "enum": [false] + } } } - } - """ + """ Examples: | user-role | | Space Admin | diff --git a/tests/acceptance/features/apiGraphUserGroup/getGroup.feature b/tests/acceptance/features/apiGraphUserGroup/getGroup.feature index 16ebff90e7..e55819afa2 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getGroup.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getGroup.feature @@ -29,28 +29,28 @@ Feature: get groups and their members When user "Brian" gets all the groups using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["search term too short"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["search term too short"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -80,28 +80,28 @@ Feature: get groups and their members When user "Brian" gets all the members of group "tea-lover" using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Unauthorized"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["Unauthorized"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -122,123 +122,123 @@ Feature: get groups and their members When user "Alice" retrieves all groups along with their members using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain the group "coffee-lover" in the item 'value', the group-details should match - """ - { - "type": "object", - "required": [ - "members" - ], - "properties": { - "members": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] + """ + { + "type": "object", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + } } } } } } - } - """ + """ And the JSON data of the response should contain the group "tea-lover" in the item 'value', the group-details should match - """ - { - "type": "object", - "required": [ - "members" - ], - "properties": { - "members": { - "type": "array", - "maxItems": 2, - "minItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] + """ + { + "type": "object", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "maxItems": 2, + "minItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Carol King"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["carol@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Carol"] + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Carol King"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["carol@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Carol"] - } - } - } - ] + ] + } } } } - } - """ + """ @issue-5938 Scenario Outline: user other than the admin shouldn't get all groups along with its member's information @@ -251,28 +251,28 @@ Feature: get groups and their members When user "Brian" retrieves all groups along with their members using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["search term too short"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["search term too short"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -287,80 +287,80 @@ Feature: get groups and their members And user "Brian" has been added to group "tea-lover" When user "Alice" gets all the members information of group "tea-lover" using the Graph API And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "members" - ], - "properties": { - "members": { - "type": "array", - "maxItems": 2, - "minItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] + """ + { + "type": "object", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "maxItems": 2, + "minItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["brian@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Brian"] + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["brian@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Brian"] - } - } - } - ] + ] + } } } } - } - """ + """ @issue-5604 Scenario Outline: user other than the admin gets a group along with its member's information @@ -372,28 +372,28 @@ Feature: get groups and their members When user "Brian" gets all the members information of group "tea-lover" using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Unauthorized"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["Unauthorized"] + } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -406,25 +406,25 @@ Feature: get groups and their members When user "Alice" gets details of the group "tea-lover" using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" + """ + { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } } } - } - """ + """ Scenario Outline: get details of group with UTF-8 characters name @@ -432,25 +432,25 @@ Feature: get groups and their members When user "Alice" gets details of the group "" using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": [""] - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" + """ + { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": [""] + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } } } - } - """ + """ Examples: | group | | España§àôœ€ | @@ -472,42 +472,42 @@ Feature: get groups and their members When user "Brian" searches for group "" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "displayName", - "id", - "groupTypes" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] - }, - "id": { - "type": "string", - "pattern": "%group_id_pattern%" - }, - "groupTypes": { - "const": [] + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "groupTypes" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + }, + "id": { + "type": "string", + "pattern": "%group_id_pattern%" + }, + "groupTypes": { + "const": [] + } } } } } } - } - """ + """ Examples: | group | | tea | @@ -522,28 +522,28 @@ Feature: get groups and their members When user "Brian" tries to search for group "te" using Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message":{ - "type": "string", - "enum": ["search term too short"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message":{ + "type": "string", + "enum": ["search term too short"] + } } } } } - } - """ + """ @issue-7990 Scenario Outline: user tries to search for groups with invalid characters/token (search term without quotation) @@ -554,28 +554,28 @@ Feature: get groups and their members When user "Brian" tries to search for group "" using Graph API Then the HTTP status code should be "400" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Token '' is invalid"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["Token '' is invalid"] + } } } } } - } - """ + """ Examples: | group | token | | tea-lovers | -lovers | diff --git a/tests/acceptance/features/apiGraphUserGroup/getUser.feature b/tests/acceptance/features/apiGraphUserGroup/getUser.feature index 5bd3c3ecd0..9c163f9e34 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getUser.feature @@ -1374,6 +1374,7 @@ Feature: get users } """ + Scenario: non-admin user tries to search for a user by display name with less than 3 characters When user "Brian" tries to search for user "al" using Graph API Then the HTTP status code should be "403" diff --git a/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature b/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature index 53a52a32e8..5f9458bf39 100644 --- a/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature +++ b/tests/acceptance/features/apiGraphUserGroup/getUserOwnInformation.feature @@ -11,30 +11,30 @@ Feature: get user's own information When the user "Alice" retrieves her information using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] + """ + { + "type": "object", + "required": [ + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + } } } - } - """ + """ Scenario: user gets his/her own information with group involvement @@ -45,61 +45,61 @@ Feature: get user's own information When the user "Alice" retrieves her information using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "id", - "mail", - "onPremisesSamAccountName" - ], - "properties": { - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "type": "string", - "enum": ["alice@example.org"] - }, - "onPremisesSamAccountName": { - "type": "string", - "enum": ["Alice"] - }, - "memberOf": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["tea-lover"] + """ + { + "type": "object", + "required": [ + "id", + "mail", + "onPremisesSamAccountName" + ], + "properties": { + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "type": "string", + "enum": ["alice@example.org"] + }, + "onPremisesSamAccountName": { + "type": "string", + "enum": ["Alice"] + }, + "memberOf": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["tea-lover"] + } + } + }, + { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["coffee-lover"] + } } } - }, - { - "type": "object", - "required": [ - "displayName" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["coffee-lover"] - } - } - } - ] + ] + } } } } - } - """ + """ diff --git a/tests/acceptance/features/apiGraphUserGroup/removeUserFromGroup.feature b/tests/acceptance/features/apiGraphUserGroup/removeUserFromGroup.feature index a1e5b137be..a8032edaf3 100644 --- a/tests/acceptance/features/apiGraphUserGroup/removeUserFromGroup.feature +++ b/tests/acceptance/features/apiGraphUserGroup/removeUserFromGroup.feature @@ -165,28 +165,28 @@ Feature: remove a user from a group When user "Alice" tries to remove user "Brian" from group "grp1" using the Graph API Then the HTTP status code should be "403" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": ["Unauthorized"] + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": ["Unauthorized"] + } } } } } - } - """ + """ And user "Brian" should belong to group "grp1" Examples: | user-role | diff --git a/tests/acceptance/features/apiGraphUserGroup/searchUserIncludingEmail.feature b/tests/acceptance/features/apiGraphUserGroup/searchUserIncludingEmail.feature index ccd6e8e532..cc98992bda 100644 --- a/tests/acceptance/features/apiGraphUserGroup/searchUserIncludingEmail.feature +++ b/tests/acceptance/features/apiGraphUserGroup/searchUserIncludingEmail.feature @@ -16,17 +16,17 @@ Feature: edit/search user including email When the user "Alice" changes the email of user "Brian" to "" using the Graph API Then the HTTP status code should be "" And the user information of "Brian" should match this JSON schema - """ - { - "type": "object", - "required": ["mail"], - "properties": { - "mail": { - "const": "" + """ + { + "type": "object", + "required": ["mail"], + "properties": { + "mail": { + "const": "" + } } } - } - """ + """ Examples: | action description | new-email | http-status-code | expected-email | | change to a valid email | newemail@example.com | 200 | newemail@example.com | @@ -41,17 +41,17 @@ Feature: edit/search user including email When the user "Brian" tries to change the email of user "Brian" to "newemail@example.com" using the Graph API Then the HTTP status code should be "401" And the user information of "Brian" should match this JSON schema - """ - { - "type": "object", - "required": ["mail"], - "properties": { - "mail": { - "const": "brian@example.com" + """ + { + "type": "object", + "required": ["mail"], + "properties": { + "mail": { + "const": "brian@example.com" + } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -70,17 +70,17 @@ Feature: edit/search user including email When the user "Brian" tries to change the email of user "Carol" to "newemail@example.com" using the Graph API Then the HTTP status code should be "401" And the user information of "Carol" should match this JSON schema - """ - { - "type": "object", - "required": ["mail"], - "properties": { - "mail": { - "const": "carol@example.com" + """ + { + "type": "object", + "required": ["mail"], + "properties": { + "mail": { + "const": "carol@example.com" + } } } - } - """ + """ Examples: | user-role | user-role-2 | | Space Admin | Space Admin | @@ -102,48 +102,7 @@ Feature: edit/search user including email When user "Alice" gets information of user "Brian" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "onPremisesSamAccountName", - "accountEnabled", - "userType" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id" : { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "brian@example.com" - }, - "onPremisesSamAccountName": { - "const": "Brian" - }, - "accountEnabled": { - "const": true - }, - "userType": { - "const": "Member" - } - } - } - """ - - - Scenario Outline: user gets his/her own information along with drive information - Given the administrator has assigned the role "" to user "Brian" using the Graph API - When the user "Brian" gets his drive information using Graph API - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ + """ { "type": "object", "required": [ @@ -151,7 +110,6 @@ Feature: edit/search user including email "id", "mail", "onPremisesSamAccountName", - "drive", "accountEnabled", "userType" ], @@ -174,79 +132,121 @@ Feature: edit/search user including email }, "userType": { "const": "Member" - }, - "drive": { - "type": "object", - "required": [ - "driveAlias", - "id", - "name", - "owner", - "quota", - "root", - "webUrl" - ], - "properties": { - "driveType" : { - "const": "personal" - }, - "driveAlias" : { - "const": "personal/brian" - }, - "id" : { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "name": { - "const": "Brian Murphy" - }, - "owner": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["id"], - "properties": { - "id": { - "type": "string", - "pattern": "%user_id_pattern%" + } + } + } + """ + + + Scenario Outline: user gets his/her own information along with drive information + Given the administrator has assigned the role "" to user "Brian" using the Graph API + When the user "Brian" gets his drive information using Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "onPremisesSamAccountName", + "drive", + "accountEnabled", + "userType" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id" : { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "brian@example.com" + }, + "onPremisesSamAccountName": { + "const": "Brian" + }, + "accountEnabled": { + "const": true + }, + "userType": { + "const": "Member" + }, + "drive": { + "type": "object", + "required": [ + "driveAlias", + "id", + "name", + "owner", + "quota", + "root", + "webUrl" + ], + "properties": { + "driveType" : { + "const": "personal" + }, + "driveAlias" : { + "const": "personal/brian" + }, + "id" : { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "name": { + "const": "Brian Murphy" + }, + "owner": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "string", + "pattern": "%user_id_pattern%" + } } } } - } - }, - "quota": { - "type": "object", - "required": ["state"], - "properties": { - "state": { - "const": "normal" + }, + "quota": { + "type": "object", + "required": ["state"], + "properties": { + "state": { + "const": "normal" + } } - } - }, - "root": { - "type": "object", - "required": ["id", "webDavUrl"], - "properties": { - "state": { - "const": "normal" - }, - "webDavUrl": { - "type": "string", - "pattern": "^%base_url%/dav/spaces/%space_id_pattern%$" + }, + "root": { + "type": "object", + "required": ["id", "webDavUrl"], + "properties": { + "state": { + "const": "normal" + }, + "webDavUrl": { + "type": "string", + "pattern": "^%base_url%/dav/spaces/%space_id_pattern%$" + } } + }, + "webUrl": { + "type": "string", + "pattern": "^%base_url%/f/%space_id_pattern%$" } - }, - "webUrl": { - "type": "string", - "pattern": "^%base_url%/f/%space_id_pattern%$" } } } } - } - """ + """ Examples: | user-role | | Admin | @@ -260,43 +260,43 @@ Feature: edit/search user including email When user "Brian" searches for user "ali" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "alice@example.org" - }, - "userType": { - "const": "Member" + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "alice@example.org" + }, + "userType": { + "const": "Member" + } } } } } } - } - """ + """ Examples: | user-role | | Space Admin | @@ -308,43 +308,43 @@ Feature: edit/search user including email When user "Brian" searches for user "%22alice@example.org%22" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "alice@example.org" - }, - "userType": { - "const": "Member" + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "alice@example.org" + }, + "userType": { + "const": "Member" + } } } } } } - } - """ + """ Scenario: non-admin user searches for a disabled users @@ -352,43 +352,43 @@ Feature: edit/search user including email When user "Brian" searches for user "alice" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "alice@example.org" - }, - "userType": { - "const": "Member" + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "alice@example.org" + }, + "userType": { + "const": "Member" + } } } } } } - } - """ + """ Scenario: non-admin user searches for multiple users having same displayname @@ -400,72 +400,72 @@ Feature: edit/search user including email When user "Brian" searches for user "alice" using Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "alice@example.org" - }, - "userType": { - "const": "Member" + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "alice@example.org" + }, + "userType": { + "const": "Member" + } + } + }, + { + "type": "object", + "required": [ + "displayName", + "id", + "mail", + "userType" + ], + "properties": { + "displayName": { + "const": "Alice Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "mail": { + "const": "another-alice@example.org" + }, + "userType": { + "const": "Member" + } } } - }, - { - "type": "object", - "required": [ - "displayName", - "id", - "mail", - "userType" - ], - "properties": { - "displayName": { - "const": "Alice Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "mail": { - "const": "another-alice@example.org" - }, - "userType": { - "const": "Member" - } - } - } - ] + ] + } } } } - } - """ + """ Scenario Outline: search other users when OCIS_SHOW_USER_EMAIL_IN_RESULTS config is disabled diff --git a/tests/acceptance/features/apiNotification/deprovisioningNotification.feature b/tests/acceptance/features/apiNotification/deprovisioningNotification.feature index 51cc718395..44cf878f92 100644 --- a/tests/acceptance/features/apiNotification/deprovisioningNotification.feature +++ b/tests/acceptance/features/apiNotification/deprovisioningNotification.feature @@ -176,22 +176,22 @@ Feature: Deprovisioning notification And user "Alice" lists all notifications Then the HTTP status code of responses on each endpoint should be "200, 200" respectively And the JSON response should contain a notification message with the subject "Instance will be shut down and deprovisioned" and the message-details should match - """ - { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": [ - "Attention! The instance will be shut down and deprovisioned on . Download all your data before that date as no access past that date is possible." - ] - } + """ + { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "Attention! The instance will be shut down and deprovisioned on . Download all your data before that date as no access past that date is possible." + ] } } - """ + } + """ Examples: | deprovision-date | deprovision-date-format | | 2030-04-09T15:04:05.999999999+07:00 | 2006-01-02T15:04:05.999999999Z07:00 | @@ -210,22 +210,22 @@ Feature: Deprovisioning notification And user "Alice" lists all notifications Then the HTTP status code of responses on each endpoint should be "200, 200" respectively And the JSON response should contain a notification message with the subject "Instance will be shut down and deprovisioned" and the message-details should match - """ - { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string", - "enum": [ - "Attention! The instance will be shut down and deprovisioned on . Download all your data before that date as no access past that date is possible." - ] - } + """ + { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "enum": [ + "Attention! The instance will be shut down and deprovisioned on . Download all your data before that date as no access past that date is possible." + ] } } - """ + } + """ Examples: | deprovision-date | deprovision-date-format | | 01/02 03:04:05PM '23 -0700 | 01/02 03:04:05PM '06 -0700 | diff --git a/tests/acceptance/features/apiNotification/notification.feature b/tests/acceptance/features/apiNotification/notification.feature index eeb736303f..57ab9792e7 100644 --- a/tests/acceptance/features/apiNotification/notification.feature +++ b/tests/acceptance/features/apiNotification/notification.feature @@ -23,108 +23,108 @@ Feature: Notification When user "Brian" lists all notifications Then the HTTP status code should be "200" And the JSON response should contain a notification message with the subject "Resource shared" and the message-details should match - """ - { - "type": "object", - "required": [ - "app", - "datetime", - "message", - "messageRich", - "messageRichParameters", - "notification_id", - "object_id", - "object_type", - "subject", - "subjectRich", - "user" - ], - "properties": { - "app": { - "type": "string", - "enum": ["userlog"] - }, - "message": { - "type": "string", - "enum": ["Alice Hansen shared with you"] - }, - "messageRich": { - "type": "string", - "enum": ["{user} shared {resource} with you"] - }, - "messageRichParameters": { - "type": "object", - "required": [ - "resource", - "user" - ], - "properties": { - "resource": { - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\$[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}![a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" - }, - "name": { - "type": "string", - "enum": [""] + """ + { + "type": "object", + "required": [ + "app", + "datetime", + "message", + "messageRich", + "messageRichParameters", + "notification_id", + "object_id", + "object_type", + "subject", + "subjectRich", + "user" + ], + "properties": { + "app": { + "type": "string", + "enum": ["userlog"] + }, + "message": { + "type": "string", + "enum": ["Alice Hansen shared with you"] + }, + "messageRich": { + "type": "string", + "enum": ["{user} shared {resource} with you"] + }, + "messageRichParameters": { + "type": "object", + "required": [ + "resource", + "user" + ], + "properties": { + "resource": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\$[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}![a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + }, + "name": { + "type": "string", + "enum": [""] + } } - } - }, - "user": { - "type": "object", - "required": [ - "displayname", - "id", - "name" - ], - "properties": { - "displayname": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "name": { - "type": "string", - "enum": ["Alice"] + }, + "user": { + "type": "object", + "required": [ + "displayname", + "id", + "name" + ], + "properties": { + "displayname": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "name": { + "type": "string", + "enum": ["Alice"] + } } } } + }, + "notification_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_type": { + "type": "string", + "enum": ["share"] + }, + "subject": { + "type": "string", + "enum": ["Resource shared"] + }, + "subjectRich": { + "type": "string", + "enum": ["Resource shared"] + }, + "user": { + "type": "string", + "enum": ["Alice"] } - }, - "notification_id": { - "type": "string" - }, - "object_id": { - "type": "string" - }, - "object_type": { - "type": "string", - "enum": ["share"] - }, - "subject": { - "type": "string", - "enum": ["Resource shared"] - }, - "subjectRich": { - "type": "string", - "enum": ["Resource shared"] - }, - "user": { - "type": "string", - "enum": ["Alice"] } } - } - """ + """ Examples: | resource | | textfile1.txt | @@ -142,108 +142,108 @@ Feature: Notification When user "Brian" lists all notifications Then the HTTP status code should be "200" And the JSON response should contain a notification message with the subject "Resource unshared" and the message-details should match - """ - { - "type": "object", - "required": [ - "app", - "datetime", - "message", - "messageRich", - "messageRichParameters", - "notification_id", - "object_id", - "object_type", - "subject", - "subjectRich", - "user" - ], - "properties": { - "app": { - "type": "string", - "enum": ["userlog"] - }, - "message": { - "type": "string", - "enum": ["Alice Hansen unshared with you"] - }, - "messageRich": { - "type": "string", - "enum": ["{user} unshared {resource} with you"] - }, - "messageRichParameters": { - "type": "object", - "required": [ - "resource", - "user" - ], - "properties": { - "resource": { - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\$[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}![a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" - }, - "name": { - "type": "string", - "enum": [""] + """ + { + "type": "object", + "required": [ + "app", + "datetime", + "message", + "messageRich", + "messageRichParameters", + "notification_id", + "object_id", + "object_type", + "subject", + "subjectRich", + "user" + ], + "properties": { + "app": { + "type": "string", + "enum": ["userlog"] + }, + "message": { + "type": "string", + "enum": ["Alice Hansen unshared with you"] + }, + "messageRich": { + "type": "string", + "enum": ["{user} unshared {resource} with you"] + }, + "messageRichParameters": { + "type": "object", + "required": [ + "resource", + "user" + ], + "properties": { + "resource": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\$[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}![a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + }, + "name": { + "type": "string", + "enum": [""] + } } - } - }, - "user": { - "type": "object", - "required": [ - "displayname", - "id", - "name" - ], - "properties": { - "displayname": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" - }, - "name": { - "type": "string", - "enum": ["Alice"] + }, + "user": { + "type": "object", + "required": [ + "displayname", + "id", + "name" + ], + "properties": { + "displayname": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + }, + "name": { + "type": "string", + "enum": ["Alice"] + } } } } + }, + "notification_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "object_type": { + "type": "string", + "enum": ["share"] + }, + "subject": { + "type": "string", + "enum": ["Resource unshared"] + }, + "subjectRich": { + "type": "string", + "enum": ["Resource unshared"] + }, + "user": { + "type": "string", + "enum": ["Alice"] } - }, - "notification_id": { - "type": "string" - }, - "object_id": { - "type": "string" - }, - "object_type": { - "type": "string", - "enum": ["share"] - }, - "subject": { - "type": "string", - "enum": ["Resource unshared"] - }, - "subjectRich": { - "type": "string", - "enum": ["Resource unshared"] - }, - "user": { - "type": "string", - "enum": ["Alice"] } } - } - """ + """ Examples: | resource | | textfile1.txt | diff --git a/tests/acceptance/features/apiReshare/resharing.feature b/tests/acceptance/features/apiReshare/resharing.feature index 16e3269ab4..8dbd492f70 100644 --- a/tests/acceptance/features/apiReshare/resharing.feature +++ b/tests/acceptance/features/apiReshare/resharing.feature @@ -59,7 +59,7 @@ Feature: re-share resources Scenario Outline: try to re-share file Given user "Alice" has uploaded file with content "other data" to "/textfile1.txt" - Given using DAV path + And using DAV path And user "Alice" has sent the following resource share invitation: | resource | textfile1.txt | | space | Personal | diff --git a/tests/acceptance/features/apiSearch1/dateSearch.feature b/tests/acceptance/features/apiSearch1/dateSearch.feature index 9f74ebc5ed..cd6505ae18 100644 --- a/tests/acceptance/features/apiSearch1/dateSearch.feature +++ b/tests/acceptance/features/apiSearch1/dateSearch.feature @@ -5,6 +5,7 @@ Feature: date search Background: Given user "Alice" has been created with default attributes and without skeleton files + Scenario Outline: search resources using different dav path Given using DAV path And user "Alice" has created folder "uploadFolder" diff --git a/tests/acceptance/features/apiSearch1/search.feature b/tests/acceptance/features/apiSearch1/search.feature index bbd15fa02d..92b5a12635 100644 --- a/tests/acceptance/features/apiSearch1/search.feature +++ b/tests/acceptance/features/apiSearch1/search.feature @@ -183,7 +183,6 @@ Feature: Search | new | | spaces | - @skipOnStable3.0 Scenario Outline: search files inside the folder Given using DAV path diff --git a/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature b/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature index d19ecb7df8..8556d9a8d2 100644 --- a/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature +++ b/tests/acceptance/features/apiSharingNg/enableDisableShareSync.feature @@ -25,32 +25,32 @@ Feature: enable or disable sync of incoming shares When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@client.synchronize" - ], - "properties": { - "@client.synchronize": { - "const": false + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@client.synchronize" + ], + "properties": { + "@client.synchronize": { + "const": false + } } } } } } - } - """ + """ Examples: | resource | | textfile0.txt | @@ -70,19 +70,19 @@ Feature: enable or disable sync of incoming shares When user "Brian" enables sync of share "" offered by "Alice" from "Personal" space using the Graph API Then the HTTP status code should be "201" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "@client.synchronize" - ], - "properties": { - "@client.synchronize": { - "const": true - } + """ + { + "type": "object", + "required": [ + "@client.synchronize" + ], + "properties": { + "@client.synchronize": { + "const": true } } - """ + } + """ Examples: | resource | | textfile0.txt | @@ -201,32 +201,32 @@ Feature: enable or disable sync of incoming shares When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@client.synchronize" - ], - "properties": { - "@client.synchronize": { - "const": false + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@client.synchronize" + ], + "properties": { + "@client.synchronize": { + "const": false + } } } } } } - } - """ + """ Examples: | resource | | textfile0.txt | @@ -857,7 +857,7 @@ Feature: enable or disable sync of incoming shares @issue-8876 Scenario Outline: try to enable sync of already synced share shared from Project space - When the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "NewSpace" with the default quota using the Graph API And user "Alice" has created a folder "FolderToShare" in space "NewSpace" And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt" diff --git a/tests/acceptance/features/apiSharingNg/listPermissions.feature b/tests/acceptance/features/apiSharingNg/listPermissions.feature index 345053f28e..494c534db1 100644 --- a/tests/acceptance/features/apiSharingNg/listPermissions.feature +++ b/tests/acceptance/features/apiSharingNg/listPermissions.feature @@ -779,47 +779,196 @@ Feature: List a sharing permissions When user "Alice" gets permissions list for folder "folder" of the space "new-space" using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "@libre.graph.permissions.actions.allowedValues", - "@libre.graph.permissions.roles.allowedValues" - ], - "properties": { - "@libre.graph.permissions.actions.allowedValues": { - "type": "array", - "enum": [ - [ - "libre.graph/driveItem/permissions/create", - "libre.graph/driveItem/children/create", - "libre.graph/driveItem/standard/delete", - "libre.graph/driveItem/path/read", - "libre.graph/driveItem/quota/read", - "libre.graph/driveItem/content/read", - "libre.graph/driveItem/upload/create", - "libre.graph/driveItem/permissions/read", - "libre.graph/driveItem/children/read", - "libre.graph/driveItem/versions/read", - "libre.graph/driveItem/deleted/read", - "libre.graph/driveItem/path/update", - "libre.graph/driveItem/permissions/delete", - "libre.graph/driveItem/deleted/delete", - "libre.graph/driveItem/versions/update", - "libre.graph/driveItem/deleted/update", - "libre.graph/driveItem/basic/read", - "libre.graph/driveItem/permissions/update", - "libre.graph/driveItem/permissions/deny" + """ + { + "type": "object", + "required": [ + "@libre.graph.permissions.actions.allowedValues", + "@libre.graph.permissions.roles.allowedValues" + ], + "properties": { + "@libre.graph.permissions.actions.allowedValues": { + "type": "array", + "enum": [ + [ + "libre.graph/driveItem/permissions/create", + "libre.graph/driveItem/children/create", + "libre.graph/driveItem/standard/delete", + "libre.graph/driveItem/path/read", + "libre.graph/driveItem/quota/read", + "libre.graph/driveItem/content/read", + "libre.graph/driveItem/upload/create", + "libre.graph/driveItem/permissions/read", + "libre.graph/driveItem/children/read", + "libre.graph/driveItem/versions/read", + "libre.graph/driveItem/deleted/read", + "libre.graph/driveItem/path/update", + "libre.graph/driveItem/permissions/delete", + "libre.graph/driveItem/deleted/delete", + "libre.graph/driveItem/versions/update", + "libre.graph/driveItem/deleted/update", + "libre.graph/driveItem/basic/read", + "libre.graph/driveItem/permissions/update", + "libre.graph/driveItem/permissions/deny" + ] ] - ] - }, - "@libre.graph.permissions.roles.allowedValues": { - "type": "array", - "minItems": 4, - "maxItems": 4, - "uniqueItems": true, - "items": { - "oneOf":[ + }, + "@libre.graph.permissions.roles.allowedValues": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "uniqueItems": true, + "items": { + "oneOf":[ + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 1 + }, + "description": { + "const": "View only documents, images and PDFs. Watermarks will be applied." + }, + "displayName": { + "const": "Can view (secure)" + }, + "id": { + "const": "aa97fe03-7980-45ac-9e50-b325749fd7e6" + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 2 + }, + "description": { + "const": "View and download." + }, + "displayName": { + "const": "Can view" + }, + "id": { + "const": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 3 + }, + "description": { + "const": "View, download and upload." + }, + "displayName": { + "const": "Can upload" + }, + "id": { + "const": "1c996275-f1c9-4e71-abdf-a42f6495e960" + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 4 + }, + "description": { + "const": "View, download, upload, edit, add and delete." + }, + "displayName": { + "const": "Can edit" + }, + "id": { + "const": "fb6c3e19-e378-47e5-b277-9732f9de6e21" + } + } + } + ] + } + } + } + } + """ + + @issues-8331 + Scenario: user lists permissions of a file in project space + Given using spaces DAV path + And the administrator has assigned the role "Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "new-space" with the default quota using the Graph API + And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile0.txt" + When user "Alice" gets permissions list for folder "textfile0.txt" of the space "new-space" using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "@libre.graph.permissions.actions.allowedValues", + "@libre.graph.permissions.roles.allowedValues" + ], + "properties": { + "@libre.graph.permissions.actions.allowedValues": { + "type": "array", + "enum": [ + [ + "libre.graph/driveItem/permissions/create", + "libre.graph/driveItem/children/create", + "libre.graph/driveItem/standard/delete", + "libre.graph/driveItem/path/read", + "libre.graph/driveItem/quota/read", + "libre.graph/driveItem/content/read", + "libre.graph/driveItem/upload/create", + "libre.graph/driveItem/permissions/read", + "libre.graph/driveItem/children/read", + "libre.graph/driveItem/versions/read", + "libre.graph/driveItem/deleted/read", + "libre.graph/driveItem/path/update", + "libre.graph/driveItem/permissions/delete", + "libre.graph/driveItem/deleted/delete", + "libre.graph/driveItem/versions/update", + "libre.graph/driveItem/deleted/update", + "libre.graph/driveItem/basic/read", + "libre.graph/driveItem/permissions/update", + "libre.graph/driveItem/permissions/deny" + ] + ] + }, + "@libre.graph.permissions.roles.allowedValues": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "uniqueItems": true, + "items": { + "oneOf":[ { "type": "object", "required": [ @@ -843,207 +992,58 @@ Feature: List a sharing permissions } } }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 2 - }, - "description": { - "const": "View and download." - }, - "displayName": { - "const": "Can view" - }, - "id": { - "const": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 2 + }, + "description": { + "const": "View and download." + }, + "displayName": { + "const": "Can view" + }, + "id": { + "const": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" + } + } + }, + { + "type": "object", + "required": [ + "@libre.graph.weight", + "description", + "displayName", + "id" + ], + "properties": { + "@libre.graph.weight": { + "const": 3 + }, + "description": { + "const": "View, download and edit." + }, + "displayName": { + "const": "Can edit" + }, + "id": { + "const": "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a" + } } } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 3 - }, - "description": { - "const": "View, download and upload." - }, - "displayName": { - "const": "Can upload" - }, - "id": { - "const": "1c996275-f1c9-4e71-abdf-a42f6495e960" - } - } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 4 - }, - "description": { - "const": "View, download, upload, edit, add and delete." - }, - "displayName": { - "const": "Can edit" - }, - "id": { - "const": "fb6c3e19-e378-47e5-b277-9732f9de6e21" - } - } - } - ] - } - } - } - } - """ - - @issues-8331 - Scenario: user lists permissions of a file in project space - Given using spaces DAV path - And the administrator has assigned the role "Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "new-space" with the default quota using the Graph API - And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile0.txt" - When user "Alice" gets permissions list for folder "textfile0.txt" of the space "new-space" using the Graph API - Then the HTTP status code should be "200" - And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "@libre.graph.permissions.actions.allowedValues", - "@libre.graph.permissions.roles.allowedValues" - ], - "properties": { - "@libre.graph.permissions.actions.allowedValues": { - "type": "array", - "enum": [ - [ - "libre.graph/driveItem/permissions/create", - "libre.graph/driveItem/children/create", - "libre.graph/driveItem/standard/delete", - "libre.graph/driveItem/path/read", - "libre.graph/driveItem/quota/read", - "libre.graph/driveItem/content/read", - "libre.graph/driveItem/upload/create", - "libre.graph/driveItem/permissions/read", - "libre.graph/driveItem/children/read", - "libre.graph/driveItem/versions/read", - "libre.graph/driveItem/deleted/read", - "libre.graph/driveItem/path/update", - "libre.graph/driveItem/permissions/delete", - "libre.graph/driveItem/deleted/delete", - "libre.graph/driveItem/versions/update", - "libre.graph/driveItem/deleted/update", - "libre.graph/driveItem/basic/read", - "libre.graph/driveItem/permissions/update", - "libre.graph/driveItem/permissions/deny" ] - ] - }, - "@libre.graph.permissions.roles.allowedValues": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "uniqueItems": true, - "items": { - "oneOf":[ - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 1 - }, - "description": { - "const": "View only documents, images and PDFs. Watermarks will be applied." - }, - "displayName": { - "const": "Can view (secure)" - }, - "id": { - "const": "aa97fe03-7980-45ac-9e50-b325749fd7e6" - } - } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 2 - }, - "description": { - "const": "View and download." - }, - "displayName": { - "const": "Can view" - }, - "id": { - "const": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" - } - } - }, - { - "type": "object", - "required": [ - "@libre.graph.weight", - "description", - "displayName", - "id" - ], - "properties": { - "@libre.graph.weight": { - "const": 3 - }, - "description": { - "const": "View, download and edit." - }, - "displayName": { - "const": "Can edit" - }, - "id": { - "const": "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a" - } - } - } - ] + } } } } - } - """ + """ @issues-8331 Scenario: user sends share invitation with all allowed roles for a file diff --git a/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature b/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature index c9549aa033..113f3cc7e9 100644 --- a/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature +++ b/tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature @@ -92,7 +92,6 @@ Feature: Remove access to a drive | Space Editor | 403 | should | | Manager | 204 | should not | - @issue-8819 Scenario Outline: user removes himself from the project space Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API diff --git a/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature b/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature index 27391a9d2c..4012c91505 100644 --- a/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature +++ b/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature @@ -214,4 +214,4 @@ Feature: Remove access to a drive item | permissions-role | | Space Viewer | | Space Editor | - | Manager | \ No newline at end of file + | Manager | \ No newline at end of file diff --git a/tests/acceptance/features/apiSharingNg/sharedByMe.feature b/tests/acceptance/features/apiSharingNg/sharedByMe.feature index bcfa15e0ee..beefc9a65c 100644 --- a/tests/acceptance/features/apiSharingNg/sharedByMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedByMe.feature @@ -23,116 +23,116 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ Examples: | permissions-role | | File Editor | @@ -152,116 +152,116 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "path": { - "type": "string", - "enum": ["/FolderToShare"] - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "path": { + "type": "string", + "enum": ["/FolderToShare"] + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ Scenario Outline: sharer lists the folder share (Personal space) @@ -275,109 +275,109 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "FolderToShare" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] } - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] } } - } - """ + """ Examples: | permissions-role | | Editor | @@ -403,220 +403,220 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ And the JSON data of the response should contain resource "FolderToShare" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] } - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] } } - } - """ + """ Scenario: sharer lists the file and folder shares shared to group (Personal space) @@ -844,116 +844,116 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ Examples: | permissions-role | | File Editor | @@ -976,116 +976,116 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "path": { - "type": "string", - "enum": ["/FolderToShare"] - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "path": { + "type": "string", + "enum": ["/FolderToShare"] + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ Scenario Outline: sharer lists the folder share (Project space) @@ -1102,109 +1102,109 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "FolderToShare" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] } - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] } } - } - """ + """ Examples: | permissions-role | | Editor | @@ -1233,220 +1233,220 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["textfile.txt"] + }, + "size": { + "type": "number", + "enum": [ + 11 + ] } - }, - "name": { - "type": "string", - "enum": ["textfile.txt"] - }, - "size": { - "type": "number", - "enum": [ - 11 - ] } } - } - """ + """ And the JSON data of the response should contain resource "FolderToShare" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "path": { - "type": "string", - "enum": ["/"] - }, - "name": { - "type": "string", - "enum": ["/"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Brian Murphy" - ] - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "path": { + "type": "string", + "enum": ["/"] + }, + "name": { + "type": "string", + "enum": ["/"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Brian Murphy" + ] + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "type": "string", + "enum": ["FolderToShare"] } - }, - "name": { - "type": "string", - "enum": ["FolderToShare"] } } - } - """ + """ Scenario: sharer lists the file and folder shares shared to group (Project space) @@ -1471,196 +1471,196 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name", - "size" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "const": "project" - }, - "path": { - "const": "/" - }, - "name": { - "const": "/" - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name", + "size" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties": { - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" - }, - "displayName": { - "const": "grp1" - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "const": "project" + }, + "path": { + "const": "/" + }, + "name": { + "const": "/" }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + }, + "displayName": { + "const": "grp1" + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "const": "textfile.txt" } - }, - "name": { - "const": "textfile.txt" } } - } - """ + """ And the JSON data of the response should contain resource "FolderToShare" with the following data: - """ - { - "type": "object", - "required": [ - "parentReference", - "permissions", - "name" - ], - "properties": { - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "path", - "name", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "const": "project" - }, - "path": { - "const": "/" - }, - "name": { - "const": "/" - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "parentReference", + "permissions", + "name" + ], + "properties": { + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "roles" + "driveId", + "driveType", + "path", + "name", + "id" ], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties": { - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "const": "grp1" - } - } - } - } + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "const": "project" + }, + "path": { + "const": "/" + }, + "name": { + "const": "/" }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + "pattern": "^%file_id_pattern%$" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties": { + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "const": "grp1" + } + } + } + } + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "name": { + "const": "FolderToShare" } - }, - "name": { - "const": "FolderToShare" } } - } - """ + """ @env-config Scenario: sharer lists the file share after sharee (user) is deleted (Personal space) @@ -1677,21 +1677,21 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her after clearing user cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems":0, - "maxItems":0 + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems":0, + "maxItems":0 + } } } - } - """ + """ @env-config Scenario: sharer lists the file share after sharee (group) is deleted (Personal space) @@ -1709,21 +1709,21 @@ Feature: resources shared by user When user "Alice" lists the shares shared by her after clearing group cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems":0, - "maxItems":0 + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems":0, + "maxItems":0 + } } } - } - """ + """ @env-config Scenario: sharer lists the file share after sharee is disabled (Personal space) diff --git a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature index 27a08ed4a8..27cedc87b6 100755 --- a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature @@ -23,292 +23,292 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him after clearing user cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden": { - "type": "boolean", - "enum": [false] - }, - "@client.synchronize": { - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/plain"] + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "textfile0.txt" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["virtual"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "textfile0.txt" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["virtual"] + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + } } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "id", + "displayName" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Alice Hansen" + ] + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "pattern": "text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "textfile0.txt" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "object", "required": [ + "grantedToV2", "id", - "displayName" + "invitation", + "roles" ], "properties": { "id": { "type": "string", - "pattern": "^%user_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" }, - "displayName": { - "type": "string", - "enum": [ - "Alice Hansen" - ] - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "pattern": "text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "textfile0.txt" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "invitation": { - "type": "object", - "properties": { - "invitedBy": { - "type": "object", - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] - } - }, - "required": [ - "user" - ] - } }, - "required": [ - "invitedBy" - ] - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + "invitation": { + "type": "object", + "properties": { + "invitedBy": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + }, + "required": [ + "user" + ] + } + }, + "required": [ + "invitedBy" + ] + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } } } + }, + "size": { + "type": "number", + "enum": [11] } - }, - "size": { - "type": "number", - "enum": [11] } } } } } - } - """ + """ Examples: | permissions-role | | File Editor | @@ -327,268 +327,269 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden": { - "type": "boolean", - "enum": [false] - }, - "@client.synchronize": { - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden": { + "type": "boolean", + "enum": [false] + }, + "@client.synchronize": { + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "type": "object", - "required": [], - "properties": {} - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "folder" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["virtual"] - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "type": "object", + "required": [], + "properties": {} + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "folder" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["virtual"] + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + } } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "id", + "displayName" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Alice Hansen" + ] + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "folder" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "driveType": { + "type": "string", + "enum": ["personal"] + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "object", "required": [ + "grantedToV2", "id", - "displayName" + "invitation", + "roles" ], "properties": { "id": { "type": "string", - "pattern": "^%user_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" }, - "displayName": { - "type": "string", - "enum": [ - "Alice Hansen" - ] - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/plain"] - } - } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "folder" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType": { - "type": "string", - "enum": ["personal"] - } - } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] - } - } - }, - "invitation": { - "type": "object", - "properties": { - "invitedBy": { - "type": "object", - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] }, - "required": [ - "displayName", - "id" - ] - } - }, - "required": [ - "user" - ] + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } } }, - "required": [ - "invitedBy" - ] - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + "invitation": { + "type": "object", + "properties": { + "invitedBy": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + }, + "required": [ + "user" + ] + } + }, + "required": [ + "invitedBy" + ] + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -600,8 +601,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ Examples: | permissions-role | | Editor | @@ -623,282 +623,282 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "type": "boolean", - "enum": [false] - }, - "@client.synchronize":{ - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/plain"] - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "textfile0.txt" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "type": "string", - "enum": ["virtual"] - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "id", - "displayName" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Alice Hansen" - ] - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/plain"] - } - } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "textfile0.txt" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "type": "string", - "enum": ["personal"] - } - } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "type": "boolean", + "enum": [false] + }, + "@client.synchronize":{ + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], + "required": ["displayName", "id"], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } + "pattern": "^%user_id_pattern%$" } } } - }, - "size": { - "enum": [ - 5 - ] } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "textfile0.txt" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "type": "string", + "enum": ["virtual"] + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "id", + "displayName" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "type": "string", + "enum": [ + "Alice Hansen" + ] + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/plain"] + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "textfile0.txt" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" + }, + "driveType" : { + "type": "string", + "enum": ["personal"] + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + }, + "size": { + "enum": [ + 5 + ] + } + } + }, + "size": { + "enum": [ + 5 + ] } - }, - "size": { - "enum": [ - 5 - ] } } } } } - } - """ + """ Scenario: sharee lists the folder share received via group invitation (Personal space) @@ -916,217 +916,218 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "type": "boolean", - "enum": [false] - }, - "@client.synchronize":{ - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "type": "string", - "enum": ["virtual"] - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "createdBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["id", "displayName"], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "const": "Alice Hansen" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "personal" - } - } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "type": "boolean", + "enum": [false] + }, + "@client.synchronize":{ + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], + "required": ["displayName", "id"], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } + "displayName": { + "const": "Alice Hansen" }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "type": "string", + "enum": ["virtual"] + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { "type": "object", - "required": ["invitedBy"], + "required": ["id", "displayName"], "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + }, + "displayName": { + "const": "Alice Hansen" + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" + }, + "driveType" : { + "const": "personal" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -1138,8 +1139,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ Scenario: sharee list the same file shares received via user and group invitation (Personal space) @@ -1162,355 +1162,355 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "type": "boolean", - "enum": [false] - }, - "@client.synchronize":{ - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "type": "string", - "enum": ["virtual"] - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "createdBy": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "id", - "displayName" - ], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "type": "string", - "enum": [ - "Alice Hansen" - ] - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "type": "string", - "enum": ["personal"] - } - } - }, - "permissions": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": [ - "invitedBy" - ], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "type": "boolean", + "enum": [false] + }, + "@client.synchronize":{ + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] }, - { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "type": "string", + "enum": ["virtual"] + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "createdBy": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { "type": "object", "required": [ - "grantedToV2", "id", - "invitation", - "roles" + "displayName" ], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%user_id_pattern%$" }, - "invitation": { - "type": "object", - "required": [ - "invitedBy" - ], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } + "displayName": { + "type": "string", + "enum": [ + "Alice Hansen" + ] } } } - ] + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" + }, + "driveType" : { + "type": "string", + "enum": ["personal"] + } + } + }, + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": [ + "invitedBy" + ], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": [ + "invitedBy" + ], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + ] + } + }, + "size": { + "const": 5 } - }, - "size": { - "const": 5 } + }, + "size": { + "const": 5 } - }, - "size": { - "const": 5 } } } } } - } - """ + """ Scenario: sharee list the same folder shares received via user and group invitation (Personal space) @@ -1533,317 +1533,318 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "type": "boolean", - "enum": [false] - }, - "@client.synchronize":{ - "type": "boolean", - "enum": [true] - }, - "createdBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "folder" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "type": "string", - "enum": ["virtual"] - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "createdBy", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "createdBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["id", "displayName"], - "properties": { - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - }, - "displayName": { - "const": "Alice Hansen" - } - } - } - } - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": {}, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "type": "string", - "enum": [ - "folder" - ] - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "personal" - } - } - }, - "permissions": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["grp1"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": [ - "invitedBy" - ], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "type": "boolean", + "enum": [false] + }, + "@client.synchronize":{ + "type": "boolean", + "enum": [true] + }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" }, - { + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "folder" + ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "type": "string", + "enum": ["virtual"] + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" + } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], + "required": ["id", "displayName"], "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Brian Murphy"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, "id": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%user_id_pattern%$" }, - "invitation": { - "type": "object", - "required": [ - "invitedBy" - ], - "properties": { - "user":{ - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } + "displayName": { + "const": "Alice Hansen" } } } + } + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": {}, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "type": "string", + "enum": [ + "folder" ] + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" + }, + "driveType" : { + "const": "personal" + } + } + }, + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["grp1"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": [ + "invitedBy" + ], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Brian Murphy"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": [ + "invitedBy" + ], + "properties": { + "user":{ + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + ] + } } } } @@ -1852,8 +1853,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ Scenario: sharee lists the same name file shares received from different users (Personal space) @@ -2453,60 +2453,60 @@ Feature: an user gets the resources shared to them When user "Alice" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 4, - "minItems": 4, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": ["name"], - "properties": { - "name": { - "const": "folder" + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 4, + "minItems": 4, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "folder" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "folder (1)" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "textfile.txt" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "textfile (1).txt" + } } } - }, - { - "type": "object", - "required": ["name"], - "properties": { - "name": { - "const": "folder (1)" - } - } - }, - { - "type": "object", - "required": ["name"], - "properties": { - "name": { - "const": "textfile.txt" - } - } - }, - { - "type": "object", - "required": ["name"], - "properties": { - "name": { - "const": "textfile (1).txt" - } - } - } - ] + ] + } } } } - } - """ + """ @issue-8027 @issue-8314 Scenario Outline: sharee lists the file share (Project space) @@ -2523,218 +2523,218 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "type": "boolean", - "enum": [false] - }, - "@client.synchronize":{ - "type": "boolean", - "enum": [true] - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "pattern": "^text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "testfile.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "type": "string", - "enum": ["virtual"] - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "pattern": "^text/plain" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "type": "boolean", + "enum": [false] + }, + "@client.synchronize":{ + "type": "boolean", + "enum": [true] + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "pattern": "^text/plain" } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "testfile.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType" : { - "const": "project" - } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "testfile.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "type": "string", + "enum": ["virtual"] + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "pattern": "^text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "testfile.txt" + }, + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "invitation", - "roles" + "driveId", + "driveType" ], "properties": { - "id": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%file_id_pattern%$" }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern":"^%user_id_pattern%$" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern":"^%user_id_pattern%$" + } } } } - } - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "invitedBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } } } - } - }, - "roles": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "size": { + "const": 12 } - }, - "size": { - "const": 12 } + }, + "size": { + "const": 12 } - }, - "size": { - "const": 12 } } } } } - } - """ + """ Examples: | permissions-role | | File Editor | @@ -2756,186 +2756,187 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType" : { - "const": "project" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "invitation", - "roles" + "driveId", + "driveType" ], "properties": { - "id": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%file_id_pattern%$" }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "const": "Brian Murphy" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern":"^%user_id_pattern%$" + } }, - "id": { - "type": "string", - "pattern":"^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] + "required": [ + "displayName", + "id" + ] + } } - } - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "invitedBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } } } - } - }, - "roles": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -2947,8 +2948,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ Examples: | permissions-role | | Editor | @@ -2972,203 +2972,203 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": ["driveId", "driveType"], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "project" - } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], + "required": ["mimeType"], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { + "mimeType": { + "const": "text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType"], + "properties": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "%space_id_pattern%" }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "size": { + "const": 11 } - }, - "size": { - "const": 11 } + }, + "size": { + "const": 11 } - }, - "size": { - "const": 11 } } } } } - } - """ + """ Scenario: sharee lists the folder share received via group invitation (Project space) @@ -3187,168 +3187,169 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "project" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "invitation", - "roles" + "driveId", + "driveType" ], "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "%space_id_pattern%" }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "roles": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -3360,8 +3361,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ Scenario: sharee list the same file shares received via user and group invitation (Project space) @@ -3386,274 +3386,274 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "const": "text/plain" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "textfile0.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "project" - } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } - }, - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties":{ - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" } - ] + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "textfile0.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" + }, + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties":{ + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + } + ] + } + }, + "size": { + "const": 11 } - }, - "size": { - "const": 11 } + }, + "size": { + "const": 11 } - }, - "size": { - "const": 11 } } } } } - } - """ + """ Scenario: sharee list the same folder shares received via user and group invitation (Project space) @@ -3678,244 +3678,245 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "%space_id_pattern%" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "%space_id_pattern%" - }, - "driveType" : { - "const": "project" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "%space_id_pattern%" } - }, - "permissions": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["group"], - "properties":{ - "group": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" - } - } - } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "%space_id_pattern%" }, - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "invitation", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties":{ - "user": { - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["group"], + "properties":{ + "group": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "user":{ - "type": "object", - "required": ["displayName", "id"], - "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } - } - } - } - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } + } + } + }, + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties":{ + "user": { + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "user":{ + "type": "object", + "required": ["displayName", "id"], + "properties": { + "displayName": { + "const": "Alice Hansen" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - ] + ] + } } } } @@ -3924,8 +3925,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ @issue-8471 Scenario: sharee lists the same name file and folder shares received from different projects (Project space) @@ -4032,19 +4032,19 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "minItems":0, - "maxItems":0 + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "minItems":0, + "maxItems":0 + } } } - } - """ + """ Scenario: sharee lists the folder share after sharer is deleted (Personal space) @@ -4059,21 +4059,21 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "minItems": 0, - "maxItems": 0 + """ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "minItems": 0, + "maxItems": 0 + } } } - } - """ + """ Scenario: sharee lists the file share after the sharer is disabled (Personal space) @@ -4269,186 +4269,187 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him after clearing user cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "folder", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "folder": { - "const": {} - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "folder" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType" : { - "const": "project" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "^%file_id_pattern%$" } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "folder": { + "const": {} + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "folder" + }, + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "invitation", - "roles" + "driveId", + "driveType" ], "properties": { - "id": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%file_id_pattern%$" }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "const": "Brian Murphy" + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern":"^%user_id_pattern%$" + } }, - "id": { - "type": "string", - "pattern":"^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] + "required": [ + "displayName", + "id" + ] + } } - } - }, - "invitation": { - "type": "object", - "required": ["invitedBy"], - "properties": { - "invitedBy": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } } } - } - }, - "roles": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } @@ -4460,8 +4461,7 @@ Feature: an user gets the resources shared to them } } } - } - """ + """ @env-config @issue-8314 Scenario: sharee lists the file share with after sharer is deleted (Project space) @@ -4480,224 +4480,224 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him after clearing user cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden", - "@client.synchronize", - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "remoteItem", - "size" - ], - "properties": { - "@UI.Hidden":{ - "const": false - }, - "@client.synchronize":{ - "const": true - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "pattern": "^text/plain" - } - } - }, - "id": { - "type": "string", - "pattern": "^%share_id_pattern%$" - }, - "name": { - "const": "testfile.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType", - "id" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%space_id_pattern%$" - }, - "driveType" : { - "const": "virtual" - }, - "id" : { - "type": "string", - "pattern": "^%file_id_pattern%$" - } - } - }, - "remoteItem": { - "type": "object", - "required": [ - "eTag", - "file", - "id", - "lastModifiedDateTime", - "name", - "parentReference", - "permissions", - "size" - ], - "properties": { - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" - }, - "file": { - "type": "object", - "required": ["mimeType"], - "properties": { - "mimeType": { - "type": "string", - "pattern": "^text/plain" - } + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden", + "@client.synchronize", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "remoteItem", + "size" + ], + "properties": { + "@UI.Hidden":{ + "const": false + }, + "@client.synchronize":{ + "const": true + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "pattern": "^text/plain" } - }, - "id": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "name": { - "const": "testfile.txt" - }, - "parentReference": { - "type": "object", - "required": [ - "driveId", - "driveType" - ], - "properties": { - "driveId": { - "type": "string", - "pattern": "^%file_id_pattern%$" - }, - "driveType" : { - "const": "project" - } + } + }, + "id": { + "type": "string", + "pattern": "^%share_id_pattern%$" + }, + "name": { + "const": "testfile.txt" + }, + "parentReference": { + "type": "object", + "required": [ + "driveId", + "driveType", + "id" + ], + "properties": { + "driveId": { + "type": "string", + "pattern": "^%space_id_pattern%$" + }, + "driveType" : { + "const": "virtual" + }, + "id" : { + "type": "string", + "pattern": "^%file_id_pattern%$" } - }, - "permissions": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { + } + }, + "remoteItem": { + "type": "object", + "required": [ + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", + "permissions", + "size" + ], + "properties": { + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "type": "string", + "pattern": "^text/plain" + } + } + }, + "id": { + "type": "string", + "pattern": "^%file_id_pattern%$" + }, + "name": { + "const": "testfile.txt" + }, + "parentReference": { "type": "object", "required": [ - "grantedToV2", - "id", - "invitation" + "driveId", + "driveType" ], "properties": { - "id": { + "driveId": { "type": "string", - "pattern": "^%permissions_id_pattern%$" + "pattern": "^%file_id_pattern%$" }, - "grantedToV2": { - "type": "object", - "required": ["user"], - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern":"^%user_id_pattern%$" - } - }, - "required": [ - "displayName", - "id" - ] - } - } - }, - "invitation": { - "type": "object", - "properties": { - "invitedBy": { - "type": "object", - "properties": { - "user": { - "type": "object", - "properties": { - "displayName": { - "const": "" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" - } + "driveType" : { + "const": "project" + } + } + }, + "permissions": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "grantedToV2", + "id", + "invitation" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^%permissions_id_pattern%$" + }, + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "const": "Brian Murphy" }, - "required": [ - "displayName", - "id" - ] - } - }, - "required": [ - "user" - ] + "id": { + "type": "string", + "pattern":"^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } } }, - "required": [ - "invitedBy" - ] - }, - "roles": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "string", - "pattern": "^%role_id_pattern%$" + "invitation": { + "type": "object", + "properties": { + "invitedBy": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "displayName": { + "const": "" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } + }, + "required": [ + "displayName", + "id" + ] + } + }, + "required": [ + "user" + ] + } + }, + "required": [ + "invitedBy" + ] + }, + "roles": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } + }, + "size": { + "const": 12 } - }, - "size": { - "const": 12 } + }, + "size": { + "const": 12 } - }, - "size": { - "const": 12 } } } } } - } - """ + """ Scenario: sharee lists the folder share after the sharer is disabled (Project space) @@ -4874,17 +4874,17 @@ Feature: an user gets the resources shared to them When user "Brian" hides the shared resource "" using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["@UI.Hidden"], - "properties": { - "@UI.Hidden": { - "const": true + """ + { + "type": "object", + "required": ["@UI.Hidden"], + "properties": { + "@UI.Hidden": { + "const": true + } } } - } - """ + """ Examples: | resource | | testfile.txt | @@ -4906,17 +4906,17 @@ Feature: an user gets the resources shared to them When user "Brian" hides the shared resource "" using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["@UI.Hidden"], - "properties": { - "@UI.Hidden": { - "const": true + """ + { + "type": "object", + "required": ["@UI.Hidden"], + "properties": { + "@UI.Hidden": { + "const": true + } } } - } - """ + """ Examples: | resource | | testfile.txt | @@ -4936,30 +4936,30 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden" - ], - "properties": { - "@UI.Hidden":{ - "const": true + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden" + ], + "properties": { + "@UI.Hidden":{ + "const": true + } } } } } } - } - """ + """ Examples: | resource | | testfile.txt | @@ -4982,30 +4982,30 @@ Feature: an user gets the resources shared to them When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": ["value"], - "properties": { - "value": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "@UI.Hidden" - ], - "properties": { - "@UI.Hidden":{ - "const": true + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "@UI.Hidden" + ], + "properties": { + "@UI.Hidden":{ + "const": true + } } } } } } - } - """ + """ Examples: | resource | | testfile.txt | diff --git a/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature b/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature index b2c597005b..5fa771a8b3 100644 --- a/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature +++ b/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature @@ -769,6 +769,7 @@ Feature: Create a share link for a resource """ And the public should be able to download file "textfile1.txt" from the last link share with password "%public%" and the content should be "other data" + Scenario: update password of a file's link share using permissions endpoint Given user "Alice" has uploaded file with content "other data" to "textfile1.txt" And user "Alice" has created the following resource link share: diff --git a/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature b/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature index 04223e7bfb..e6d9ace64d 100644 --- a/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature +++ b/tests/acceptance/features/apiSharingNgShareInvitation/updateShareInvitations.feature @@ -26,60 +26,60 @@ Feature: Update permission of a share | expirationDateTime | 2200-07-15T14:00:00Z | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Scenario Outline: user removes expiration date of a share @@ -98,55 +98,55 @@ Feature: Update permission of a share | expirationDateTime | | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | resource | | testfile.txt | @@ -168,55 +168,55 @@ Feature: Update permission of a share | resource | | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | resource | new-permissions-role | | Viewer | textfile1.txt | File Editor | @@ -243,55 +243,55 @@ Feature: Update permission of a share | space | NewSpace | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -320,55 +320,55 @@ Feature: Update permission of a share | resource | | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^%permissions_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^%permissions_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | resource | | Viewer | File Editor | textfile1.txt | @@ -402,55 +402,55 @@ Feature: Update permission of a share | sharee | grp1 | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -482,55 +482,55 @@ Feature: Update permission of a share | sharee | grp1 | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | | Space Viewer | @@ -562,60 +562,60 @@ Feature: Update permission of a share | sharee | grp1 | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | | Space Viewer | @@ -645,55 +645,55 @@ Feature: Update permission of a share | sharee | grp1 | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -726,60 +726,60 @@ Feature: Update permission of a share | sharee | grp1 | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "group" - ], - "properties":{ - "group": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "grp1" - }, - "id": { - "type": "string", - "pattern": "^%group_id_pattern%$" + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "group" + ], + "properties":{ + "group": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "grp1" + }, + "id": { + "type": "string", + "pattern": "^%group_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^g:%group_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^g:%group_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -807,55 +807,55 @@ Feature: Update permission of a share | sharee | Brian | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -883,55 +883,55 @@ Feature: Update permission of a share | sharee | Brian | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | | Space Viewer | @@ -960,60 +960,60 @@ Feature: Update permission of a share | sharee | Brian | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -1042,55 +1042,55 @@ Feature: Update permission of a share | sharee | Brian | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "grantedToV2", - "id", - "roles" - ], - "properties": { - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "grantedToV2", + "id", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | @@ -1119,60 +1119,60 @@ Feature: Update permission of a share | sharee | Brian | Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "expirationDateTime", - "grantedToV2", - "id", - "roles" - ], - "properties": { - "expirationDateTime": { - "type": "string", - "enum": ["2200-07-15T14:00:00Z"] - }, - "grantedToV2": { - "type": "object", - "required": [ - "user" - ], - "properties":{ - "user": { - "type": "object", - "required": [ - "displayName", - "id" - ], - "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%user_id_pattern%$" + """ + { + "type": "object", + "required": [ + "expirationDateTime", + "grantedToV2", + "id", + "roles" + ], + "properties": { + "expirationDateTime": { + "type": "string", + "enum": ["2200-07-15T14:00:00Z"] + }, + "grantedToV2": { + "type": "object", + "required": [ + "user" + ], + "properties":{ + "user": { + "type": "object", + "required": [ + "displayName", + "id" + ], + "properties": { + "displayName": { + "const": "Brian Murphy" + }, + "id": { + "type": "string", + "pattern": "^%user_id_pattern%$" + } } } } - } - }, - "id": { - "type": "string", - "pattern": "^u:%user_id_pattern%$" - }, - "roles": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { + }, + "id": { "type": "string", - "pattern": "^%role_id_pattern%$" + "pattern": "^u:%user_id_pattern%$" + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "pattern": "^%role_id_pattern%$" + } } } } - } - """ + """ Examples: | permissions-role | new-permissions-role | | Space Viewer | Space Editor | diff --git a/tests/acceptance/features/apiSpaces/changeSpaces.feature b/tests/acceptance/features/apiSpaces/changeSpaces.feature index 3cfb231bbb..880109c68d 100644 --- a/tests/acceptance/features/apiSpaces/changeSpaces.feature +++ b/tests/acceptance/features/apiSpaces/changeSpaces.feature @@ -31,25 +31,25 @@ Feature: Change data of space When user "Alice" changes the name of the "Project Jupiter" space to "Project Death Star" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "name", - "driveType" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Death Star"] - }, - "driveType": { - "type": "string", - "enum": ["project"] + """ + { + "type": "object", + "required": [ + "name", + "driveType" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Death Star"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + } } } - } - """ + """ Scenario Outline: user other than space manager role can't change the name of a Space via the Graph API @@ -65,30 +65,30 @@ Feature: Change data of space When user "Alice" changes the description of the "Project Jupiter" space to "The Death Star is a fictional mobile space station" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "name", - "driveType", - "description" - ], - "properties": { - "driveType": { - "type": "string", - "enum": ["project"] - }, - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "description": { - "type": "string", - "enum": ["The Death Star is a fictional mobile space station"] + """ + { + "type": "object", + "required": [ + "name", + "driveType", + "description" + ], + "properties": { + "driveType": { + "type": "string", + "enum": ["project"] + }, + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "description": { + "type": "string", + "enum": ["The Death Star is a fictional mobile space station"] + } } } - } - """ + """ Scenario Outline: viewer and editor cannot change the description(subtitle) of a space via the Graph API @@ -113,38 +113,38 @@ Feature: Change data of space When user "Alice" changes the quota of the "Project Jupiter" space to "" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "name", - "quota" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "quota": { - "type": "object", - "required": [ - "used", - "total" - ], - "properties": { - "used" : { - "type": "number", - "enum": [0] - }, - "total" : { - "type": "number", - "enum": [0] + """ + { + "type": "object", + "required": [ + "name", + "quota" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "quota": { + "type": "object", + "required": [ + "used", + "total" + ], + "properties": { + "used" : { + "type": "number", + "enum": [0] + }, + "total" : { + "type": "number", + "enum": [0] + } } } } } - } - """ + """ Examples: | quota-value | | 0 | @@ -157,79 +157,79 @@ Feature: Change data of space When user "Alice" sets the file ".space/readme.md" as a description in a special section of the "Project Jupiter" space Then the HTTP status code should be "200" And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/readme.md" and match - """ - { - "type": "object", - "required": [ - "name", - "special" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "special": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [17] - }, - "name": { - "type": "string", - "enum": ["readme.md"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["readme"] + """ + { + "type": "object", + "required": [ + "name", + "special" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "special": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [17] + }, + "name": { + "type": "string", + "enum": ["readme.md"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["readme"] + } } - } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/markdown"] + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } } } } } - } - """ + """ And for user "Alice" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "space description" @@ -252,79 +252,79 @@ Feature: Change data of space When user "" sets the file ".space/" as a space image in a special section of the "Project Jupiter" space Then the HTTP status code should be "200" And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/" and match - """ - { - "type": "object", - "required": [ - "name", - "special" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "special": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [0] - }, - "name": { - "type": "string", - "enum": [""] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["image"] + """ + { + "type": "object", + "required": [ + "name", + "special" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "special": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [0] + }, + "name": { + "type": "string", + "enum": [""] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["image"] + } } - } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": [""] + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": [""] + } } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } } } } } - } - """ + """ And for user "" folder ".space/" of the space "Project Jupiter" should contain these entries: | | Examples: @@ -333,6 +333,7 @@ Feature: Change data of space | Brian | spaceImage.png | image/png | | Alice | spaceImage.gif | image/gif | + Scenario: user viewer cannot set image file as space image of the space via the Graph API Given user "Alice" has created a folder ".space" in space "Project Jupiter" And user "Alice" has uploaded a file inside space "Project Jupiter" with content "" to ".space/someImageFile.jpg" @@ -349,79 +350,79 @@ Feature: Change data of space And for user "" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "" When user "" lists all available spaces via the Graph API And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/readme.md" and match - """ - { - "type": "object", - "required": [ - "name", - "special" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "special": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [] - }, - "name": { - "type": "string", - "enum": ["readme.md"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["readme"] + """ + { + "type": "object", + "required": [ + "name", + "special" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "special": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [] + }, + "name": { + "type": "string", + "enum": ["readme.md"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["readme"] + } } - } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["text/markdown"] + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } } } } } - } - """ + """ Examples: | user | http-status-code | expected-size | expected-content | | Alice | 204 | 11 | new content | @@ -437,79 +438,79 @@ Feature: Change data of space And user "" sets the file ".space/newSpaceImage.png" as a space image in a special section of the "Project Jupiter" space Then the HTTP status code should be "200" And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/newSpaceImage.png" and match - """ - { - "type": "object", - "required": [ - "name", - "special" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "special": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "size", - "name", - "specialFolder", - "file", - "id", - "eTag" - ], - "properties": { - "size": { - "type": "number", - "enum": [0] - }, - "name": { - "type": "string", - "enum": ["newSpaceImage.png"] - }, - "specialFolder": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["image"] + """ + { + "type": "object", + "required": [ + "name", + "special" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "special": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "size", + "name", + "specialFolder", + "file", + "id", + "eTag" + ], + "properties": { + "size": { + "type": "number", + "enum": [0] + }, + "name": { + "type": "string", + "enum": ["newSpaceImage.png"] + }, + "specialFolder": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["image"] + } } - } - }, - "file": { - "type": "object", - "required": [ - "mimeType" - ], - "properties": { - "mimeType": { - "type": "string", - "enum": ["image/png"] + }, + "file": { + "type": "object", + "required": [ + "mimeType" + ], + "properties": { + "mimeType": { + "type": "string", + "enum": ["image/png"] + } } + }, + "id": { + "type": "string", + "enum": ["%file_id%"] + }, + "tag": { + "type": "string", + "enum": ["%eTag%"] } - }, - "id": { - "type": "string", - "enum": ["%file_id%"] - }, - "tag": { - "type": "string", - "enum": ["%eTag%"] } } } } } - } - """ + """ Examples: | user | | Alice | diff --git a/tests/acceptance/features/apiSpaces/createSpace.feature b/tests/acceptance/features/apiSpaces/createSpace.feature index 4593549205..2e9afaff26 100644 --- a/tests/acceptance/features/apiSpaces/createSpace.feature +++ b/tests/acceptance/features/apiSpaces/createSpace.feature @@ -23,66 +23,66 @@ Feature: create space When user "Alice" creates a space "Project Mars" of type "project" with the default quota using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Mars" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "quota", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Mars"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "driveAlias": { - "type": "string", - "enum": ["project/project-mars"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total": { - "type": "number", - "enum": [1000000000] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "quota", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Mars"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "driveAlias": { + "type": "string", + "enum": ["project/project-mars"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total": { + "type": "number", + "enum": [1000000000] + } } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] } } - } - """ + """ Examples: | user-role | | Admin | @@ -94,61 +94,61 @@ Feature: create space When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Venus" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "id", - "quota", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Venus"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total": { - "type": "number", - "enum": [2000] + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "id", + "quota", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Venus"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total": { + "type": "number", + "enum": [2000] + } } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] } } - } - """ + """ Examples: | user-role | | Admin | diff --git a/tests/acceptance/features/apiSpaces/listSpaces.feature b/tests/acceptance/features/apiSpaces/listSpaces.feature index 717fecac1f..7ca665891b 100644 --- a/tests/acceptance/features/apiSpaces/listSpaces.feature +++ b/tests/acceptance/features/apiSpaces/listSpaces.feature @@ -15,66 +15,66 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the Graph API Then the HTTP status code should be "200" And the JSON response should contain space called "Alice Hansen" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "quota", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "driveAlias": { - "type": "string", - "enum": ["personal/alice"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "string", - "enum": ["normal"] - } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "quota", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "driveAlias": { + "type": "string", + "enum": ["personal/alice"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "string", + "enum": ["normal"] + } + } + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] + } } } - } - """ + """ Scenario: ordinary user can request information about their Space via the Graph API using a filter @@ -89,65 +89,65 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'personal'" Then the HTTP status code should be "200" And the JSON response should contain space called "Alice Hansen" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "quota", - "root" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "driveAlias": { - "type": "string", - "enum": ["personal/alice"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "string", - "enum": ["normal"] - } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "quota", + "root" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "driveAlias": { + "type": "string", + "enum": ["personal/alice"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "string", + "enum": ["normal"] + } + } + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] + } } } - } - """ + """ And the json responded should not contain a space with name "Shares" And the json responded should only contain spaces of type "personal" @@ -158,30 +158,30 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'project'" Then the HTTP status code should be "200" And the JSON response should contain space called "my project" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "id" - ], - "properties": { - "name": { - "type": "string", - "enum": ["my project"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "id" + ], + "properties": { + "name": { + "type": "string", + "enum": ["my project"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + } } } - } - """ + """ And the json responded should not contain a space with name "Alice Hansen" @@ -195,104 +195,104 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the Graph API with query "$filter=driveType eq 'personal'" Then the HTTP status code should be "200" And the JSON response should contain space called "Alice Hansen" owned by "Alice" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "root", - "owner", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "owner": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "root", + "owner", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { "type": "string", - "enum": ["%user_id%"] + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "owner": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "enum": ["%user_id%"] + } } } } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] } } - } - """ + """ When user "Alice" looks up the single space "Alice Hansen" via the Graph API by using its id Then the HTTP status code should be "200" And the JSON response should contain space called "Alice Hansen" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] + } } } - } - """ + """ Scenario Outline: user can list his created spaces via multiple endpoints @@ -300,129 +300,129 @@ Feature: List and create spaces When user "Alice" creates a space "Project Venus" of type "project" with quota "2000" using the Graph API Then the HTTP status code should be "201" And the JSON response should contain space called "Project Venus" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "quota", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Venus"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "driveAlias": { - "type": "string", - "enum": ["project/project-venus"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total": { - "type": "number", - "enum": [2000] - } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "quota", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Venus"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "driveAlias": { + "type": "string", + "enum": ["project/project-venus"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total": { + "type": "number", + "enum": [2000] + } + } + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] + } } } - } - """ + """ When user "Alice" looks up the single space "Project Venus" via the Graph API by using its id Then the HTTP status code should be "200" And the JSON response should contain space called "Project Venus" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "quota", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Venus"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "driveAlias": { - "type": "string", - "enum": ["project/project-venus"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total": { - "type": "number", - "enum": [2000] - } - } - }, - "root": { - "type": "object", - "required": [ - "webDavUrl" - ], - "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "quota", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Venus"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "driveAlias": { + "type": "string", + "enum": ["project/project-venus"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total": { + "type": "number", + "enum": [2000] + } + } + }, + "root": { + "type": "object", + "required": [ + "webDavUrl" + ], + "properties": { + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] + } } } - } - """ + """ Examples: | user-role | | Admin | @@ -455,70 +455,70 @@ Feature: List and create spaces When user "Alice" lists all available spaces via the Graph API Then the HTTP status code should be "200" And the JSON response should contain space called "Shares" owned by "Alice" and match - """ - { - "type": "object", - "required": [ - "driveType", - "driveAlias", - "name", - "id", - "root", - "webUrl" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Shares"] - }, - "driveType": { - "type": "string", - "enum": ["virtual"] - }, - "driveAlias": { - "type": "string", - "enum": ["virtual/shares"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] - }, - "quota": { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "string", - "enum": ["normal"] + """ + { + "type": "object", + "required": [ + "driveType", + "driveAlias", + "name", + "id", + "root", + "webUrl" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Shares"] + }, + "driveType": { + "type": "string", + "enum": ["virtual"] + }, + "driveAlias": { + "type": "string", + "enum": ["virtual/shares"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + }, + "quota": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "string", + "enum": ["normal"] + } } - } - }, - "root": { - "type": "object", - "required": [ - "eTag", - "webDavUrl" - ], - "properties": { - "eTag": { - "type": "string", - "enum": ["%space_etag%"] - }, - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] + }, + "root": { + "type": "object", + "required": [ + "eTag", + "webDavUrl" + ], + "properties": { + "eTag": { + "type": "string", + "enum": ["%space_etag%"] + }, + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] } - }, - "webUrl": { - "type": "string", - "enum": ["%base_url%/f/%space_id%"] } } - } - """ + """ Examples: | user-role | | Admin | diff --git a/tests/acceptance/features/apiSpaces/quota.feature b/tests/acceptance/features/apiSpaces/quota.feature index 1f9574fac9..7c0b1a32ec 100644 --- a/tests/acceptance/features/apiSpaces/quota.feature +++ b/tests/acceptance/features/apiSpaces/quota.feature @@ -24,48 +24,48 @@ Feature: State of the quota When user "Alice" uploads a file inside space "" with content "" to "test.txt" using the WebDAV API And user "Alice" lists all available spaces via the Graph API Then the JSON response should contain space called "" and match - """ - { - "type": "object", - "required": [ - "name", - "quota" - ], - "properties": { - "name": { - "type": "string", - "enum": [""] - }, - "quota": { - "type": "object", - "required": [ - "state", - "total", - "remaining", - "used" - ], - "properties": { - "state" : { - "type": "string", - "enum": [""] - }, - "total" : { - "type": "number", - "enum": [100] - }, - "remaining" : { - "type": "number", - "enum": [] - }, - "used": { - "type": "number", - "enum": [] + """ + { + "type": "object", + "required": [ + "name", + "quota" + ], + "properties": { + "name": { + "type": "string", + "enum": [""] + }, + "quota": { + "type": "object", + "required": [ + "state", + "total", + "remaining", + "used" + ], + "properties": { + "state" : { + "type": "string", + "enum": [""] + }, + "total" : { + "type": "number", + "enum": [100] + }, + "remaining" : { + "type": "number", + "enum": [] + }, + "used": { + "type": "number", + "enum": [] + } } } } } - } - """ + """ Examples: | space-name | file-content | state | remaining | used | | Quota1% | 1 | normal | 99 | 1 | @@ -122,7 +122,6 @@ Feature: State of the quota | /filesForUpload/lorem.txt | /ocs/v2.php/cloud/users/%username% | 200 | 6.99 | | /filesForUpload/lorem-big.txt | /ocs/v2.php/cloud/users/%username% | 200 | 91.17 | - @env-config Scenario: upload a file by setting OCIS spaces max quota Given the config "OCIS_SPACES_MAX_QUOTA" has been set to "10" diff --git a/tests/acceptance/features/apiSpaces/setQuota.feature b/tests/acceptance/features/apiSpaces/setQuota.feature index 34d22d845b..b069da3f0a 100644 --- a/tests/acceptance/features/apiSpaces/setQuota.feature +++ b/tests/acceptance/features/apiSpaces/setQuota.feature @@ -16,28 +16,28 @@ Feature: Set quota When user "Alice" changes the quota of the "Brian Murphy" space to "100" owned by user "Brian" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "quota" - ], - "properties": { - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total" : { - "type": "number", - "enum": [100] + """ + { + "type": "object", + "required": [ + "quota" + ], + "properties": { + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total" : { + "type": "number", + "enum": [100] + } } } } } - } - """ + """ Examples: | user-role | | Admin | @@ -74,33 +74,33 @@ Feature: Set quota When user "Brian" changes the quota of the "Project Jupiter" space to "100" owned by user "Alice" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "name", - "quota" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project Jupiter"] - }, - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total" : { - "type": "number", - "enum": [100] + """ + { + "type": "object", + "required": [ + "name", + "quota" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project Jupiter"] + }, + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total" : { + "type": "number", + "enum": [100] + } } } } } - } - """ + """ Examples: | user-role | | Admin | @@ -133,28 +133,28 @@ Feature: Set quota When user "Alice" changes the quota of the "Alice Hansen" space to "100" owned by user "Alice" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "quota" - ], - "properties": { - "quota": { - "type": "object", - "required": [ - "total" - ], - "properties": { - "total" : { - "type": "number", - "enum": [100] + """ + { + "type": "object", + "required": [ + "quota" + ], + "properties": { + "quota": { + "type": "object", + "required": [ + "total" + ], + "properties": { + "total" : { + "type": "number", + "enum": [100] + } } } } } - } - """ + """ Scenario Outline: non-admin user tries to set their own personal space quota diff --git a/tests/acceptance/features/apiSpaces/spaceManagement.feature b/tests/acceptance/features/apiSpaces/spaceManagement.feature index e259cd2815..8206fa7428 100644 --- a/tests/acceptance/features/apiSpaces/spaceManagement.feature +++ b/tests/acceptance/features/apiSpaces/spaceManagement.feature @@ -25,30 +25,30 @@ Feature: Space management When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'project'" Then the HTTP status code should be "200" And the JSON response should contain space called "Project" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "id" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Project"] - }, - "driveType": { - "type": "string", - "enum": ["project"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "id" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Project"] + }, + "driveType": { + "type": "string", + "enum": ["project"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + } } } - } - """ + """ And the json responded should not contain a space with name "Alice Hansen" @@ -56,30 +56,30 @@ Feature: Space management When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'personal'" Then the HTTP status code should be "200" And the JSON response should contain space called "Alice Hansen" and match - """ - { - "type": "object", - "required": [ - "driveType", - "name", - "id" - ], - "properties": { - "name": { - "type": "string", - "enum": ["Alice Hansen"] - }, - "driveType": { - "type": "string", - "enum": ["personal"] - }, - "id": { - "type": "string", - "enum": ["%space_id%"] + """ + { + "type": "object", + "required": [ + "driveType", + "name", + "id" + ], + "properties": { + "name": { + "type": "string", + "enum": ["Alice Hansen"] + }, + "driveType": { + "type": "string", + "enum": ["personal"] + }, + "id": { + "type": "string", + "enum": ["%space_id%"] + } } } - } - """ + """ And the json responded should not contain a space with name "Project" @@ -94,20 +94,20 @@ Feature: Space management When user "Brian" changes the name of the "Project" space to "New Name" owned by user "Alice" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "enum": ["New Name"] + """ + { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": ["New Name"] + } } } - } - """ + """ Scenario: user without space admin permission tries to change the name of the project space @@ -120,20 +120,20 @@ Feature: Space management When user "Brian" changes the description of the "Project" space to "New description" owned by user "Alice" Then the HTTP status code should be "200" And the JSON data of the response should match - """ - { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string", - "enum": ["New description"] + """ + { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string", + "enum": ["New description"] + } } } - } - """ + """ Scenario: user without space admin permission tries to change the description of the project space diff --git a/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature b/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature index c1e0b927f9..217d952762 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/fileVersionByFileID.feature @@ -33,6 +33,7 @@ Feature: checking file versions using file id | File Editor | | Viewer | + Scenario Outline: check the versions of a file in a shared space as editor/manager Given user "Alice" has sent the following space share invitation: | space | Project1 | diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index f826512103..bae64bf210 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -349,7 +349,7 @@ Feature: move (rename) file Scenario Outline: sharee moves a file within a Shares space (Editor/Uploader permissions) Given user "Brian" has created folder "testshare" - Given user "Brian" has created folder "testshare/child" + And user "Brian" has created folder "testshare/child" And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt" And user "Brian" has sent the following resource share invitation: | resource | testshare | @@ -370,7 +370,7 @@ Feature: move (rename) file Scenario: sharee moves a file within a Shares space (viewer permissions) Given user "Brian" has created folder "testshare" - Given user "Brian" has created folder "testshare/child" + And user "Brian" has created folder "testshare/child" And user "Brian" has uploaded file with content "test file content" to "/testshare/testfile.txt" And user "Brian" has sent the following resource share invitation: | resource | testshare | diff --git a/tests/acceptance/features/coreApiCapabilities/capabilities.feature b/tests/acceptance/features/coreApiCapabilities/capabilities.feature index 410f0d87a7..e2c667d684 100644 --- a/tests/acceptance/features/coreApiCapabilities/capabilities.feature +++ b/tests/acceptance/features/coreApiCapabilities/capabilities.feature @@ -12,36 +12,37 @@ Feature: capabilities Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "files_sharing" - ], - "properties": { - "files_sharing": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "user": { - "type": "object", - "required": [ - "profile_picture" - ], - "properties": { - "profile_picture": { - "type": "boolean", - "enum": [ - true - ] + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "profile_picture" + ], + "properties": { + "profile_picture": { + "type": "boolean", + "enum": [ + true + ] + } } } } @@ -50,8 +51,7 @@ Feature: capabilities } } } - } - """ + """ @skipOnReva Scenario: getting trashbin app capability with admin user @@ -59,38 +59,38 @@ Feature: capabilities Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "undelete" - ], - "properties": { - "undelete": { - "type": "boolean", - "enum": [ - true - ] + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", + "required": [ + "undelete" + ], + "properties": { + "undelete": { + "type": "boolean", + "enum": [ + true + ] + } } } } } } } - } - """ + """ @skipOnReva Scenario: getting versions app capability with admin user @@ -98,38 +98,38 @@ Feature: capabilities Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "versioning" - ], - "properties": { - "versioning": { - "type": "boolean", - "enum": [ - true - ] + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", + "required": [ + "versioning" + ], + "properties": { + "versioning": { + "type": "boolean", + "enum": [ + true + ] + } } } } } } } - } - """ + """ @issue-1285 Scenario: getting default_permissions capability with admin user @@ -137,38 +137,38 @@ Feature: capabilities Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "files_sharing" - ], - "properties": { - "files_sharing": { - "type": "object", - "required": [ - "default_permissions" - ], - "properties": { - "default_permissions": { - "type": "number", - "enum": [ - 31 - ] + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "default_permissions" + ], + "properties": { + "default_permissions": { + "type": "number", + "enum": [ + 31 + ] + } } } } } } } - } - """ + """ @issue-1285 Scenario: .htaccess is reported as a blacklisted file by default @@ -176,125 +176,125 @@ Feature: capabilities Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "blacklisted_files" - ], - "properties": { - "blacklisted_files": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [".htaccess"] - } - } - } - } - } - } - } - } - """ - - @smokeTest - Scenario: getting default capabilities with version string with admin user - When the administrator retrieves the capabilities using the capabilities API - Then the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities", - "version" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "core" - ], - "properties": { - "core": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "type": "object", - "required": [ - "edition", - "product", - "productname", - "version", - "versionstring" - ], - "properties": { - "edition": { + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", + "required": [ + "blacklisted_files" + ], + "properties": { + "blacklisted_files": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string", - "enum": ["%edition%"] - }, - "product": { - "type": "string", - "enum": ["%productname%"] - }, - "productname": { - "type": "string", - "enum": ["%productname%"] - }, - "version": { - "type": "string", - "enum": ["%version%"] - }, - "versionstring": { - "type": "string", - "enum": ["%versionstring%"] + "enum": [".htaccess"] } } } } } } - }, - "version": { - "type": "object", - "required": [ - "string", - "edition", - "product" - ], - "properties": { - "string": { - "type": "string", - "enum": ["%versionstring%"] - }, - "edition": { - "type": "string", - "enum": ["%edition%"] - }, - "product": { - "type": "string", - "enum": ["%productname%"] + } + } + """ + + @smokeTest + Scenario: getting default capabilities with version string with admin user + When the administrator retrieves the capabilities using the capabilities API + Then the ocs JSON data of the response should match + """ + { + "type": "object", + "required": [ + "capabilities", + "version" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "core" + ], + "properties": { + "core": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "object", + "required": [ + "edition", + "product", + "productname", + "version", + "versionstring" + ], + "properties": { + "edition": { + "type": "string", + "enum": ["%edition%"] + }, + "product": { + "type": "string", + "enum": ["%productname%"] + }, + "productname": { + "type": "string", + "enum": ["%productname%"] + }, + "version": { + "type": "string", + "enum": ["%version%"] + }, + "versionstring": { + "type": "string", + "enum": ["%versionstring%"] + } + } + } + } + } + } + }, + "version": { + "type": "object", + "required": [ + "string", + "edition", + "product" + ], + "properties": { + "string": { + "type": "string", + "enum": ["%versionstring%"] + }, + "edition": { + "type": "string", + "enum": ["%edition%"] + }, + "product": { + "type": "string", + "enum": ["%productname%"] + } } } } } - } - """ + """ And the major-minor-micro version data in the response should match the version string diff --git a/tests/acceptance/features/coreApiCapabilities/capabilitiesWithNormalUser.feature b/tests/acceptance/features/coreApiCapabilities/capabilitiesWithNormalUser.feature index 3307df1589..a8c7a62d46 100644 --- a/tests/acceptance/features/coreApiCapabilities/capabilitiesWithNormalUser.feature +++ b/tests/acceptance/features/coreApiCapabilities/capabilitiesWithNormalUser.feature @@ -15,265 +15,266 @@ Feature: default capabilities for normal user Then the OCS status code should be "100" And the HTTP status code should be "200" And the ocs JSON data of the response should match - """ - { - "type": "object", - "required": [ - "capabilities" - ], - "properties": { - "capabilities": { - "type": "object", - "required": [ - "core", - "files", - "files_sharing" - ], - "properties": { - "core": { - "type": "object", - "required": [ - "pollinterval", - "webdav-root", - "status" - ], - "properties": { - "pollinterval": { - "type": "integer", - "enum": [ - 30000 - ] - }, - "webdav-root": { - "type": "string", - "enum": [ - "remote.php/webdav" - ] - }, - "status": { - "type": "object", - "required": [ - "version", - "versionstring", - "edition", - "productname" - ], - "properties": { - "version": { - "type": "string", - "enum": [ - "%version%" - ] - }, - "versionstring": { - "type": "string", - "enum": [ - "%versionstring%" - ] - }, - "edition": { - "type": "string", - "enum": [ - "%edition%" - ] - }, - "productname": { - "type": "string", - "enum": [ - "%productname%" - ] + """ + { + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "type": "object", + "required": [ + "core", + "files", + "files_sharing" + ], + "properties": { + "core": { + "type": "object", + "required": [ + "pollinterval", + "webdav-root", + "status" + ], + "properties": { + "pollinterval": { + "type": "integer", + "enum": [ + 30000 + ] + }, + "webdav-root": { + "type": "string", + "enum": [ + "remote.php/webdav" + ] + }, + "status": { + "type": "object", + "required": [ + "version", + "versionstring", + "edition", + "productname" + ], + "properties": { + "version": { + "type": "string", + "enum": [ + "%version%" + ] + }, + "versionstring": { + "type": "string", + "enum": [ + "%versionstring%" + ] + }, + "edition": { + "type": "string", + "enum": [ + "%edition%" + ] + }, + "productname": { + "type": "string", + "enum": [ + "%productname%" + ] + } } } } - } - }, - "files": { - "type": "object", - "required": [ - "bigfilechunking", - "privateLinks", - "privateLinksDetailsParam" - ], - "properties": { - "bigfilechunking": { - "type": "boolean", - "enum": [ - true - ] - }, - "privateLinks": { - "type": "boolean", - "enum": [ - true - ] - }, - "privateLinksDetailsParam": { - "type": "boolean", - "enum": [ - true - ] + }, + "files": { + "type": "object", + "required": [ + "bigfilechunking", + "privateLinks", + "privateLinksDetailsParam" + ], + "properties": { + "bigfilechunking": { + "type": "boolean", + "enum": [ + true + ] + }, + "privateLinks": { + "type": "boolean", + "enum": [ + true + ] + }, + "privateLinksDetailsParam": { + "type": "boolean", + "enum": [ + true + ] + } } - } - }, - "files_sharing": { - "type": "object", - "required": [ - "api_enabled", - "default_permissions", - "search_min_length", - "public", - "resharing", - "federation", - "group_sharing", - "share_with_group_members_only", - "share_with_membership_groups_only", - "auto_accept_share", - "user_enumeration" - ], - "properties": { - "api_enabled": { - "type": "boolean", - "enum": [ - true - ] - }, - "default_permissions": { - "type": "integer", - "enum": [ - 31 - ] - }, - "search_min_length": { - "type": "integer", - "enum": [ - 2 - ] - }, - "public": { - "type": "object", - "required": [ - "enabled", - "multiple", - "upload", - "supports_upload_only", - "send_mail", - "social_share", - "defaultPublicLinkShareName" - ], - "properties": { - "enabled": { - "type": "boolean", - "enum": [ - true - ] - }, - "multiple": { - "type": "boolean", - "enum": [ - true - ] - }, - "upload": { - "type": "boolean", - "enum": [ - true - ] - }, - "supports_upload_only": { - "type": "boolean", - "enum": [ - true - ] - }, - "send_mail": { - "type": "boolean", - "enum": [ - false - ] - }, - "social_share": { - "type": "boolean", - "enum": [ - true - ] - }, - "defaultPublicLinkShareName": { - "type": "string", - "enum": [ - "Public link" - ] + }, + "files_sharing": { + "type": "object", + "required": [ + "api_enabled", + "default_permissions", + "search_min_length", + "public", + "resharing", + "federation", + "group_sharing", + "share_with_group_members_only", + "share_with_membership_groups_only", + "auto_accept_share", + "user_enumeration" + ], + "properties": { + "api_enabled": { + "type": "boolean", + "enum": [ + true + ] + }, + "default_permissions": { + "type": "integer", + "enum": [ + 31 + ] + }, + "search_min_length": { + "type": "integer", + "enum": [ + 2 + ] + }, + "public": { + "type": "object", + "required": [ + "enabled", + "multiple", + "upload", + "supports_upload_only", + "send_mail", + "social_share", + "defaultPublicLinkShareName" + ], + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + }, + "multiple": { + "type": "boolean", + "enum": [ + true + ] + }, + "upload": { + "type": "boolean", + "enum": [ + true + ] + }, + "supports_upload_only": { + "type": "boolean", + "enum": [ + true + ] + }, + "send_mail": { + "type": "boolean", + "enum": [ + false + ] + }, + "social_share": { + "type": "boolean", + "enum": [ + true + ] + }, + "defaultPublicLinkShareName": { + "type": "string", + "enum": [ + "Public link" + ] + } } - } - }, - "resharing": { - "type": "boolean", - "enum": [ - true - ] - }, - "federation": { - "type": "object", - "required": [ - "outgoing", - "incoming" - ], - "properties": { - "outgoing": { - "type": "boolean", - "enum": [ - true - ] - }, - "incoming": { - "type": "boolean", - "enum": [ - true - ] + }, + "resharing": { + "type": "boolean", + "enum": [ + true + ] + }, + "federation": { + "type": "object", + "required": [ + "outgoing", + "incoming" + ], + "properties": { + "outgoing": { + "type": "boolean", + "enum": [ + true + ] + }, + "incoming": { + "type": "boolean", + "enum": [ + true + ] + } } - } - }, - "group_sharing": { - "type": "boolean", - "enum": [ - true - ] - }, - "share_with_group_members_only": { - "type": "boolean", - "enum": [ - false - ] - }, - "share_with_membership_groups_only": { - "type": "boolean", - "enum": [ - false - ] - }, - "auto_accept_share": { - "type": "boolean", - "enum": [ - true - ] - }, - "user_enumeration": { - "type": "object", - "required": [ - "enabled", - "group_members_only" - ], - "properties": { - "enabled": { - "type": "boolean", - "enum": [ - true - ] - }, - "group_members_only": { - "type": "boolean", - "enum": [ - false - ] + }, + "group_sharing": { + "type": "boolean", + "enum": [ + true + ] + }, + "share_with_group_members_only": { + "type": "boolean", + "enum": [ + false + ] + }, + "share_with_membership_groups_only": { + "type": "boolean", + "enum": [ + false + ] + }, + "auto_accept_share": { + "type": "boolean", + "enum": [ + true + ] + }, + "user_enumeration": { + "type": "object", + "required": [ + "enabled", + "group_members_only" + ], + "properties": { + "enabled": { + "type": "boolean", + "enum": [ + true + ] + }, + "group_members_only": { + "type": "boolean", + "enum": [ + false + ] + } } } } @@ -282,5 +283,4 @@ Feature: default capabilities for normal user } } } - } - """ + """ diff --git a/tests/acceptance/features/coreApiMain/checksums.feature b/tests/acceptance/features/coreApiMain/checksums.feature index 05c1b28875..be1be4f19d 100644 --- a/tests/acceptance/features/coreApiMain/checksums.feature +++ b/tests/acceptance/features/coreApiMain/checksums.feature @@ -6,6 +6,7 @@ Feature: checksums Background: Given user "Alice" has been created with default attributes and without skeleton files + Scenario Outline: uploading a file with checksum should work Given using DAV path When user "Alice" uploads file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" using the WebDAV API diff --git a/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareUniqueReceivedNames.feature b/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareUniqueReceivedNames.feature index 0c537c213f..7c59b9c19d 100644 --- a/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareUniqueReceivedNames.feature +++ b/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareUniqueReceivedNames.feature @@ -24,7 +24,6 @@ Feature: resources shared with the same name are received with unique names | Shares/foo/ | | /Shares/foo (1)/ | - @smokeTest @issue-2131 Scenario: unique target names for incoming shares when auto-accepting is disabled Given user "Brian" has disabled auto-accepting diff --git a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature index 2d80fe4620..dde07f5081 100644 --- a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature +++ b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature @@ -307,7 +307,7 @@ Feature: share resources where the sharee receives the share in multiple ways | sharee | Brian | | shareType | user | | permissionsRole | Editor | - And user "Brian" should be able to create folder "/Shares/child1/fo1" + Then user "Brian" should be able to create folder "/Shares/child1/fo1" And user "Brian" should be able to create folder "/Shares/child1/child2/fo2" But user "Brian" should not be able to create folder "/Shares/parent/fo3" And user "Brian" should not be able to create folder "/Shares/parent/fo3" diff --git a/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature b/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature index 232e509a98..3ff34a531e 100644 --- a/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature +++ b/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature @@ -390,7 +390,7 @@ Feature: sharing | path | /randomfile.txt | | permissions | read,update | | uid_owner | %username% | - Then user "brian" should see the following elements + And user "brian" should see the following elements | /Shares/randomfile.txt | And the content of file "Shares/randomfile.txt" for user "brian" should be "Random data" @@ -424,7 +424,7 @@ Feature: sharing When user "Alice" shares folder "/PARENT" with group "😀 😁" using the sharing API Then the OCS status code should be "" And the HTTP status code should be "200" - Then user "Brian" should see the following elements + And user "Brian" should see the following elements | /Shares/PARENT/ | | /Shares/PARENT/parent.txt | And user "Carol" should see the following elements @@ -488,7 +488,7 @@ Feature: sharing | file_target | /Shares/textfile0.txt | | path | /textfile0.txt | | uid_owner | %username% | - Then as "Brian" file "/Shares/textfile0.txt" should exist + And as "Brian" file "/Shares/textfile0.txt" should exist And as "Carol" file "/Shares/textfile0.txt" should exist When the administrator deletes group "grp1" using the Graph API And user "Alice" sends HTTP method "GET" to OCS API endpoint "/apps/files_sharing/api/v1/shares" diff --git a/tests/acceptance/features/coreApiShareOperationsToShares2/uploadToShare.feature b/tests/acceptance/features/coreApiShareOperationsToShares2/uploadToShare.feature index c63e342536..994ba39ea0 100644 --- a/tests/acceptance/features/coreApiShareOperationsToShares2/uploadToShare.feature +++ b/tests/acceptance/features/coreApiShareOperationsToShares2/uploadToShare.feature @@ -58,11 +58,11 @@ Feature: sharing And the following headers should match these regular expressions for user "Brian" | ETag | /^"[a-f0-9:\.]{1,32}"$/ | And the content of file "/FOLDER/textfile.txt" for user "Alice" should be: - """ - This is a testfile. + """ + This is a testfile. - Cheers. - """ + Cheers. + """ Examples: | dav-path-version | | old | @@ -86,11 +86,11 @@ Feature: sharing And the following headers should match these regular expressions for user "Brian" | ETag | /^"[a-f0-9:\.]{1,32}"$/ | And the content of file "/FOLDER/textfile.txt" for user "Alice" should be: - """ - This is a testfile. + """ + This is a testfile. - Cheers. - """ + Cheers. + """ Examples: | dav-path-version | | old | @@ -110,11 +110,11 @@ Feature: sharing When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API Then the HTTP status code should be "201" And the content of file "/FOLDER/textfile.txt" for user "Alice" should be: - """ - This is a testfile. + """ + This is a testfile. - Cheers. - """ + Cheers. + """ Examples: | dav-path-version | | old | @@ -136,11 +136,11 @@ Feature: sharing When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API Then the HTTP status code should be "201" And the content of file "/FOLDER/textfile.txt" for user "Alice" should be: - """ - This is a testfile. + """ + This is a testfile. - Cheers. - """ + Cheers. + """ Examples: | dav-path-version | | old | @@ -163,11 +163,11 @@ Feature: sharing And the following headers should match these regular expressions for user "Brian" | ETag | /^"[a-f0-9:\.]{1,32}"$/ | And the content of file "/myfile.txt" for user "Alice" should be: - """ - This is a testfile. + """ + This is a testfile. - Cheers. - """ + Cheers. + """ Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature index 83fec81a7a..1999f9e596 100644 --- a/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature @@ -362,7 +362,7 @@ Feature: create a public link share @env-config Scenario: overwriting a file changes its mtime (new public webDAV API) Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" - Given user "Alice" has created folder "testFolder" + And user "Alice" has created folder "testFolder" When user "Alice" uploads file with content "uploaded content for file name ending with a dot" to "testFolder/file.txt" using the WebDAV API And user "Alice" creates a public link share using the sharing API with settings | path | /testFolder | diff --git a/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature b/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature index 76c9a854c7..6a1ff50b2f 100644 --- a/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature +++ b/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature @@ -8,7 +8,6 @@ Feature: sharing Given using OCS API version "1" And user "Alice" has been created with default attributes and without skeleton files - @issue-1289 @issue-7555 Scenario Outline: keep group permissions in sync when the share is renamed by the receiver and then the permissions are updated by sharer Given using OCS API version "" diff --git a/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature b/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature index 508e216989..001065f8a5 100644 --- a/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature +++ b/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature @@ -189,7 +189,7 @@ Feature: files and folders can be deleted from the trashbin And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin And as "Alice" the folder with original path "/PARENT/CHILD/" should not exist in the trashbin But as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin - But as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin + And as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin And as "Alice" the file with original path "/FOLDER/CHILD/child.txt" should exist in the trashbin Examples: | dav-path-version | diff --git a/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature b/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature index 7c6b48623c..2fae26f5e6 100644 --- a/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature +++ b/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature @@ -109,7 +109,6 @@ Feature: files and folders exist in the trashbin after being deleted | dav-path-version | | spaces | - # This scenario deletes many files as close together in time as the test can run. # On a very slow system, the file deletes might all happen in different seconds. # But on "reasonable" systems, some of the files will be deleted in the same second, diff --git a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature index ff5f97d16e..fb7bd8d54a 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature @@ -197,7 +197,7 @@ Feature: create files and folder | spaces | '"double".txt' | - Scenario Outline: try to create file with '.', '..' and 'empty' + Scenario Outline: try to create file with '.', '..' and 'empty' Given using DAV path When user "Alice" uploads file with content "some text" to "" using the WebDAV API Then the HTTP status code should be "" @@ -221,7 +221,7 @@ Feature: create files and folder | spaces | | 500 | - Scenario Outline: try to create folder with '.', '..' and 'empty' + Scenario Outline: try to create folder with '.', '..' and 'empty' Given using DAV path When user "Alice" creates folder "" using the WebDAV API Then the HTTP status code should be "" @@ -245,7 +245,7 @@ Feature: create files and folder | spaces | | 400 | - Scenario Outline: create a file with dots in the name + Scenario Outline: create a file with dots in the name Given using DAV path And user "Alice" uploads file with content "some text" to "" using the WebDAV API Then the HTTP status code should be "201" @@ -279,7 +279,7 @@ Feature: create files and folder | spaces | /fo.exe | - Scenario Outline: create a folder with dots in the name + Scenario Outline: create a folder with dots in the name Given using DAV path When user "Alice" creates folder "" using the WebDAV API Then the HTTP status code should be "201"