From 4592d06c2bce6af572ecaf9aaa8e741b972d6123 Mon Sep 17 00:00:00 2001 From: nirajacharya2 <122071597+nirajacharya2@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:57:19 +0545 Subject: [PATCH] fixing incorrect json format for json assertion steps (#8265) --- .../features/apiSpaces/changeSpaces.feature | 24 ++++--- .../features/apiSpaces/createSpace.feature | 66 +++++++++--------- .../features/apiSpaces/listSpaces.feature | 68 +++++++++++-------- .../apiSpaces/spaceManagement.feature | 8 +-- 4 files changed, 91 insertions(+), 75 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/changeSpaces.feature b/tests/acceptance/features/apiSpaces/changeSpaces.feature index cc34268dec..4c34faceef 100644 --- a/tests/acceptance/features/apiSpaces/changeSpaces.feature +++ b/tests/acceptance/features/apiSpaces/changeSpaces.feature @@ -205,8 +205,10 @@ Feature: Change data of space "mimeType" ], "properties": { - "type": "string", - "enum": ["text/markdown"] + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } } }, "id": { @@ -298,8 +300,10 @@ Feature: Change data of space "mimeType" ], "properties": { - "type": "string", - "enum": [""] + "mimeType": { + "type": "string", + "enum": [""] + } } }, "id": { @@ -393,8 +397,10 @@ Feature: Change data of space "mimeType" ], "properties": { - "type": "string", - "enum": ["text/markdown"] + "mimeType": { + "type": "string", + "enum": ["text/markdown"] + } } }, "id": { @@ -479,8 +485,10 @@ Feature: Change data of space "mimeType" ], "properties": { - "type": "string", - "enum": ["image/png"] + "mimeType": { + "type": "string", + "enum": ["image/png"] + } } }, "id": { diff --git a/tests/acceptance/features/apiSpaces/createSpace.feature b/tests/acceptance/features/apiSpaces/createSpace.feature index f3f2b6b3b4..e4ea59c103 100644 --- a/tests/acceptance/features/apiSpaces/createSpace.feature +++ b/tests/acceptance/features/apiSpaces/createSpace.feature @@ -41,28 +41,28 @@ Feature: create space "enum": ["Project Mars"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["project"] }, "driveAlias": { - "type": "string", + "type": "string", "enum": ["project/project-mars"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] }, "quota": { - "type": "object", - "required": [ + "type": "object", + "required": [ "total" - ], - "properties": { - "state": { - "type": "number", - "enum": [1000000000] - } - } + ], + "properties": { + "total": { + "type": "number", + "enum": [1000000000] + } + } }, "root": { "type": "object", @@ -70,11 +70,11 @@ Feature: create space "webDavUrl" ], "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } }, "webUrl": { "type": "string", @@ -111,24 +111,24 @@ Feature: create space "enum": ["Project Venus"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["project"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] }, "quota": { - "type": "object", - "required": [ + "type": "object", + "required": [ "total" - ], - "properties": { - "state": { - "type": "number", - "enum": [2000] - } - } + ], + "properties": { + "total": { + "type": "number", + "enum": [2000] + } + } }, "root": { "type": "object", @@ -136,11 +136,11 @@ Feature: create space "webDavUrl" ], "properties": { - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } }, "webUrl": { "type": "string", diff --git a/tests/acceptance/features/apiSpaces/listSpaces.feature b/tests/acceptance/features/apiSpaces/listSpaces.feature index 81559075b4..4676e3dd7f 100644 --- a/tests/acceptance/features/apiSpaces/listSpaces.feature +++ b/tests/acceptance/features/apiSpaces/listSpaces.feature @@ -167,11 +167,11 @@ Feature: List and create spaces "enum": ["my project"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["project"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] } } @@ -227,13 +227,17 @@ Feature: List and create spaces "user" ], "properties": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "type": "string", - "enum": ["%user_id%"] + "user": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "enum": ["%user_id%"] + } + } } } }, @@ -343,6 +347,10 @@ Feature: List and create spaces "enum": ["%base_url%/dav/spaces/%space_id%"] } } + }, + "webUrl": { + "type": "string", + "enum": ["%base_url%/f/%space_id%"] } } } @@ -454,28 +462,28 @@ Feature: List and create spaces "enum": ["Shares"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["virtual"] }, "driveAlias": { - "type": "string", + "type": "string", "enum": ["virtual/shares"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] }, "quota": { - "type": "object", - "required": [ + "type": "object", + "required": [ "state" - ], - "properties": { - "state": { - "type": "string", - "enum": ["normal"] - } - } + ], + "properties": { + "state": { + "type": "string", + "enum": ["normal"] + } + } }, "root": { "type": "object", @@ -484,15 +492,15 @@ Feature: List and create spaces "webDavUrl" ], "properties": { - "eTag": { - "type": "string", - "enum": ["%space_etag%"] - }, - "webDavUrl": { - "type": "string", - "enum": ["%base_url%/dav/spaces/%space_id%"] - } - } + "eTag": { + "type": "string", + "enum": ["%space_etag%"] + }, + "webDavUrl": { + "type": "string", + "enum": ["%base_url%/dav/spaces/%space_id%"] + } + } }, "webUrl": { "type": "string", diff --git a/tests/acceptance/features/apiSpaces/spaceManagement.feature b/tests/acceptance/features/apiSpaces/spaceManagement.feature index f904c6dd7f..926bb407b9 100644 --- a/tests/acceptance/features/apiSpaces/spaceManagement.feature +++ b/tests/acceptance/features/apiSpaces/spaceManagement.feature @@ -39,11 +39,11 @@ Feature: Space management "enum": ["Project"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["project"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] } } @@ -70,11 +70,11 @@ Feature: Space management "enum": ["Alice Hansen"] }, "driveType": { - "type": "string", + "type": "string", "enum": ["personal"] }, "id": { - "type": "string", + "type": "string", "enum": ["%space_id%"] } }