From dfa0ea4b57f0575329323711d0e09e71d879c762 Mon Sep 17 00:00:00 2001 From: Jeevananthan Kesavan <49391725+jeevananthank@users.noreply.github.com> Date: Tue, 7 Jul 2020 16:14:18 +0200 Subject: [PATCH] Test/updated tests (#4502) * updated tests * form data for another app --- src/test/K6/src/api/app/instantiation.js | 2 +- src/test/K6/src/api/app/texts.js | 10 + src/test/K6/src/api/storage/data.js | 7 - src/test/K6/src/api/storage/events.js | 8 - src/test/K6/src/config.js | 8 +- ...nstanceformdata.xml => apps-test-prod.xml} | 0 src/test/K6/src/data/apps-test.xml | 8 + src/test/K6/src/tests/app/data.js | 2 +- src/test/K6/src/tests/app/e2erf0002.js | 2 +- src/test/K6/src/tests/app/end2end.js | 2 +- src/test/K6/src/tests/app/portalsimulation.js | 141 +++++++++++++ src/test/K6/src/tests/app/rf0002portal.js | 2 +- .../K6/src/tests/app/rf0002withattachment.js | 2 +- .../K6/src/tests/app/uploadanddownload.js | 2 +- .../K6/src/tests/platform/storage/data.js | 2 +- .../platform/storage/downloadinstances.js | 8 - .../K6/src/tests/platform/storage/events.js | 8 +- .../K6/src/tests/platform/storage/rf0002.js | 2 +- .../collections/App.postman_collection.json | 170 ++++++++++------ .../Storage.postman_collection.json | 188 ++++++------------ src/test/Testcafe/package-lock.json | 46 ++--- src/test/Testcafe/package.json | 2 +- 22 files changed, 370 insertions(+), 252 deletions(-) create mode 100644 src/test/K6/src/api/app/texts.js rename src/test/K6/src/data/{instanceformdata.xml => apps-test-prod.xml} (100%) create mode 100644 src/test/K6/src/data/apps-test.xml create mode 100644 src/test/K6/src/tests/app/portalsimulation.js diff --git a/src/test/K6/src/api/app/instantiation.js b/src/test/K6/src/api/app/instantiation.js index cacf57f3da7..bba0c39a2aa 100644 --- a/src/test/K6/src/api/app/instantiation.js +++ b/src/test/K6/src/api/app/instantiation.js @@ -10,7 +10,7 @@ export function beforeInstanceCreation(altinnStudioRuntimeCookie, partyId, appOw req = [ { "method": "get", - "url": config.appApiBaseUrl(appOwner, appName) + config.appResources["textresources"], + "url": config.appApiBaseUrl(appOwner, appName) + config.appResources["texts"] + "nb", "params": requestParams },{ "method": "get", diff --git a/src/test/K6/src/api/app/texts.js b/src/test/K6/src/api/app/texts.js new file mode 100644 index 00000000000..e447de04479 --- /dev/null +++ b/src/test/K6/src/api/app/texts.js @@ -0,0 +1,10 @@ +import http from "k6/http"; +import * as config from "../../config.js"; +import * as header from "../../buildrequestheaders.js" + +//Api call to App Api:Texts to get app texts based on language +export function getAppTexts(altinnStudioRuntimeCookie, appOwner, appName, language){ + var endpoint = config.appApiBaseUrl(appOwner, appName) + config.appResources["texts"] + language, + var params = header.buildHearderWithRuntime(altinnStudioRuntimeCookie, "app"); + return http.get(endpoint, params); +}; \ No newline at end of file diff --git a/src/test/K6/src/api/storage/data.js b/src/test/K6/src/api/storage/data.js index a32d5f64f36..775b6d8f446 100644 --- a/src/test/K6/src/api/storage/data.js +++ b/src/test/K6/src/api/storage/data.js @@ -35,11 +35,4 @@ export function deleteData(altinnStudioRuntimeCookie, partyId, instanceId, dataI var endpoint = config.buildStorageUrls(partyId, instanceId, dataId, "dataid"); var params = header.buildHearderWithRuntime(altinnStudioRuntimeCookie, "platform"); return http.del(endpoint, null, params); -}; - -//Api call to Platform:Storage to confirm all the data elements has been downloaded -export function putConfirmDownloadAll(altinnStudioRuntimeCookie, partyId, instanceId){ - var endpoint = config.buildStorageUrls(partyId, instanceId, "", "confirmdownloadall"); - var params = header.buildHearderWithRuntime(altinnStudioRuntimeCookie, "platform"); - return http.put(endpoint, null , params); }; \ No newline at end of file diff --git a/src/test/K6/src/api/storage/events.js b/src/test/K6/src/api/storage/events.js index 01b81b2c6d2..20317a1c2fb 100644 --- a/src/test/K6/src/api/storage/events.js +++ b/src/test/K6/src/api/storage/events.js @@ -33,11 +33,3 @@ export function getEvent(altinnStudioRuntimeCookie, partyId, instanceId, eventId var params = header.buildHearderWithRuntime(altinnStudioRuntimeCookie, "platform"); return http.get(endpoint, params); }; - - -//Api call to Platform:Storage to Delete all events from an instance -export function deleteEvent(altinnStudioRuntimeCookie, partyId, instanceId){ - var endpoint = config.buildStorageUrls(partyId, instanceId, "", "events"); - var params = header.buildHearderWithRuntime(altinnStudioRuntimeCookie, "platform"); - return http.del(endpoint, null, params); -}; \ No newline at end of file diff --git a/src/test/K6/src/config.js b/src/test/K6/src/config.js index e2cbca219f8..e07911d87bf 100644 --- a/src/test/K6/src/config.js +++ b/src/test/K6/src/config.js @@ -87,10 +87,7 @@ export function buildStorageUrls(instanceOwnerId, instanceId, dataId, type){ break; case "process": value = platformStorage["instances"] + "/" + instanceOwnerId + "/" + instanceId + "/process"; - break; - case "confirmdownloadall": - value = platformStorage["instances"] + "/" + instanceOwnerId + "/" + instanceId + "/dataelements/confirmDownload"; - break; + break; case "completeconfirmation": value = platformStorage["instances"] + "/" + instanceOwnerId + "/" + instanceId + "/complete"; break; @@ -138,7 +135,8 @@ export var appResources = { "servicemetadata": "/api/metadata/ServiceMetaData", "formlayout": "/api/resource/FormLayout.json", "rulehandler": "/api/resource/RuleHandler.js", - "ruleconfiguration": "/api/resource/RuleConfiguration.json" + "ruleconfiguration": "/api/resource/RuleConfiguration.json", + "texts": "/api/v1/texts/" }; //App Authorization diff --git a/src/test/K6/src/data/instanceformdata.xml b/src/test/K6/src/data/apps-test-prod.xml similarity index 100% rename from src/test/K6/src/data/instanceformdata.xml rename to src/test/K6/src/data/apps-test-prod.xml diff --git a/src/test/K6/src/data/apps-test.xml b/src/test/K6/src/data/apps-test.xml new file mode 100644 index 00000000000..147bdeef8e5 --- /dev/null +++ b/src/test/K6/src/data/apps-test.xml @@ -0,0 +1,8 @@ + + + + + 98274 + + + \ No newline at end of file diff --git a/src/test/K6/src/tests/app/data.js b/src/test/K6/src/tests/app/data.js index 7e99263630a..1db7c9ec8ab 100644 --- a/src/test/K6/src/tests/app/data.js +++ b/src/test/K6/src/tests/app/data.js @@ -16,7 +16,7 @@ const userName = __ENV.username; const userPassword = __ENV.userpwd; const appOwner = __ENV.org; const level2App = __ENV.level2app; -let instanceFormDataXml = open("../../data/instanceformdata.xml"); +let instanceFormDataXml = open("../../data/"+ level2App +".xml"); let pdfAttachment = open("../../data/test_file_pdf.pdf", "b"); diff --git a/src/test/K6/src/tests/app/e2erf0002.js b/src/test/K6/src/tests/app/e2erf0002.js index 2759681e1ea..a0ed9908e47 100644 --- a/src/test/K6/src/tests/app/e2erf0002.js +++ b/src/test/K6/src/tests/app/e2erf0002.js @@ -25,7 +25,7 @@ const level2App = __ENV.level2app; const environment = (__ENV.env).toLowerCase(); const fileName = "users_"+ environment +".json"; -let instanceFormDataXml = open("../../data/rf-0002.xml"); +let instanceFormDataXml = open("../../data/"+ level2App +".xml"); let users = JSON.parse(open("../../data/" + fileName)); const usersCount = users.length; diff --git a/src/test/K6/src/tests/app/end2end.js b/src/test/K6/src/tests/app/end2end.js index 18883b3e7a8..c52fbc9754c 100644 --- a/src/test/K6/src/tests/app/end2end.js +++ b/src/test/K6/src/tests/app/end2end.js @@ -17,7 +17,7 @@ const userName = __ENV.username; const userPassword = __ENV.userpwd; const appOwner = __ENV.org; const level2App = __ENV.level2app; -let instanceFormDataXml = open("../../data/instanceformdata.xml"); +let instanceFormDataXml = open("../../data/"+ level2App +".xml"); let pdfAttachment = open("../../data/test_file_pdf.pdf", "b"); let bigAttachment = open("../../data/test_file_morethan_1mb.txt", "b"); diff --git a/src/test/K6/src/tests/app/portalsimulation.js b/src/test/K6/src/tests/app/portalsimulation.js new file mode 100644 index 00000000000..e3343320e48 --- /dev/null +++ b/src/test/K6/src/tests/app/portalsimulation.js @@ -0,0 +1,141 @@ +/* + Create and archive instances of T3.0 apps with attachment component and simulate all the api calls from portal + example: k6 run -i 20 --duration 1m /src/tests/app/portalsimulation.js -e env=test -e org=ttd -e level2app=apps-test -e subskey=*** -e sblaccesskey=*** -e username=*** -e userpwd=*** +*/ + +import { check } from "k6"; +import {addErrorCount, printResponseToConsole} from "../../errorcounter.js"; +import * as appInstances from "../../api/app/instances.js" +import * as appData from "../../api/app/data.js" +import * as appProcess from "../../api/app/process.js" +import * as platformInstances from "../../api/storage/instances.js" +import * as platformApps from "../../api/storage/applications.js" +import * as setUpData from "../../setup.js"; +import * as appInstantiation from "../../api/app/instantiation.js" +import * as appResources from "../../api/app/resources.js" + +const userName = __ENV.username; +const userPassword = __ENV.userpwd; +const appOwner = __ENV.org; +const level2App = __ENV.level2app; + +let instanceFormDataXml = open("../../data/"+ level2App +".xml"); +let pdfAttachment = open("../../data/test_file_pdf.pdf", "b"); + +export const options = { + thresholds:{ + "errors": ["count<1"] + }, + setupTimeout: '1m' +}; + +//Function to setup data and return AltinnstudioRuntime Token +export function setup(){ + var aspxauthCookie = setUpData.authenticateUser(userName, userPassword); + var altinnStudioRuntimeCookie = setUpData.getAltinnStudioRuntimeToken(aspxauthCookie); + var data = setUpData.getUserData(altinnStudioRuntimeCookie, appOwner, level2App); + data.RuntimeToken = altinnStudioRuntimeCookie; + setUpData.clearCookies(); + return data; +}; + +//Tests for App API : Portal simulation +export default function(data) { + const runtimeToken = data["RuntimeToken"]; + const partyId = data["partyId"]; + var instanceId, dataId, res, success, attachmentDataType; + + //Batch api calls before creating an app instance + res = appInstantiation.beforeInstanceCreation(runtimeToken, partyId, appOwner, level2App); + for(var i = 0; i < res.length; i++){ + success = check(res[i], { + "Batch request before app Instantiation:": (r) => r.status === 200 + }); + addErrorCount(success); + printResponseToConsole("Batch request before app Instantiation:", success, res[i]); + }; + + attachmentDataType = platformApps.findAttachmentDataType(res[2].body); + + //Test to create an instance with App api and validate the response + res = appInstances.postInstance(runtimeToken, partyId, appOwner, level2App); + success = check(res, { + "E2E App POST Create Instance status is 201:": (r) => r.status === 201 + }); + addErrorCount(success); + printResponseToConsole("E2E App POST Create Instance:", success, res); + + try { + dataId = appData.findDataId(res.body); + instanceId = platformInstances.findInstanceId(res.body); + } catch (error) { + printResponseToConsole("Instance id and data id not retrieved:", false , null); + }; + + //Test to get the current process of an app instance + res = appProcess.getCurrentProcess(runtimeToken, partyId, instanceId, appOwner, level2App); + success = check(res, { + "Get Current process of instance:": (r) => r.status === 200 + }); + addErrorCount(success); + printResponseToConsole("Get Current process of instance:", success, res); + + //Test to get the form data xml by id + res = appData.getDataById(runtimeToken, partyId, instanceId, dataId, appOwner, level2App); + success = check(res, { + "Get form data XML by id:": (r) => r.status === 200 + }); + addErrorCount(success); + printResponseToConsole("Get form data XML by id:", success, res); + + //Batch request to get the app resources + res = appResources.batchGetAppResources(runtimeToken, appOwner, level2App); + for(var i = 0; i < res.length; i++){ + success = check(res[i], { + "Batch request to get app resources:": (r) => r.status === 200 + }); + addErrorCount(success); + printResponseToConsole("Batch request to get app resources:", success, res[i]); + }; + + //Test to edit a form data in an instance with App APi and validate the response + + res = appData.putDataById(runtimeToken, partyId, instanceId, dataId, "default", instanceFormDataXml, appOwner, level2App); + success = check(res, { + "E2E PUT Edit Data by Id status is 201:": (r) => r.status === 201 + }); + addErrorCount(success); + printResponseToConsole("E2E PUT Edit Data by Id:", success, res); + + //upload a valid attachment to an instance with App API + res = appData.postData(runtimeToken, partyId, instanceId, attachmentDataType, pdfAttachment, appOwner, level2App); + success = check(res, { + "E2E POST Upload Data status is 201:": (r) => r.status === 201 + }); + addErrorCount(success); + printResponseToConsole("E2E POST Upload Data:", success, res); + + //Test to get validate instance and verify that validation of instance is ok + res = appInstances.getValidateInstance(runtimeToken, partyId, instanceId, appOwner, level2App); + success = check(res, { + "E2E App GET Validate Instance validation OK:": (r) => r.body && (JSON.parse(r.body)).length === 0 + }); + addErrorCount(success); + printResponseToConsole("E2E App GET Validate Instance is not OK:", success, res); + + //Test to move the process of an app instance to the next process element and verify response code to be 200 + res = appProcess.putNextProcess(runtimeToken, partyId, instanceId, "EndEvent_1", appOwner, level2App); + success = check(res, { + "E2E App PUT Move process to Next element status is 200:": (r) => r.status === 200 + }); + addErrorCount(success); + printResponseToConsole("E2E App PUT Move process to Next element:", success, res); + + //Test to call get instance details and verify the presence of archived date + res = appInstances.getInstanceById(runtimeToken, partyId, instanceId, appOwner, level2App); + success = check(res, { + "E2E App Instance is archived:": (r) => r.body.length > 0 && (JSON.parse(r.body)).status.archived != null + }); + addErrorCount(success); + printResponseToConsole("E2E App Instance is not archived:", success, res); +}; \ No newline at end of file diff --git a/src/test/K6/src/tests/app/rf0002portal.js b/src/test/K6/src/tests/app/rf0002portal.js index 5995319bb6a..9d8b70a15fa 100644 --- a/src/test/K6/src/tests/app/rf0002portal.js +++ b/src/test/K6/src/tests/app/rf0002portal.js @@ -26,7 +26,7 @@ const level2App = __ENV.level2app; const environment = (__ENV.env).toLowerCase(); const fileName = "users_"+ environment +".json"; -let instanceFormDataXml = open("../../data/rf-0002.xml"); +let instanceFormDataXml = open("../../data/"+ level2App +".xml"); let users = JSON.parse(open("../../data/" + fileName)); const usersCount = users.length; diff --git a/src/test/K6/src/tests/app/rf0002withattachment.js b/src/test/K6/src/tests/app/rf0002withattachment.js index 5831d7eb39e..25bffff4cca 100644 --- a/src/test/K6/src/tests/app/rf0002withattachment.js +++ b/src/test/K6/src/tests/app/rf0002withattachment.js @@ -24,7 +24,7 @@ import * as apps from "../../api/storage/applications.js" import {deleteSblInstance} from "../../api/storage/messageboxinstances.js" import * as setUpData from "../../setup.js"; -const instanceFormDataXml = open("../../data/rf-0002.xml"); +const instanceFormDataXml = open("../../data/"+ level2App +".xml"); const appOwner = __ENV.org; const level2App = __ENV.level2app; const environment = (__ENV.env).toLowerCase(); diff --git a/src/test/K6/src/tests/app/uploadanddownload.js b/src/test/K6/src/tests/app/uploadanddownload.js index 0b53eabf2eb..454ba97e378 100644 --- a/src/test/K6/src/tests/app/uploadanddownload.js +++ b/src/test/K6/src/tests/app/uploadanddownload.js @@ -27,7 +27,7 @@ import * as storageData from "../../api/storage/data.js" import {deleteSblInstance} from "../../api/storage/messageboxinstances.js" import * as setUpData from "../../setup.js"; -const instanceFormDataXml = open("../../data/rf-0002.xml"); +const instanceFormDataXml = open("../../data/"+ level2App +".xml"); const appOwner = __ENV.org; const level2App = __ENV.level2app; const environment = (__ENV.env).toLowerCase(); diff --git a/src/test/K6/src/tests/platform/storage/data.js b/src/test/K6/src/tests/platform/storage/data.js index 1ed374b9761..4593c341e9c 100644 --- a/src/test/K6/src/tests/platform/storage/data.js +++ b/src/test/K6/src/tests/platform/storage/data.js @@ -16,7 +16,7 @@ const userPassword = __ENV.userpwd; const appOwner = __ENV.org; const level2App = __ENV.level2app; let instanceJson = open("../../../data/instance.json"); -let instanceFormDataXml = open("../../../data/instanceformdata.xml"); +let instanceFormDataXml = open("../../../data/"+ level2App +".xml"); let pdfAttachment = open("../../../data/test_file_pdf.pdf", "b"); export const options = { diff --git a/src/test/K6/src/tests/platform/storage/downloadinstances.js b/src/test/K6/src/tests/platform/storage/downloadinstances.js index 831df64b648..df9b4af3c21 100644 --- a/src/test/K6/src/tests/platform/storage/downloadinstances.js +++ b/src/test/K6/src/tests/platform/storage/downloadinstances.js @@ -84,14 +84,6 @@ export default function(data){ printResponseToConsole("Instance Data is not downloaded:", success, res); }; - //Confirm that all the dataelements are downloaded by the appOwner - res = storageData.putConfirmDownloadAll(runtimeToken, partyId, instanceId); - success = check(res, { - "Instance Data download is confirmed:": (r) => r.status === 200 - }); - addErrorCount(success); - printResponseToConsole("Instance Data download is not confirmed:", success, res); - //Complete confirm the app instance as an appOwner res = storageInstances.postCompleteConfirmation(runtimeToken, partyId, instanceId); success = check(res, { diff --git a/src/test/K6/src/tests/platform/storage/events.js b/src/test/K6/src/tests/platform/storage/events.js index 5613ea92857..69e26f8a581 100644 --- a/src/test/K6/src/tests/platform/storage/events.js +++ b/src/test/K6/src/tests/platform/storage/events.js @@ -76,13 +76,7 @@ export default function(data) { "GET Instance Events by EventType status is 200:": (r) => r.status === 200 }); addErrorCount(success); - - //Test to delete all instance events from an instance with storage api and validate the response - res = events.deleteEvent(runtimeToken, partyId, instanceId); - success = check(res, { - "DELETE All Instance Events status is 200:": (r) => r.status === 200 - }); - addErrorCount(success); + }; //Delete the instance created diff --git a/src/test/K6/src/tests/platform/storage/rf0002.js b/src/test/K6/src/tests/platform/storage/rf0002.js index bf23f3d7be1..9f6bac8f31f 100644 --- a/src/test/K6/src/tests/platform/storage/rf0002.js +++ b/src/test/K6/src/tests/platform/storage/rf0002.js @@ -12,7 +12,7 @@ const level2App = __ENV.level2app; const environment = (__ENV.env).toLowerCase(); const fileName = "users_"+ environment +".json"; -let instanceFormDataXml = open("../../../data/rf-0002.xml"); +let instanceFormDataXml = open("../../../data/"+ level2App +".xml"); let instanceJson = open("../../../data/instance.json"); let users = JSON.parse(open("../../data/" + fileName)); const usersCount = users.length; diff --git a/src/test/Postman/collections/App.postman_collection.json b/src/test/Postman/collections/App.postman_collection.json index 56eb17c4c29..3f02140dce0 100644 --- a/src/test/Postman/collections/App.postman_collection.json +++ b/src/test/Postman/collections/App.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "c89b1bed-599e-47be-97a0-6604a38fad23", + "_postman_id": "a9f66131-838c-43f6-9d62-38d7e2770a6c", "name": "App", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -14,7 +14,7 @@ { "listen": "test", "script": { - "id": "405f0af9-b1dd-42cb-acad-8835c9f15dd3", + "id": "23b471a5-fcac-4c95-b095-bb3ce2de545f", "exec": [ "var current_timestamp = new Date();\r", "postman.setEnvironmentVariable(\"current_timestamp\", current_timestamp.toISOString());" @@ -25,7 +25,7 @@ { "listen": "prerequest", "script": { - "id": "b4c59095-e73f-4b65-9290-a748b25c7357", + "id": "99bcd88b-ee8c-4974-9713-13e502360074", "exec": [ "const jar = pm.cookies.jar();", "var domain = pm.environment.get(\"envUrl\");", @@ -80,7 +80,7 @@ { "listen": "test", "script": { - "id": "3642e91a-7bdc-486a-ab19-86d68fb3acee", + "id": "b4d6640e-658e-4e51-bf8d-790f1698fc1b", "exec": [ "var responseAltinnStudioCookie = postman.getResponseCookie(\"AltinnStudioRuntime\");", "responseAltinnStudioCookie = responseAltinnStudioCookie.value.toString();", @@ -108,7 +108,7 @@ { "listen": "prerequest", "script": { - "id": "e2e69b4a-b07a-48bb-b8a7-736a954aa30d", + "id": "bf515784-db3a-4f7d-a91a-063c67aa4cf5", "exec": [ "pm.environment.set(\"AltinnStudioRuntime\",\"\");" ], @@ -148,7 +148,7 @@ { "listen": "test", "script": { - "id": "6505cb59-4588-4d0c-af60-b5faa7dcb8c1", + "id": "31358ee1-d5fa-41b1-8557-bf51828572d1", "exec": [ "if(pm.response.code == 200)", "{", @@ -165,7 +165,7 @@ { "listen": "prerequest", "script": { - "id": "247bde40-1e7d-4473-a1bb-ed62cba7ea18", + "id": "383f5b55-a14f-477f-ad02-8deff1eb88b0", "exec": [ "const cookieJar = pm.cookies.jar();", "var domain = pm.environment.get(\"envUrl\");", @@ -219,7 +219,7 @@ { "listen": "test", "script": { - "id": "ce37f250-8e44-4034-9ec3-b9ee5feac332", + "id": "dc5934b3-7615-45a4-b8d9-a5d8d5c9f199", "exec": [ "if (pm.response.code == 200) {\r", " var jsonData = pm.response.json();\r", @@ -277,6 +277,61 @@ ], "protocolProfileBehavior": {} }, + { + "name": "Texts", + "item": [ + { + "name": "GET NB text", + "event": [ + { + "listen": "test", + "script": { + "id": "124cf815-580a-4f59-932d-0fae2c574642", + "exec": [ + "pm.test(\"App Api - Texts - Get app NB texts - Status - 200\", function () {\r", + " pm.response.to.have.status(200);\r", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{AltinnStudioRuntime}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "https://{{org}}.apps.{{envUrl}}/{{org}}/{{app}}/api/v1/texts/nb", + "protocol": "https", + "host": [ + "{{org}}", + "apps", + "{{envUrl}}" + ], + "path": [ + "{{org}}", + "{{app}}", + "api", + "v1", + "texts", + "nb" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {} + }, { "name": "Instances", "item": [ @@ -286,7 +341,7 @@ { "listen": "test", "script": { - "id": "41557434-30fd-44d6-b2fa-6248c0635824", + "id": "97c0777d-9ff6-41af-b0a0-b2e6dd86c7aa", "exec": [ "pm.test(\"App Api - Instances - Add app instance - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -313,7 +368,7 @@ { "listen": "prerequest", "script": { - "id": "f6eb3baa-0d7d-4224-b967-4fa09e1e8570", + "id": "53b0fe36-408b-4c80-b8aa-957aff01d2f1", "exec": [ "pm.environment.set(\"instanceId\",\"\");", "pm.environment.set(\"dataGuid\",\"\");", @@ -376,7 +431,7 @@ { "listen": "test", "script": { - "id": "8f68df12-4c76-469e-9d25-970fc02a5a08", + "id": "483105a6-e728-4052-a6af-e5f36896c1b5", "exec": [ "pm.test(\"App Api - Instances - Get app instance by ID - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -452,7 +507,7 @@ { "listen": "test", "script": { - "id": "e7bec04f-fad2-4065-8dd0-93aa98d2e734", + "id": "cd0a6081-0996-478c-b1ad-62512a5933a7", "exec": [ "pm.test(\"App Api - Data - Get Form Data by id - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -513,7 +568,7 @@ { "listen": "test", "script": { - "id": "68318696-e879-4d73-ac94-439390675fac", + "id": "12854844-38fe-4714-843e-4a55abadc497", "exec": [ "pm.test(\"App Api - Data - Edit Form Data - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -579,7 +634,7 @@ { "listen": "test", "script": { - "id": "e2d79115-5c93-41c9-b60f-8fc17eaa1f2d", + "id": "10906233-2caa-4be4-a9d7-2c2884c31c5d", "exec": [ "pm.test(\"App Api - Data - Delete Form Data - Status - 400\", function () {\r", " pm.response.to.have.status(400);\r", @@ -642,7 +697,7 @@ { "listen": "test", "script": { - "id": "8c637fd5-88b9-4aec-9bdc-d6a566a131e1", + "id": "b76c5f0e-0c21-4c53-813f-d540d0658ff6", "exec": [ "pm.test(\"App Api - Data - Add attachment - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -660,7 +715,7 @@ { "listen": "prerequest", "script": { - "id": "f85f4f38-bb39-474e-be7c-e1e8c490c222", + "id": "5dfc416a-462b-4ab7-b10d-11da491a93a8", "exec": [ "pm.environment.set(\"dataGuid\",\"\");" ], @@ -734,7 +789,7 @@ { "listen": "test", "script": { - "id": "e7bec04f-fad2-4065-8dd0-93aa98d2e734", + "id": "2c6f2b2d-e627-48dc-8513-e914252bfac5", "exec": [ "pm.test(\"App Api - Data - Get Attachment Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -798,7 +853,7 @@ { "listen": "test", "script": { - "id": "68318696-e879-4d73-ac94-439390675fac", + "id": "2dc23eee-6f04-473a-9b7e-49d2be4cb010", "exec": [ "pm.test(\"App Api - Data - Edit Attachment Data - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -877,7 +932,7 @@ { "listen": "test", "script": { - "id": "709bf4db-92f0-4803-b802-cd5605187d00", + "id": "f1d09c14-d920-484f-b521-07f17692a1eb", "exec": [ "pm.test(\"App Api - Process - Start Process again - negative test - Status - 409\", function () {\r", " pm.response.to.have.status(409);\r", @@ -945,7 +1000,7 @@ { "listen": "test", "script": { - "id": "e57feb48-7aed-48de-bb57-ed220bb65e9d", + "id": "2c3d72a0-d135-4021-bf34-40d12537d6c5", "exec": [ "pm.test(\"App Api - Process - Get Current Process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -997,7 +1052,7 @@ { "listen": "test", "script": { - "id": "a4bf7083-3188-447c-aafe-64b383b1693a", + "id": "2f535d4c-e4c7-4f27-b690-c5a6a34fe9fb", "exec": [ "pm.test(\"App Api - Process - Start Process again - negative test - Status - 409\", function () {\r", " pm.response.to.have.status(409);\r", @@ -1071,7 +1126,7 @@ { "listen": "test", "script": { - "id": "ebe6fdbe-764b-4809-93f3-7869055f3f52", + "id": "a0774fab-c2b3-4f49-a6d2-08223b724777", "exec": [ "pm.test(\"App Api - Process - Get Next Process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1144,7 +1199,7 @@ { "listen": "test", "script": { - "id": "96a3194f-30c7-42c6-9a0d-5deef80d7d44", + "id": "a5a85e3b-db5a-4fe8-a9e9-9f1abd734f5b", "exec": [ "pm.test(\"App Api - Instances - Complete process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1210,7 +1265,7 @@ { "listen": "test", "script": { - "id": "96a3194f-30c7-42c6-9a0d-5deef80d7d44", + "id": "cc672d38-ea4c-404f-8634-9527c4762370", "exec": [ "pm.test(\"App Api - Instances - Complete process again - negative test - Status - 409\", function () {\r", " pm.response.to.have.status(409);\r", @@ -1277,7 +1332,7 @@ { "listen": "test", "script": { - "id": "e57feb48-7aed-48de-bb57-ed220bb65e9d", + "id": "de3c4fac-ea35-40c0-adb8-cb05d192b242", "exec": [ "pm.test(\"App Api - Process - Get Process History - Status - 200\", function () {", " pm.response.to.have.status(200);", @@ -1333,7 +1388,7 @@ { "listen": "test", "script": { - "id": "a3815326-b103-4737-9025-ee4f947dd1c0", + "id": "aa9567fa-7d99-4a0c-ab09-95c7361e76f3", "exec": [ "pm.test(\"App Api - Instances - Create app instance with multipart data - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -1363,7 +1418,7 @@ { "listen": "prerequest", "script": { - "id": "988e199b-4635-4921-9809-0be0197b3d4b", + "id": "6472e7c1-2f71-4430-8ee2-91d9369b6fcd", "exec": [ "pm.environment.set(\"instanceId\",\"\");", "pm.environment.set(\"dataGuid\",\"\");" @@ -1425,7 +1480,7 @@ { "listen": "test", "script": { - "id": "8f68df12-4c76-469e-9d25-970fc02a5a08", + "id": "3d07add0-7408-4d53-b50c-1bd1454841c9", "exec": [ "pm.test(\"App Api - Instances - Get multipart app instance by ID - Status - 200\", function() {", " pm.response.to.have.status(200);", @@ -1493,7 +1548,7 @@ { "listen": "test", "script": { - "id": "e7bec04f-fad2-4065-8dd0-93aa98d2e734", + "id": "10132ca2-a4c5-4da3-98d6-47bdae2b8103", "exec": [ "pm.test(\"App Api - Data - GET Form Data created by mulipart - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1560,7 +1615,7 @@ { "listen": "test", "script": { - "id": "41557434-30fd-44d6-b2fa-6248c0635824", + "id": "9326ee61-9dde-4fc9-b074-3000f7a07f3d", "exec": [ "if(pm.response.code == 201)\r", "{\r", @@ -1584,7 +1639,7 @@ { "listen": "prerequest", "script": { - "id": "9c84f949-10f6-4b99-a342-b7cb58641ee2", + "id": "0a5bce03-6447-4f7a-986c-23583333fbe5", "exec": [ "pm.environment.set(\"instanceId\",\"\");", "pm.environment.set(\"dataGuid\",\"\");", @@ -1614,15 +1669,6 @@ "type": "text" } ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, "url": { "raw": "https://{{org}}.apps.{{envUrl}}/{{org}}/{{app}}/instances?instanceOwnerPartyId={{instanceOwnerId}}", "protocol": "https", @@ -1652,7 +1698,7 @@ { "listen": "test", "script": { - "id": "e57feb48-7aed-48de-bb57-ed220bb65e9d", + "id": "690fdee5-9b3c-41c7-8c13-9d5103bdf74a", "exec": [ "pm.test(\"App Api - Process - Get Current Process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1705,7 +1751,7 @@ { "listen": "test", "script": { - "id": "8f68df12-4c76-469e-9d25-970fc02a5a08", + "id": "9973d484-6332-4c3b-ab9e-50a70a3c6b90", "exec": [ "pm.test(\"App Api - Instances - Get Validate Instance - Not OK - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1768,7 +1814,7 @@ { "listen": "test", "script": { - "id": "dd484dcc-cd50-417c-9601-7b971fe28e68", + "id": "97822682-8720-4914-85fa-ea2f4251af92", "exec": [ "if (pm.response.code == 201)\r", "{\r", @@ -1838,7 +1884,7 @@ { "listen": "test", "script": { - "id": "8c637fd5-88b9-4aec-9bdc-d6a566a131e1", + "id": "bfc50707-4dc7-4019-90fc-ed0ff4945914", "exec": [ "if (pm.response.code == 201)\r", "{\r", @@ -1855,7 +1901,7 @@ { "listen": "prerequest", "script": { - "id": "8b357a9c-1e75-4e16-9a00-8bf5a8654005", + "id": "7dabb5e9-c7a6-4ff6-a3af-89502034f2f0", "exec": [ "pm.environment.set(\"dataGuid\",\"\");" ], @@ -1929,7 +1975,7 @@ { "listen": "test", "script": { - "id": "e7bec04f-fad2-4065-8dd0-93aa98d2e734", + "id": "3aeecc6e-7c06-401d-9e78-0e8924745167", "exec": [ "pm.test(\"App Api - Instances - Get Validate Instance Data - Not OK - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1984,7 +2030,7 @@ { "listen": "test", "script": { - "id": "68318696-e879-4d73-ac94-439390675fac", + "id": "2f2597b2-fdad-4abb-8c2b-55948c0185fc", "exec": [ "" ], @@ -2038,7 +2084,7 @@ { "listen": "test", "script": { - "id": "8c637fd5-88b9-4aec-9bdc-d6a566a131e1", + "id": "681b5234-46ec-4361-b700-0d655c3164a8", "exec": [ "if (pm.response.code == 201)\r", "{\r", @@ -2055,7 +2101,7 @@ { "listen": "prerequest", "script": { - "id": "138fbc85-0369-4b13-8336-4f307a053e19", + "id": "a32c1e38-d2c8-4b7a-8a39-bf109da51ccf", "exec": [ "pm.environment.set(\"dataGuid\",\"\");" ], @@ -2129,7 +2175,7 @@ { "listen": "test", "script": { - "id": "e7bec04f-fad2-4065-8dd0-93aa98d2e734", + "id": "283f1640-54c3-4a23-9089-6eec54280282", "exec": [ "pm.test(\"App Api - Instances - Get Validate Instance Data - OK - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2194,7 +2240,7 @@ { "listen": "test", "script": { - "id": "8f68df12-4c76-469e-9d25-970fc02a5a08", + "id": "30cb1016-6d66-438e-8d23-4225df08afbf", "exec": [ "pm.test(\"App Api - Instances - Get Validate Instance - OK - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2257,7 +2303,7 @@ { "listen": "test", "script": { - "id": "ebe6fdbe-764b-4809-93f3-7869055f3f52", + "id": "9040fbff-c4bf-465a-83f5-ec02f30a3604", "exec": [ "pm.test(\"App Api - E2E Test - Get Next Process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2273,7 +2319,7 @@ { "listen": "prerequest", "script": { - "id": "54d89139-1280-4e3f-9918-2a7437d77c0e", + "id": "1ad36c89-dc18-4a87-9827-d0a914c41447", "exec": [ "pm.environment.set(\"processElementId\",\"\");" ], @@ -2340,7 +2386,7 @@ { "listen": "test", "script": { - "id": "96a3194f-30c7-42c6-9a0d-5deef80d7d44", + "id": "b2a7cff6-164d-4a86-ae23-48bc22c70a12", "exec": [ "pm.test(\"App Api - Process - next process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2406,7 +2452,7 @@ { "listen": "test", "script": { - "id": "8f68df12-4c76-469e-9d25-970fc02a5a08", + "id": "9f06b63c-4c34-40c8-9132-9b37270098d4", "exec": [ "" ], @@ -2468,7 +2514,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "cae6f057-ed18-4a90-9fda-025156c3d07e", "exec": [ "if (pm.response.code == 200)", "{", @@ -2543,7 +2589,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "e0d16fa7-6021-4c74-b70a-d10c8f1a5015", "exec": [ "" ], @@ -2602,7 +2648,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "538281ee-a99b-48dd-bd79-957289d3dcba", "exec": [ "if (pm.response.code == 200)", " {", @@ -2673,7 +2719,7 @@ { "listen": "prerequest", "script": { - "id": "45ab2130-e9f6-418a-a4a5-cc2d29771c5e", + "id": "7602db7a-9d97-4ebc-ad46-16a284e19a25", "type": "text/javascript", "exec": [ "" @@ -2683,7 +2729,7 @@ { "listen": "test", "script": { - "id": "6d0848a4-075b-44d1-9be4-91036fbee672", + "id": "25d66bf3-8997-4b69-88f5-4dbd76665e82", "type": "text/javascript", "exec": [ "" @@ -2698,7 +2744,7 @@ { "listen": "prerequest", "script": { - "id": "6f76088f-7b42-44ae-9cf4-d2d22fbcb1f0", + "id": "02bf89d9-c107-4e04-9f21-e19f82ee09df", "type": "text/javascript", "exec": [ "" @@ -2708,7 +2754,7 @@ { "listen": "test", "script": { - "id": "9d9aca45-4d0e-49f2-a49b-28b54c018901", + "id": "7d22006f-9dc7-41e1-9f35-9bd98acc3f1b", "type": "text/javascript", "exec": [ "" diff --git a/src/test/Postman/collections/Storage.postman_collection.json b/src/test/Postman/collections/Storage.postman_collection.json index 488db8329e3..31f9c604398 100644 --- a/src/test/Postman/collections/Storage.postman_collection.json +++ b/src/test/Postman/collections/Storage.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "cb9e79b1-cede-497a-9567-262efefef28e", + "_postman_id": "1de225d2-04b9-4fab-a2eb-69388da4cd2a", "name": "Storage", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -14,7 +14,7 @@ { "listen": "test", "script": { - "id": "405f0af9-b1dd-42cb-acad-8835c9f15dd3", + "id": "46495365-2417-416f-a522-c3d0f2c6cde6", "exec": [ "var current_timestamp = new Date();\r", "postman.setEnvironmentVariable(\"current_timestamp\", current_timestamp.toISOString());" @@ -25,7 +25,7 @@ { "listen": "prerequest", "script": { - "id": "b4c59095-e73f-4b65-9290-a748b25c7357", + "id": "a510ccaf-fe77-4be0-bd57-8e66df3f5948", "exec": [ "const jar = pm.cookies.jar();", "var domain = pm.environment.get(\"envUrl\");", @@ -79,7 +79,7 @@ { "listen": "test", "script": { - "id": "50e6a7a8-e66c-46a3-9564-9e7e1e9c8b93", + "id": "394a9bd7-8d62-4e75-9704-800c38b96a29", "exec": [ "var responseAltinnStudioCookie = postman.getResponseCookie(\"AltinnStudioRuntime\");", "responseAltinnStudioCookie = responseAltinnStudioCookie.value.toString();", @@ -107,7 +107,7 @@ { "listen": "prerequest", "script": { - "id": "b6e023e3-63ba-48f4-b562-e21f88d28996", + "id": "5450391e-3c33-434b-a223-8a17ad2c8f5a", "exec": [ "pm.environment.set(\"AltinnStudioRuntime\",\"\");" ], @@ -147,7 +147,7 @@ { "listen": "test", "script": { - "id": "6505cb59-4588-4d0c-af60-b5faa7dcb8c1", + "id": "e602f08d-bb11-4233-bf83-d7f2280d1297", "exec": [ "if (pm.response.code == 200) {", " var jsonData = pm.response.json();", @@ -163,7 +163,7 @@ { "listen": "prerequest", "script": { - "id": "9b004a19-571a-46ce-8398-6f0901d4f310", + "id": "0b39d980-2941-4358-a34a-4c37601ab12b", "exec": [ "const cookieJar = pm.cookies.jar();", "var domain = pm.environment.get(\"envUrl\");", @@ -223,7 +223,7 @@ { "listen": "prerequest", "script": { - "id": "c41aa913-9f1a-4cc8-87dc-d896ef72317c", + "id": "7b7d87c1-ed09-483a-900b-dbe1190932c5", "exec": [ "" ], @@ -233,7 +233,7 @@ { "listen": "test", "script": { - "id": "1b3da8e9-45b9-477f-aef7-0e2ede88ed12", + "id": "f351b905-5144-4bf9-bab5-97a953f469d6", "exec": [ "pm.test(\"Platform - Storage - Application - Create App - Not possible for a person - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", @@ -299,7 +299,7 @@ { "listen": "test", "script": { - "id": "ce37f250-8e44-4034-9ec3-b9ee5feac332", + "id": "532ca54c-4898-4c0d-972a-71ead479dc00", "exec": [ "pm.test(\"Platform - Storage - Applications - GET All Apps - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -346,7 +346,7 @@ { "listen": "test", "script": { - "id": "ce37f250-8e44-4034-9ec3-b9ee5feac332", + "id": "dcb34526-1291-48cf-a8a4-310e38e1ea81", "exec": [ "pm.test(\"Platform - Storage - Applications - Get App by name - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -379,7 +379,7 @@ { "listen": "prerequest", "script": { - "id": "8d8e1d9b-b806-4e08-9253-38e5c2b62658", + "id": "f35b6139-ac26-4be9-8fa3-32b1c1dde75d", "exec": [ "pm.environment.set(\"attachmentElementType\",\"\");" ], @@ -425,7 +425,7 @@ { "listen": "test", "script": { - "id": "7762b309-0916-44bc-bb7c-5fb2dc8e639b", + "id": "8c2bb31b-cf4d-401e-9731-85fbe9c08b4e", "exec": [ "pm.test(\"Platform - Storage - Application - Edit App - Not possible for a person - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", @@ -490,7 +490,7 @@ { "listen": "test", "script": { - "id": "ce37f250-8e44-4034-9ec3-b9ee5feac332", + "id": "a46136ed-0e83-481e-900d-2fb6de204e7f", "exec": [ "pm.test(\"Platform - Storage - Applications - Get App texts - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -502,7 +502,7 @@ { "listen": "prerequest", "script": { - "id": "8d8e1d9b-b806-4e08-9253-38e5c2b62658", + "id": "04629225-c223-4940-802f-c5fd3faa93aa", "exec": [ "" ], @@ -550,7 +550,7 @@ { "listen": "test", "script": { - "id": "a2413d3e-8083-4e5c-97f9-4e38cecc0299", + "id": "93f6fc20-8ec8-401a-843d-888ae8921baf", "exec": [ "pm.test(\"Platform - Storage - Applications - POST Upload App texts - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", @@ -562,7 +562,7 @@ { "listen": "prerequest", "script": { - "id": "ec68a4ed-6e43-4fe2-9eee-c5b12935e838", + "id": "a8dd63e4-0184-44e7-98c9-ff0dd0d64ef4", "exec": [ "" ], @@ -618,7 +618,7 @@ { "listen": "test", "script": { - "id": "6dbf50d8-d5e7-452c-8eb2-5fbae9797c5c", + "id": "61b33644-26f0-418c-b2e1-51f34905a27d", "exec": [ "pm.test(\"Platform - Storage - Applications - PUT Edit App texts - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", @@ -630,7 +630,7 @@ { "listen": "prerequest", "script": { - "id": "66eeec08-53c9-4567-b0c6-466b993dc8c8", + "id": "49d26310-3fa7-4bfd-a656-90b1f7dcd9b1", "exec": [ "" ], @@ -687,7 +687,7 @@ { "listen": "test", "script": { - "id": "62554466-a108-40fc-aaf7-c3a84d6822af", + "id": "5c516b38-10b1-47c7-89ee-ec2d766fc277", "exec": [ "pm.test(\"Platform - Storage - Applications - DELETE App texts - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", @@ -699,7 +699,7 @@ { "listen": "prerequest", "script": { - "id": "dff0987b-d9e5-481a-bf78-5053f64a5ab5", + "id": "02623ec8-316d-4489-907b-d579c02ba0a9", "exec": [ "" ], @@ -753,7 +753,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "31e44934-dcf2-4fc0-a49c-02f09eb47e16", "exec": [ "pm.test(\"Platform - Storage - Instances - Add app instance - Status - 201 \", function () {\r", " pm.response.to.have.status(201);\r", @@ -774,7 +774,7 @@ { "listen": "prerequest", "script": { - "id": "d7b24a19-9093-462e-9b6f-a6fd1d7df287", + "id": "9a82e8b1-e687-4521-8463-b8338d0309ef", "exec": [ "pm.environment.set(\"instanceId\",\"\");" ], @@ -835,7 +835,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "17eaf37c-ecc2-4ce4-91cc-b52e139d7b67", "exec": [ "pm.test(\"Platform - Storage - Instances - Get All instances - Missing Request parameter - Status - 400\", function () {\r", " pm.response.to.have.status(400);\r", @@ -894,7 +894,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "e68e0b6b-bcd1-461d-9a36-1c05f7acc51d", "exec": [ "pm.test(\"Platform - Storage - Instances - Get Instance by onwerId - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -952,7 +952,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "070bceb1-efae-4025-8c34-647a73b4fe39", "exec": [ "pm.test(\"Platform - Storage - Instances - Get Instances with Date filter - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -964,7 +964,7 @@ { "listen": "prerequest", "script": { - "id": "1515b68b-dddd-4d4a-bbdf-6fa1b5514197", + "id": "b1247263-a642-468e-bccf-7ed6e9b657da", "exec": [ "" ], @@ -1032,7 +1032,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "c5a09780-6ee8-4859-890d-8906342b1200", "exec": [ "pm.test(\"Platform - Storage - Instances - Get Instances with Process filter - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1098,7 +1098,7 @@ { "listen": "test", "script": { - "id": "77ce3421-c0a3-469a-9973-c232b55e67e4", + "id": "83fd401b-a3f1-4b6d-b42d-9b12655b3b01", "exec": [ "pm.test(\"Platform - Storage - Instances - Edit Process - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1159,7 +1159,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "ea9e5563-ddab-45ee-879b-6fff19fce69e", "exec": [ "pm.test(\"Platform - Storage - Instances - Get Instance by Id - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1228,7 +1228,7 @@ { "listen": "test", "script": { - "id": "4e0a8157-5f87-46a5-8df1-f3097c021797", + "id": "fdacb491-b74c-46f6-b780-da89a0d01e5b", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Add Instance Data - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -1241,7 +1241,7 @@ { "listen": "prerequest", "script": { - "id": "864b3eba-7a74-4650-9406-35b0797e1b4a", + "id": "338b57ec-b789-45b7-a2f6-0d98c96024cf", "exec": [ "pm.environment.set(\"dataGuid\",\"\");" ], @@ -1305,7 +1305,7 @@ { "listen": "test", "script": { - "id": "b7a4e821-33f0-4c30-b93b-d8b0b0a2b53a", + "id": "d9a7bcce-99ab-415b-aa34-89618df94a80", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Get Instance Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1354,7 +1354,7 @@ { "listen": "test", "script": { - "id": "62cd01a6-9c8c-4d36-8134-f51512efb018", + "id": "8e45154d-3403-4b08-b0b5-c96714696f60", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Edit Instance Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1415,7 +1415,7 @@ { "listen": "test", "script": { - "id": "62cd01a6-9c8c-4d36-8134-f51512efb018", + "id": "56bc83ae-d120-4fbe-b1df-6a478199f58c", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Get Instance Data by ID - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1465,7 +1465,7 @@ { "listen": "test", "script": { - "id": "cc714784-7a38-4224-aad8-11d36fe6c540", + "id": "c9d9e966-5d78-45c6-8b13-8238151efa89", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Delete Instance Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1515,7 +1515,7 @@ { "listen": "test", "script": { - "id": "4e0a8157-5f87-46a5-8df1-f3097c021797", + "id": "6363c19f-fcfc-432a-af70-1163a1239512", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Add attachment - Status - 201\", function () {\r", " pm.response.to.have.status(201);\r", @@ -1533,7 +1533,7 @@ { "listen": "prerequest", "script": { - "id": "74e5cd5e-6bcf-41be-98dd-6c142716bcdf", + "id": "9cff461a-3c85-4be0-aca2-7d317445a66e", "exec": [ "" ], @@ -1608,7 +1608,7 @@ { "listen": "test", "script": { - "id": "62cd01a6-9c8c-4d36-8134-f51512efb018", + "id": "7a8ed8b1-cebd-47cb-8423-3b6a6b0db272", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Get Attachment Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1658,7 +1658,7 @@ { "listen": "test", "script": { - "id": "5e3ef949-3acd-4bbf-a3ba-692dee34079a", + "id": "0c8b5c42-3bb1-40c2-ae41-ae5d6d775894", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Edit Data id - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1719,7 +1719,7 @@ { "listen": "test", "script": { - "id": "cc714784-7a38-4224-aad8-11d36fe6c540", + "id": "97ffeaf6-e421-437d-892f-293a1985fc96", "exec": [ "pm.test(\"Platform - Storage - Instance Data - Delete Attachment Data - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -1775,7 +1775,7 @@ { "listen": "test", "script": { - "id": "59eb307d-9e00-43b3-a209-0b3b02ead6a8", + "id": "263612e2-2d64-4323-8991-ea0392bdc408", "exec": [ "pm.test(\"Platform - Storage - Instance Event - Add Instance Event - Status - 201\", function () {", " pm.response.to.have.status(201);", @@ -1794,7 +1794,7 @@ { "listen": "prerequest", "script": { - "id": "86d4fdf9-388d-4841-bbeb-3ad6cecf94a1", + "id": "7269a769-1587-422b-a95a-2b5ac7c69a48", "exec": [ "pm.environment.set(\"EventId\",\"\");" ], @@ -1852,7 +1852,7 @@ { "listen": "test", "script": { - "id": "9c778a29-2034-48fc-96be-4d6696d51085", + "id": "4be75274-2cb1-4e02-9667-58811735459b", "exec": [ "pm.test(\"Platform - Storage - Instance Event - Get Process History - Status - 200\", function () {", " pm.response.to.have.status(200);", @@ -1902,7 +1902,7 @@ { "listen": "test", "script": { - "id": "357288ce-372f-4b00-9b7a-42dc94990430", + "id": "8d56233d-7e0f-4720-bceb-b2e731d49d39", "exec": [ "pm.test(\"Platform - Storage - Instance Event - Get Instance Event by ID- Status - 200\", function () {", " pm.response.to.have.status(200);", @@ -1952,7 +1952,7 @@ { "listen": "test", "script": { - "id": "357288ce-372f-4b00-9b7a-42dc94990430", + "id": "a3d275fb-6722-4a34-8a63-f6dabcdf8f7f", "exec": [ "pm.test(\"Platform - Storage - Instance Event - Get Instance Events - Status - 200\", function () {", " pm.response.to.have.status(200);", @@ -2016,7 +2016,7 @@ { "listen": "test", "script": { - "id": "04584cdf-bdf6-45e3-85f2-e5768b49208a", + "id": "58acb9fb-45da-44e7-b2c4-38ca99a56445", "exec": [ "pm.test(\"Platform - Storage - Instance Event - Get Instance Events by type - Content - Created type events found\", function () {", " pm.response.to.have.status(200);", @@ -2087,7 +2087,7 @@ { "listen": "test", "script": { - "id": "546d0678-0ca9-44bd-a160-ebfc385882e7", + "id": "e675ae2a-b3ef-4fbf-86a5-90534d783811", "exec": [ "pm.test(\"Platform - Storage - Instance Event - No Instance Events - Status - 200\", function () {", " pm.response.to.have.status(200);", @@ -2104,7 +2104,7 @@ { "listen": "prerequest", "script": { - "id": "8aa76d9e-95b4-4db6-a5d0-4b13afe1339d", + "id": "929009d0-fe03-48c6-9aba-2bf912fd4f23", "exec": [ "var currentDate = new Date();", "var hoursToMinus = currentDate.getHours() - 1;", @@ -2162,62 +2162,6 @@ } }, "response": [] - }, - { - "name": "DELETE events", - "event": [ - { - "listen": "test", - "script": { - "id": "686160fc-c6de-4c3f-904a-fe9528f346a7", - "exec": [ - "pm.test(\"Platform - Storage - Instance Event - Delete Instance Events - Status - 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "pm.test(\"Platform - Storage - Instance Event - Delete Instance Events - Content - Matches\", function () {", - " pm.expect(pm.response.text()).to.include(\"succesfully deleted\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{AltinnStudioRuntime}}", - "type": "string" - } - ] - }, - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "url": { - "raw": "https://platform.{{envUrl}}/storage/api/v1/instances/{{instanceOwnerId}}/{{instanceId}}/events", - "protocol": "https", - "host": [ - "platform", - "{{envUrl}}" - ], - "path": [ - "storage", - "api", - "v1", - "instances", - "{{instanceOwnerId}}", - "{{instanceId}}", - "events" - ] - } - }, - "response": [] } ], "protocolProfileBehavior": {} @@ -2231,7 +2175,7 @@ { "listen": "test", "script": { - "id": "73bb7aa7-5269-42fc-ae97-b51511a8d97e", + "id": "d928e12e-3b9f-4e6d-b9d3-23c72404b8e7", "exec": [ "if(pm.response.code == 201)\r", "{\r", @@ -2249,7 +2193,7 @@ { "listen": "prerequest", "script": { - "id": "e1f629f2-d9d1-4cc5-9698-9c83bf385f43", + "id": "add8883e-8728-4b84-b451-f1da6fff1c96", "exec": [ "pm.environment.set(\"instanceId\",\"\");" ], @@ -2310,7 +2254,7 @@ { "listen": "test", "script": { - "id": "4081c1b5-a9a1-4b52-95b3-6b89964d2fb6", + "id": "262666b4-2fec-4f9f-8f0a-2c80c92bf9b6", "exec": [ "var jsonData = pm.response.json();\r", "if(pm.response.code == 201)\r", @@ -2328,7 +2272,7 @@ { "listen": "prerequest", "script": { - "id": "4ead76e4-8ea2-4551-81ed-2dc459e8f380", + "id": "b4d813eb-c31b-4bde-8f23-6ad3c40293d1", "exec": [ "pm.environment.set(\"FutureDateinstanceId\",\"\");" ], @@ -2390,7 +2334,7 @@ { "listen": "test", "script": { - "id": "86592b19-cde0-42f1-8b7c-297eaee24071", + "id": "65368e33-0f1c-4746-9a15-1fbf98b962d0", "exec": [ "pm.test(\"Platform - Storage - SBL - Get Instances for SBL - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2464,7 +2408,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "a9e0f8a6-fe9f-44d5-bc31-380d0bd3e634", "exec": [ "pm.test(\"Platform - Storage - SBL - Soft Delete Instance - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2533,7 +2477,7 @@ { "listen": "test", "script": { - "id": "72cf897c-1a3c-46e3-9d9c-67c1159588c8", + "id": "61e3c084-a796-4af1-92e5-918061fcc8ce", "exec": [ "pm.test(\"Platform - Storage - SBL - Restore Instance - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2585,7 +2529,7 @@ { "listen": "test", "script": { - "id": "0967cde0-022c-4148-b82d-5d490cd417e5", + "id": "7bd5c8c4-4970-4a88-ab68-33bf17901b9d", "exec": [ "pm.test(\"Platform - Storage - SBL - Get Instance by id for SBL - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2640,7 +2584,7 @@ { "listen": "test", "script": { - "id": "0967cde0-022c-4148-b82d-5d490cd417e5", + "id": "28587f7e-99a9-4fb3-a201-58a7ddfc3c1f", "exec": [ "pm.test(\"Platform - Storage - SBL - Get Instance events - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2695,7 +2639,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "7a532e2b-dfc4-4169-a703-344fa6f90b22", "exec": [ "pm.test(\"Platform - Storage - Instance - Delete Instance - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2762,7 +2706,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "0e6c99f3-08d4-4329-bd3a-eee2dc8a64ac", "exec": [ "" ], @@ -2826,7 +2770,7 @@ { "listen": "test", "script": { - "id": "3d1598d9-8cc0-418f-9171-22db9db7659c", + "id": "17e3f6e3-c84f-4536-80bf-1eafc8e9f462", "exec": [ "pm.test(\"Platform - Storage - SBL - Restore Instance - Status - 400\", function () {\r", " pm.response.to.have.status(400);\r", @@ -2883,7 +2827,7 @@ { "listen": "test", "script": { - "id": "8c97e023-bdf7-4556-a260-5968b8c884cb", + "id": "f2cec350-53bc-4a2d-8b6b-2d760b8bf985", "exec": [ "pm.test(\"Platform - Receipt - GET Receipt - Status - 200\", function () {\r", " pm.response.to.have.status(200);\r", @@ -2949,7 +2893,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "8789c04b-e2f8-46ed-8543-45b64a9b3b1f", "exec": [ "if (pm.response.code == 200)", "{", @@ -3024,7 +2968,7 @@ { "listen": "test", "script": { - "id": "f0c6b00b-4213-4095-8a83-f9cf7cc5769e", + "id": "f56ae104-935d-43a1-87a5-71f14d52b66f", "exec": [ "" ], @@ -3083,7 +3027,7 @@ { "listen": "test", "script": { - "id": "d46ea587-c309-4247-a8f5-4a36f278ff82", + "id": "b58861ce-ace0-4759-b90d-8db68f4042a7", "exec": [ "if (pm.response.code == 200)", " {", @@ -3158,7 +3102,7 @@ { "listen": "test", "script": { - "id": "c9b3b6a7-ab5e-4f32-a63c-3e0150654efb", + "id": "98be1a1a-fd44-4dfc-ad52-4848fb6699b3", "exec": [ "pm.test(\"Platform - Storage - Applications - Delete App - Not possible for an user - Status - 403\", function () {\r", " pm.response.to.have.status(403);\r", diff --git a/src/test/Testcafe/package-lock.json b/src/test/Testcafe/package-lock.json index 11e36c70894..bf8ed632281 100644 --- a/src/test/Testcafe/package-lock.json +++ b/src/test/Testcafe/package-lock.json @@ -112,9 +112,9 @@ "dev": true }, "@types/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "dev": true, "requires": { "@types/minimatch": "*", @@ -1416,9 +1416,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001088", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001088.tgz", - "integrity": "sha512-6eYUrlShRYveyqKG58HcyOfPgh3zb2xqs7NvT2VVtP3hEUeeWvc3lqhpeMTxYWBBeeaT9A4bKsrtjATm66BTHg==", + "version": "1.0.30001094", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001094.tgz", + "integrity": "sha512-ufHZNtMaDEuRBpTbqD93tIQnngmJ+oBknjvr0IbFympSdtFpAUFmNv4mVKbb53qltxFx0nK3iy32S9AqkLzUNA==", "dev": true }, "chai": { @@ -1872,9 +1872,9 @@ } }, "electron-to-chromium": { - "version": "1.3.483", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz", - "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==", + "version": "1.3.489", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.489.tgz", + "integrity": "sha512-1FfqjT+IXbs/H9bGJwRIyQQqOXIo7mOVUnv8s7nb2ff01fD0Z8dn1YjKovLDCFe4900Dal2uutR0YzXN5ldqEQ==", "dev": true }, "elegant-spinner": { @@ -1956,9 +1956,9 @@ "dev": true }, "esotope-hammerhead": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/esotope-hammerhead/-/esotope-hammerhead-0.5.3.tgz", - "integrity": "sha512-EMZvx+2MXsAZxqa+bOJZp+5qWzKZ6jx/tYung2dOalujGWW5WKb52UhXR8rb60XyW/WbmoVBjOB1WMPkaSjEzw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/esotope-hammerhead/-/esotope-hammerhead-0.5.5.tgz", + "integrity": "sha512-EuSYJDtF8gLMB24lzjHw2KotauPsVJybFrtGfQyMm48oC7sTkspA26DqcqcbnRl4GC6sPVKWEx+ex72eqopX9Q==", "dev": true, "requires": { "@types/estree": "^0.0.39" @@ -3896,9 +3896,9 @@ "dev": true }, "testcafe": { - "version": "1.8.7", - "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.8.7.tgz", - "integrity": "sha512-qcR+pjzqQa10XANy4dBt5i/g0+UFG5kiO4JJ/IzwN2pRYnH9PsnEflKiv9hqiUn9ZDliPaX5w/00uRRARgQPMw==", + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.8.8.tgz", + "integrity": "sha512-e8yLVU76fEWwh/UIkbTUSDa/e+J8BryErXqNf8itKHA/s9B6Mt9IfsVCCSYXUfx9DIruzcLNTsJ2q1xxc2KO+A==", "dev": true, "requires": { "@types/node": "^10.12.19", @@ -3964,7 +3964,7 @@ "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", "testcafe-browser-tools": "2.0.12", - "testcafe-hammerhead": "17.1.7", + "testcafe-hammerhead": "17.1.9", "testcafe-legacy-api": "4.0.0", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.1.0", @@ -4201,9 +4201,9 @@ } }, "testcafe-hammerhead": { - "version": "17.1.7", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-17.1.7.tgz", - "integrity": "sha512-EvAkT6LPYI3+i/9qOVK2SmFysVCoWD6PIhuiZJEy8JayibqLKWsf4UsfT4SKCaZsxB+ZlYIoDXXItjWg0LEcJA==", + "version": "17.1.9", + "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-17.1.9.tgz", + "integrity": "sha512-RxlUsCkspdrWEWb9S2n9hwqX2RwRp5CFjRTN7Ijx+vnCcHKn5VPBhDlSrZHRiQT1yfa9+FudNsjmmrmlAGvCSg==", "dev": true, "requires": { "acorn-hammerhead": "^0.3.0", @@ -4213,7 +4213,7 @@ "crypto-md5": "^1.0.0", "css": "2.2.3", "debug": "4.1.1", - "esotope-hammerhead": "0.5.3", + "esotope-hammerhead": "0.5.5", "iconv-lite": "0.5.1", "lodash": "^4.17.13", "lru-cache": "2.6.3", @@ -4559,9 +4559,9 @@ "dev": true }, "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", + "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", "dev": true }, "ultron": { diff --git a/src/test/Testcafe/package.json b/src/test/Testcafe/package.json index 07b0cf634b3..25fcba5c0ad 100644 --- a/src/test/Testcafe/package.json +++ b/src/test/Testcafe/package.json @@ -15,7 +15,7 @@ "cross-env": "^5.2.1", "minimist": "^1.2.5", "process": "^0.11.10", - "testcafe": "^1.8.7", + "testcafe": "^1.8.8", "testcafe-browser-provider-puppeteer": "^1.5.2", "tslint": "^5.20.1" },