From 700872051367c56e547de64f3a09ddaf906eb165 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 29 Jul 2024 17:28:45 +0200 Subject: [PATCH] tests: adapt acceptance tests --- .../createLinkShare.feature | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature index f1d8cb3fccc..b9fe5c7216e 100644 --- a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature +++ b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature @@ -1378,33 +1378,49 @@ Feature: Create a link share for a resource When user "Alice" tries to create the following space link share using permissions endpoint of the Graph API: | space | | | permissionsRole | internal | - Then the HTTP status code should be "400" + Then the HTTP status code should be "200" And the JSON data of the response should match """ { "type": "object", - "required": ["error"], + "required": [ + "hasPassword", + "id", + "link" + ], "properties": { - "error": { + "hasPassword": { + "const": true + }, + "id": { + "type": "string", + "pattern": "^[a-zA-Z]{15}$" + }, + "link": { "type": "object", "required": [ - "code", - "innererror", - "message" + "@libre.graph.displayName", + "@libre.graph.quickLink", + "preventsDownload", + "type", + "webUrl" ], "properties": { - "code": { - "const": "invalidRequest" + "@libre.graph.displayName": { + "const": "" }, - "innererror": { - "type": "object", - "required": [ - "date", - "request-id" - ] + "@libre.graph.quickLink": { + "const": false }, - "message": { - "const": "" + "preventsDownload": { + "const": false + }, + "type": { + "const": "" + }, + "webUrl": { + "type": "string", + "pattern": "^%base_url%/s/[a-zA-Z]{15}$" } } } @@ -1412,9 +1428,9 @@ Feature: Create a link share for a resource } """ Examples: - | drive | message | - | Personal | cannot create link on personal space root | - | Shares | no share permission | + | drive | permissions-role | + | Personal | internal | + | Shares | internal | Scenario Outline: try to create an internal link share with password of a Personal and Shares drives using permissions endpoint