From fcff2b95899fdced6c0abb7989fbe538e5377c25 Mon Sep 17 00:00:00 2001 From: MBergCap <111343628+MBergCap@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:52:15 +0200 Subject: [PATCH] N21-1793 cypress ctl refactoring (#5060) * adjust seed data --- backup/setup/context-external-tools.json | 163 +-------------- backup/setup/external-tools.json | 256 +++++++++++++---------- backup/setup/school-external-tools.json | 250 +--------------------- 3 files changed, 148 insertions(+), 521 deletions(-) diff --git a/backup/setup/context-external-tools.json b/backup/setup/context-external-tools.json index be4de03d55e..1c1c03b942f 100644 --- a/backup/setup/context-external-tools.json +++ b/backup/setup/context-external-tools.json @@ -20,8 +20,7 @@ "name": "q", "value": "Testsuche" } - ], - "toolVersion": 1 + ] }, { "_id": { @@ -32,164 +31,6 @@ "parameters": [], "schoolTool": { "$oid": "647de374cf6a427b9d39e5ba" - }, - "toolVersion": 2 - }, - { - "_id": { - "$oid": "647de3cfab79fd5bd57e68f5" - }, - "createdAt": { - "$date": "2023-11-30T15:25:00.241Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:25:00.241Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e5bc" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool School Scope", - "parameters": [], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de3cfab79fd5bd57e68f7" - }, - "createdAt": { - "$date": "2023-11-30T15:29:54.630Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:29:54.630Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e5bd" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool Context Scope", - "parameters": [{ - "name": "search", - "value": "test" - }], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de3cfab79fd5bd57e68f9" - }, - "createdAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e5be" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool School and Context Scope", - "parameters": [{ - "name": "contextparam", - "value": "test" - }], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de3cfab79fd5bd57e68fe" - }, - "createdAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e6be" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool deactivated on External Tool", - "parameters": [{ - "name": "contextparam", - "value": "test" - }], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de3cfab79fd5bd57e68ff" - }, - "createdAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e7be" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool deactivated on School External Tool", - "parameters": [{ - "name": "contextparam", - "value": "test" - }], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "659bf86749e52dedff83a92b" - }, - "createdAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:30:08.532Z" - }, - "schoolTool": { - "$oid": "659bf73f49e52dedff83a8f2" - }, - "contextId": "5fa3a2c0a9c31a26f4d1d2f0", - "contextType": "course", - "displayName": "CY Test Tool Protected Parameter", - "parameters": [ - { - "name": "search", - "value": "test" - }, - { - "name": "protected", - "value": "true" - } - ], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "659bf84a49e52dedff83a92a" - }, - "createdAt": { - "$date": "2023-11-30T15:29:54.630Z" - }, - "updatedAt": { - "$date": "2023-11-30T15:29:54.630Z" - }, - "schoolTool": { - "$oid": "647de374cf6a427b9d39e5bd" - }, - "contextId": "5fa3a2f3a9c31a26f4d1d309", - "contextType": "course", - "displayName": "Cypress Test Tool Context Scope", - "parameters": [{ - "name": "search", - "value": "test" - }], - "toolVersion": 1 + } } ] diff --git a/backup/setup/external-tools.json b/backup/setup/external-tools.json index f838e056f99..7130b67a48b 100644 --- a/backup/setup/external-tools.json +++ b/backup/setup/external-tools.json @@ -67,7 +67,9 @@ ], "isHidden": false, "openNewTab": true, - "version": 1 + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { @@ -107,7 +109,9 @@ ], "isHidden": false, "openNewTab": false, - "version": 2 + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { @@ -131,6 +135,7 @@ "isHidden": false, "openNewTab": true, "version": 1, + "isDeactivated": false, "restrictToContexts": [ "board-element" ] @@ -166,7 +171,9 @@ ], "isHidden": false, "openNewTab": false, - "version": 2 + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { @@ -199,11 +206,13 @@ ], "isHidden": false, "openNewTab": false, - "version": 2 + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { - "$oid": "647de247cf6a427b9d39e5c3" + "$oid": "647de247cf6a427b9d39e6c3" }, "createdAt": { "$date": { @@ -215,38 +224,19 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool School and Context Scope", + "name": "CY Test Tool deactivated External Tool", "config_type": "basic", "config_baseUrl": "https://google.com", - "parameters": [ - { - "name": "schoolParam", - "displayName": "cypress test school", - "description": "", - "scope": "school", - "location": "path", - "type": "string", - "isOptional": false, - "isProtected": false - }, - { - "name": "contextparammm", - "displayName": "cypress test context", - "description": "", - "scope": "context", - "location": "path", - "type": "string", - "isOptional": false, - "isProtected": false - } - ], + "parameters": [], "isHidden": false, "openNewTab": false, - "version": 2 + "version": 1, + "isDeactivated": true, + "restrictToContexts": [] }, { "_id": { - "$oid": "647de247cf6a427b9d39e6c3" + "$oid": "659bf6f049e52dedff83a8f1" }, "createdAt": { "$date": { @@ -258,39 +248,40 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool deactivated External Tool", + "name": "CY Test Tool Protected Parameter", "config_type": "basic", - "config_baseUrl": "https://google.com", + "config_baseUrl": "https://google.com/search", "parameters": [ { - "name": "schoolParam", - "displayName": "cypress test school", - "description": "", - "scope": "school", - "location": "path", + "name": "search", + "displayName": "Suchparameter", + "description": "Danch wird gesucht", + "scope": "context", + "location": "query", "type": "string", "isOptional": false, "isProtected": false }, { - "name": "contextparammm", - "displayName": "cypress test context", - "description": "", + "name": "protected", + "displayName": "geschützter Parameter", + "description": "Dieser parameter wird nicht mitkopiert", "scope": "context", - "location": "path", - "type": "string", + "location": "query", + "type": "boolean", "isOptional": false, - "isProtected": false + "isProtected": true } ], "isHidden": false, "openNewTab": false, - "version": 2, - "isDeactivated": true + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { - "$oid": "647de247cf6a427b9d39e7c3" + "$oid": "65fc0fcda519d4a3b71193e0" }, "createdAt": { "$date": { @@ -302,39 +293,40 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool deactivated School External Tool", + "name": "CY Test Tool Optional Protected Parameter", "config_type": "basic", - "config_baseUrl": "https://google.com", + "config_baseUrl": "https://google.com/search", "parameters": [ { - "name": "schoolParam", - "displayName": "cypress test school", - "description": "", - "scope": "school", - "location": "path", + "name": "search", + "displayName": "Suchparameter", + "description": "Danch wird gesucht", + "scope": "context", + "location": "query", "type": "string", "isOptional": false, "isProtected": false }, { - "name": "contextparammm", - "displayName": "cypress test context", - "description": "", + "name": "protected", + "displayName": "geschützter Parameter", + "description": "Dieser parameter wird nicht mitkopiert", "scope": "context", - "location": "path", + "location": "query", "type": "string", - "isOptional": false, - "isProtected": false + "isOptional": true, + "isProtected": true } ], "isHidden": false, "openNewTab": false, - "version": 2, - "isDeactivated": false + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { - "$oid": "647de247cf6a427b9d39e8c3" + "$oid": "666829b6ea0c14353cec2056" }, "createdAt": { "$date": { @@ -346,39 +338,43 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool active External Tool", + "name": "CY Test Tool Hidden", "config_type": "basic", - "config_baseUrl": "https://google.com", - "parameters": [ - { - "name": "schoolParam", - "displayName": "cypress test school", - "description": "", - "scope": "school", - "location": "path", - "type": "string", - "isOptional": false, - "isProtected": false - }, - { - "name": "contextparammm", - "displayName": "cypress test context", - "description": "", - "scope": "context", - "location": "path", - "type": "string", - "isOptional": false, - "isProtected": false + "config_baseUrl": "https://google.com/search", + "parameters": [], + "isHidden": true, + "openNewTab": false, + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] + }, + { + "_id": { + "$oid": "6667ec1c243527c9139bd799" + }, + "createdAt": { + "$date": { + "$numberLong": "1701358084733" } - ], + }, + "updatedAt": { + "$date": { + "$numberLong": "1701358362888" + } + }, + "name": "CY Test Tool 1", + "config_type": "basic", + "config_baseUrl": "https://google.com/search", + "parameters": [], "isHidden": false, "openNewTab": false, - "version": 2, - "isDeactivated": false + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { - "$oid": "659bf6f049e52dedff83a8f1" + "$oid": "66682949ea0c14353cec2054" }, "createdAt": { "$date": { @@ -390,39 +386,64 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool Protected Parameter", + "name": "CY Test Tool 2", + "config_type": "basic", + "config_baseUrl": "https://google.com/search", + "parameters": [], + "isHidden": false, + "openNewTab": false, + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] + }, + { + "_id": { + "$oid": "6667ec58243527c9139bd79b" + }, + "createdAt": { + "$date": { + "$numberLong": "1701358084733" + } + }, + "updatedAt": { + "$date": { + "$numberLong": "1701358362888" + } + }, + "name": "CY Test Tool Optional Parameters", "config_type": "basic", "config_baseUrl": "https://google.com/search", "parameters": [ { - "name": "search", - "displayName": "Suchparameter", - "description": "Danch wird gesucht", - "scope": "context", - "location": "query", + "name": "schoolParam", + "displayName": "school parameter", + "description": "", + "scope": "school", + "location": "path", "type": "string", - "isOptional": false, + "isOptional": true, "isProtected": false }, { - "name": "protected", - "displayName": "geschützter Parameter", - "description": "Dieser parameter wird nicht mitkopiert", + "name": "contextParam", + "displayName": "context parameter", + "description": "", "scope": "context", "location": "query", - "type": "boolean", - "isOptional": false, - "isProtected": true + "type": "string", + "isOptional": true, + "isProtected": false } ], "isHidden": false, "openNewTab": false, "version": 1, - "isDeactivated": false + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { - "$oid": "65fc0fcda519d4a3b71193e0" + "$oid": "6667ec85243527c9139bd79d" }, "createdAt": { "$date": { @@ -434,35 +455,36 @@ "$numberLong": "1701358362888" } }, - "name": "CY Test Tool Optional Protected Parameter", + "name": "CY Test Tool Required Parameters", "config_type": "basic", "config_baseUrl": "https://google.com/search", "parameters": [ { - "name": "search", - "displayName": "Suchparameter", - "description": "Danch wird gesucht", - "scope": "context", - "location": "query", + "name": "schoolParam", + "displayName": "school parameter", + "description": "", + "scope": "school", + "location": "path", "type": "string", "isOptional": false, "isProtected": false }, { - "name": "protected", - "displayName": "geschützter Parameter", - "description": "Dieser parameter wird nicht mitkopiert", + "name": "contextParam", + "displayName": "context parameter", + "description": "", "scope": "context", "location": "query", "type": "string", - "isOptional": true, - "isProtected": true + "isOptional": false, + "isProtected": false } ], "isHidden": false, "openNewTab": false, "version": 1, - "isDeactivated": false + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { @@ -488,7 +510,9 @@ } }, "url": "https://nextcloud-nbc.dbildungscloud.dev/", - "version": 1 + "version": 1, + "isDeactivated": false, + "restrictToContexts": [] }, { "_id": { diff --git a/backup/setup/school-external-tools.json b/backup/setup/school-external-tools.json index 96dd5f72cf6..a95092c0a57 100644 --- a/backup/setup/school-external-tools.json +++ b/backup/setup/school-external-tools.json @@ -25,7 +25,10 @@ "value": "HelloWorld" } ], - "toolVersion": 1 + "status": { + "isOutdatedOnScopeSchool": false, + "isDeactivated": false + } }, { "_id": { @@ -48,246 +51,9 @@ "$oid": "5f2987e020834114b8efd6f8" }, "schoolParameters": [], - "toolVersion": 2 - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e5bb" - }, - "createdAt": { - "$date": { - "$numberLong": "1685971828284" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1685971828284" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e5b9" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [], - "toolVersion": 2 - }, - { - "_id": { - "$oid": "65685717ed7c14d921698602" - }, - "createdAt": { - "$date": { - "$numberLong": "1685971828284" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1685971828284" - } - }, - "tool": { - "$oid": "644a4593d0a8301e6cf25d86" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e5bc" - }, - "createdAt": { - "$date": { - "$numberLong": "1701357811370" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701357811370" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e5b1" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [ - { - "name": "search", - "value": "xxx" - } - ], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e5bd" - }, - "createdAt": { - "$date": { - "$numberLong": "1701357825423" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701357825423" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e5c2" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e5be" - }, - "createdAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e5c3" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [ - { - "name": "schoolParan", - "value": "test" - } - ], - "toolVersion": 1 - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e6be" - }, - "createdAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e6c3" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [ - { - "name": "schoolParan", - "value": "test" - } - ], - "toolVersion": 1, - "status": { - "isDeactivated": false, - "isOutdatedOnScopeSchool": false - } - }, - { - "_id": { - "$oid": "647de374cf6a427b9d39e7be" - }, - "createdAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "tool": { - "$oid": "647de247cf6a427b9d39e7c3" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [ - { - "name": "schoolParan", - "value": "test" - } - ], - "toolVersion": 1, - "status": { - "isDeactivated": true, - "isOutdatedOnScopeSchool": false - } - }, - { - "_id": { - "$oid": "659bf73f49e52dedff83a8f2" - }, - "createdAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "tool": { - "$oid": "659bf6f049e52dedff83a8f1" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [], - "toolVersion": 1, - "status": { - "isDeactivated": false, - "isOutdatedOnScopeSchool": false - } - }, - { - "createdAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "updatedAt": { - "$date": { - "$numberLong": "1701358140061" - } - }, - "tool": { - "$oid": "65fc0fcda519d4a3b71193e0" - }, - "school": { - "$oid": "5fa2c5ccb229544f2c69666c" - }, - "schoolParameters": [], - "toolVersion": 1, "status": { - "isDeactivated": false, - "isOutdatedOnScopeSchool": false + "isOutdatedOnScopeSchool": false, + "isDeactivated": false } }, { @@ -311,7 +77,6 @@ "$oid": "5f2987e020834114b8efd6f8" }, "schoolParameters": [], - "toolVersion": 3, "status": { "isOutdatedOnScopeSchool": false, "isDeactivated": false @@ -338,7 +103,6 @@ "$oid": "5f2987e020834114b8efd6f8" }, "schoolParameters": [], - "toolVersion": 2, "status": { "isOutdatedOnScopeSchool": false, "isDeactivated": false @@ -365,7 +129,6 @@ "$oid": "5f2987e020834114b8efd6f8" }, "schoolParameters": [], - "toolVersion": 1, "status": { "isOutdatedOnScopeSchool": false, "isDeactivated": false @@ -392,7 +155,6 @@ "$oid": "5f2987e020834114b8efd6f8" }, "schoolParameters": [], - "toolVersion": 1, "status": { "isOutdatedOnScopeSchool": false, "isDeactivated": false