diff --git a/.circleci/config.yml b/.circleci/config.yml index add304d..08d07e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,4 +77,4 @@ workflows: context : org-global filters: branches: - only: master \ No newline at end of file + only: master diff --git a/.circleci/postman.yaml b/.circleci/postman.yaml new file mode 100644 index 0000000..9423698 --- /dev/null +++ b/.circleci/postman.yaml @@ -0,0 +1,34 @@ +version: 2 +jobs: + Run-Newman-Test: + docker: + - image: circleci/node:12 + - image: tray/dynamodb-local + command: "-inMemory -port 7777" + - image: elasticsearch:6.8.13 + environment: + discovery.type: "single-node" + steps: + - checkout + - setup_remote_docker + - run: + name: 'newman test' + command: | + npm i + cd local + cd .. + npm run create-tables:test + cd mock + (npm run mock-challenge-api&) + (NODE_ENV=test npm start&) + npm run test:newman +workflows: + version: 2 + Newman_Test: + jobs: + - Run-Newman-Test: + context : org-global + filters: + branches: + only: + - automated-postman-testing diff --git a/PoC-test.md b/PoC-test.md new file mode 100644 index 0000000..e8781d0 --- /dev/null +++ b/PoC-test.md @@ -0,0 +1,44 @@ +# Postman PoC test +## Prerequisite +- start db and es: + ```bash + $ cd resources-api/local + $ docker-compose up + ``` +- create tables: + ```bash + $ cd resources-api + + # NOTE: + # if tables and data already exist, please run first + + # $ npm run drop-tables:test + + # to drop data and tables + + $ npm run create-tables:test + ``` +- start mock challenge api: + ``` + $ cd resources-api/mock + $ npm run mock-challenge-api + ``` +- start app + ```bash + $ cd resources-api + $ source env.sh # set env variables + $ NODE_ENV=test npm start + ``` + +## newman test + ```bash + $ npm run test:newman + ``` + +## Postman test +Please refer to: https://drive.google.com/file/d/1VcTtNwI5_TXgnEKT4TruqG0Z-ts0J83G/view?usp=sharing + + +## Postman mock server +E2E tests use nock to mock `BUSAPI_URL`, where postman mock server could be used to replace nock. +Please refer to: https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md index 26da7bc..4610182 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -184,3 +184,7 @@ npm run e2e ## Verification Refer to the verification document `Verification.md` + +## Postman PoC test + +Refer to the PoC test document [**PoC-test.md**](PoC-test.md) \ No newline at end of file diff --git a/config/test.js b/config/test.js index 9acfd7e..2c0863b 100644 --- a/config/test.js +++ b/config/test.js @@ -4,7 +4,7 @@ module.exports = { TERMS_API_URL: 'http://localhost:4000/v5/terms', - BUSAPI_URL: 'http://localhost:4000/v5', + BUSAPI_URL: 'https://65279208-4c97-4d1a-a925-041b2433787a.mock.pstmn.io/v5', CHALLENGE_PHASES_API_URL: 'http://localhost:4000/v5/challenge-phases', DYNAMODB: { AWS_ACCESS_KEY_ID: 'FAKE_ACCESS_KEY', diff --git a/env.sh b/env.sh new file mode 100644 index 0000000..db4faaf --- /dev/null +++ b/env.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +export AUTH0_CLIENT_ID= + +export AUTH0_CLIENT_SECRET= + +export AUTH0_AUDIENCE=https://m2m.topcoder-dev.com/ diff --git a/package-lock.json b/package-lock.json index 2d30b37..064c7b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -128,6 +128,37 @@ "to-fast-properties": "^2.0.0" } }, + "@postman/form-data": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", + "integrity": "sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + } + } + }, + "@postman/tunnel-agent": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", + "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "@types/body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", @@ -331,6 +362,12 @@ "es-abstract": "^1.7.0" } }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -522,6 +559,15 @@ "concat-map": "0.0.1" } }, + "brotli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", + "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", + "dev": true, + "requires": { + "base64-js": "^1.1.2" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -628,6 +674,12 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "dev": true + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -649,6 +701,107 @@ "restore-cursor": "^2.0.0" } }, + "cli-progress": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", + "integrity": "sha512-qRwBxLldMSfxB+YGFgNRaj5vyyHe1yMpVeDL79c+7puGujdKJHQHydgqXDcrkvQgJ5U/d3lpf6vffSoVVUftVQ==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "cli-table3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", + "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", @@ -873,6 +1026,12 @@ "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", "integrity": "sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=" }, + "csv-parse": { + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.14.2.tgz", + "integrity": "sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw==", + "dev": true + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -881,6 +1040,12 @@ "assert-plus": "^1.0.0" } }, + "dbug": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz", + "integrity": "sha1-MrSzEF6IYQQ6b5rHVdgOVC02WzE=", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1015,6 +1180,55 @@ "esutils": "^2.0.2" } }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "dev": true + }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, "dtrace-provider": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.7.tgz", @@ -1188,6 +1402,12 @@ "once": "^1.4.0" } }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, "env-variable": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", @@ -1524,6 +1744,12 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", @@ -1617,6 +1843,12 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, + "faker": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.1.0.tgz", + "integrity": "sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw==", + "dev": true + }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", @@ -1662,6 +1894,18 @@ "object-assign": "^4.0.1" } }, + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "filesize": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", + "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", + "dev": true + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -1800,6 +2044,12 @@ } } }, + "flatted": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", + "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "dev": true + }, "follow-redirects": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", @@ -1958,6 +2208,27 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2038,6 +2309,20 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, "http-aws-es": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/http-aws-es/-/http-aws-es-6.0.0.tgz", @@ -2059,6 +2344,12 @@ "resolved": "https://registry.npmjs.org/http-json-response/-/http-json-response-1.0.1.tgz", "integrity": "sha1-ryQ2POlMcqre78x6rh8nRo7PS3I=" }, + "http-reasons": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", + "integrity": "sha1-qVPKZwB4Zp3eFCzomUAbnW6F07Q=", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -2074,6 +2365,22 @@ "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-1.3.0.tgz", "integrity": "sha1-nNDnE5F3PQZxtInUHLxQlKpBY7Y=" }, + "httpntlm": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.6.tgz", + "integrity": "sha1-aZHoNSg2AH1nEBuD247Q+RX5BtA=", + "dev": true, + "requires": { + "httpreq": ">=0.4.22", + "underscore": "~1.7.0" + } + }, + "httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", + "dev": true + }, "humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", @@ -2142,12 +2449,68 @@ "through": "^2.3.6" } }, + "intel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", + "integrity": "sha1-EdEUfraz9Fgr31M3s31UFYTp5B4=", + "dev": true, + "requires": { + "chalk": "^1.1.0", + "dbug": "~0.4.2", + "stack-trace": "~0.0.9", + "strftime": "~0.10.0", + "symbol": "~0.3.1", + "utcstring": "~0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", @@ -2390,6 +2753,12 @@ "topo": "3.x.x" } }, + "js-sha512": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.8.0.tgz", + "integrity": "sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2581,6 +2950,12 @@ "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.4.tgz", "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==" }, + "liquid-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", + "integrity": "sha1-kVWhgTbYprJhXl8W+aJEira1Duo=", + "dev": true + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -2613,6 +2988,12 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", + "dev": true + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -2649,6 +3030,12 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, + "lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true + }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -2727,6 +3114,12 @@ "p-defer": "^1.0.0" } }, + "marked": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.7.tgz", + "integrity": "sha512-No11hFYcXr/zkBvL6qFmAp1z6BKY3zqLMHny/JN/ey+al7qwCM2+CMBL9BOgqMxZU36fz4cCWfn2poWIf7QRXA==", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -2793,6 +3186,15 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" }, + "mime-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.0.tgz", + "integrity": "sha1-4p+IkeKE14JwJG8AUNaDS9u+EzI=", + "dev": true, + "requires": { + "charset": "^1.0.0" + } + }, "mime-types": { "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", @@ -2944,52 +3346,178 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "nested-error-stacks": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", "dev": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "nock": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-10.0.6.tgz", - "integrity": "sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w==", + "newman": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/newman/-/newman-5.2.2.tgz", + "integrity": "sha512-aRkh8eeRkKBlwxwBSdYQFZVLvSNMfRDmwPUfddlYR6PwZVKwukmoJmo9QTkRmo6vehgMmt2RTVkfwIIp73X1gg==", "dev": true, "requires": { - "chai": "^4.1.2", - "debug": "^4.1.0", - "deep-equal": "^1.0.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.5", - "mkdirp": "^0.5.0", - "propagate": "^1.0.0", - "qs": "^6.5.1", - "semver": "^5.5.0" + "async": "3.2.0", + "chardet": "1.3.0", + "cli-progress": "3.8.2", + "cli-table3": "0.6.0", + "colors": "1.4.0", + "commander": "6.2.1", + "csv-parse": "4.14.2", + "eventemitter3": "4.0.7", + "filesize": "6.1.0", + "lodash": "4.17.20", + "mkdirp": "1.0.4", + "postman-collection": "3.6.9", + "postman-collection-transformer": "4.0.0", + "postman-request": "2.88.1-postman.28", + "postman-runtime": "7.26.10", + "pretty-ms": "7.0.1", + "semver": "7.3.4", + "serialised-error": "1.1.3", + "tough-cookie": "3.0.1", + "word-wrap": "1.2.3", + "xmlbuilder": "15.1.1" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, + "chardet": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-1.3.0.tgz", + "integrity": "sha512-cyTQGGptIjIT+CMGT5J/0l9c6Fb+565GCFjjeUTKxUO7w3oR+FcNCMEKTn5xtVKaLFmladN7QF68IiQsv5Fbdw==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { - "ms": "^2.1.1" + "yallist": "^4.0.0" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nock": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-10.0.6.tgz", + "integrity": "sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w==", + "dev": true, + "requires": { + "chai": "^4.1.2", + "debug": "^4.1.0", + "deep-equal": "^1.0.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.5", + "mkdirp": "^0.5.0", + "propagate": "^1.0.0", + "qs": "^6.5.1", + "semver": "^5.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true } } }, + "node-oauth1": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-oauth1/-/node-oauth1-1.3.0.tgz", + "integrity": "sha512-0yggixNfrA1KcBwvh/Hy2xAS1Wfs9dcg6TdFf2zN7gilcAigMdrtZ4ybrBSXBgLvGDw9V1p2MRnGBMq7XjTWLg==", + "dev": true + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3140,6 +3668,12 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true + }, "object-keys": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", @@ -3281,6 +3815,12 @@ "error-ex": "^1.2.0" } }, + "parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "dev": true + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -3412,6 +3952,368 @@ "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, + "postcss": { + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postman-collection": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-3.6.9.tgz", + "integrity": "sha512-R3A4tM/Ll6ekkfsXqqefR2r/jSyubXc9Pa/DQSbocEUKzdT3QMMb0QR5SHNjDuR1qE+bywC5dyD2FO2+DFXJ6w==", + "dev": true, + "requires": { + "escape-html": "1.0.3", + "faker": "5.1.0", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.2", + "liquid-json": "0.3.1", + "lodash": "4.17.20", + "marked": "1.2.7", + "mime-format": "2.0.0", + "mime-types": "2.1.28", + "postman-url-encoder": "3.0.1", + "sanitize-html": "1.20.1", + "semver": "7.3.4", + "uuid": "3.4.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "dev": true + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, + "requires": { + "mime-db": "1.45.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "postman-collection-transformer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-4.0.0.tgz", + "integrity": "sha512-AGNGiSvMR7uJpuf2PpYbteYTsE/xsutyuUTaIRCcBhw8h0PS4vyQHua15uNB+PRaNsV8wKFm30T6z23yUg0rKg==", + "dev": true, + "requires": { + "commander": "6.2.0", + "inherits": "2.0.4", + "intel": "1.2.0", + "lodash": "4.17.20", + "semver": "7.3.4", + "strip-json-comments": "3.1.1" + }, + "dependencies": { + "commander": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "postman-request": { + "version": "2.88.1-postman.28", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.28.tgz", + "integrity": "sha512-QjhC9tIuHZTlYJafzCz7u+Nq57NgtOhJmt94RjcNyzpIts1QbihmAgYm0OhNoqcOIU91sNi2aYw2PCyAJR3kcQ==", + "dev": true, + "requires": { + "@postman/form-data": "~3.1.1", + "@postman/tunnel-agent": "^0.6.3", + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "brotli": "~1.3.2", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "tough-cookie": "~2.5.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "http-signature": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.5.tgz", + "integrity": "sha512-NwoTQYSJoFt34jSBbwzDHDofoA61NGXzu6wXh95o1Ry62EnmKjXb/nR/RknLeZ3G/uGwrlKNY2z7uPt+Cdl7Tw==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.14.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "postman-runtime": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.26.10.tgz", + "integrity": "sha512-rYrSF/G0FoWHvOfbEuKVAgKYU8Nl6ow4+iYfdpRfJuTNcrHmfsdumzzdRJ8n0ZY0awAyrrtcAUr/NvSfdof3qA==", + "dev": true, + "requires": { + "async": "2.6.3", + "aws4": "1.11.0", + "eventemitter3": "4.0.7", + "handlebars": "4.7.6", + "http-reasons": "0.1.0", + "httpntlm": "1.7.6", + "inherits": "2.0.4", + "js-sha512": "0.8.0", + "lodash": "4.17.20", + "node-oauth1": "1.3.0", + "performance-now": "2.1.0", + "postman-collection": "3.6.9", + "postman-request": "2.88.1-postman.28", + "postman-sandbox": "4.0.1", + "postman-url-encoder": "3.0.1", + "resolve-from": "5.0.0", + "serialised-error": "1.1.3", + "tough-cookie": "3.0.1", + "uuid": "3.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "postman-sandbox": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.0.1.tgz", + "integrity": "sha512-m0Jw95y5kzSdCY3yWf/hZlkqYxRyBG5sxqiI2D/48nKiHnYLkyMSHErRDJbMj7K4tjXBXn+BKWpWnRsf+iBdlw==", + "dev": true, + "requires": { + "lodash": "4.17.20", + "teleport-javascript": "1.0.0", + "uvm": "2.0.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "postman-url-encoder": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.1.tgz", + "integrity": "sha512-dMPqXnkDlstM2Eya+Gw4MIGWEan8TzldDcUKZIhZUsJ/G5JjubfQPhFhVWKzuATDMvwvrWbSjF+8VmAvbu6giw==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", @@ -3423,6 +4325,15 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "dev": true, + "requires": { + "parse-ms": "^2.1.0" + } + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", @@ -3731,6 +4642,24 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sanitize-html": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.20.1.tgz", + "integrity": "sha512-txnH8TQjaQvg2Q0HY06G6CDJLVYCpbnxrdO0WN8gjCKaU5J0KbyGYhZxx5QJg3WLZ1lB7XU9kDkfrCXUozqptA==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "htmlparser2": "^3.10.0", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.mergewith": "^4.6.1", + "postcss": "^7.0.5", + "srcset": "^1.0.0", + "xtend": "^4.0.1" + } + }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", @@ -3768,6 +4697,31 @@ } } }, + "serialised-error": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/serialised-error/-/serialised-error-1.1.3.tgz", + "integrity": "sha512-vybp3GItaR1ZtO2nxZZo8eOo7fnVaNtP3XE2vJKgzkKR2bagCkdJ1EpYYhEMd3qu/80DwQk9KjsNSxE3fXWq0g==", + "dev": true, + "requires": { + "object-hash": "^1.1.2", + "stack-trace": "0.0.9", + "uuid": "^3.0.0" + }, + "dependencies": { + "stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", @@ -3964,6 +4918,16 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "srcset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", + "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", + "dev": true, + "requires": { + "array-uniq": "^1.0.2", + "number-is-nan": "^1.0.0" + } + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -4019,6 +4983,29 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stream-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-length/-/stream-length-1.0.2.tgz", + "integrity": "sha1-gnfzy+5JpNqrz9tOL0qbXp8snwA=", + "dev": true, + "requires": { + "bluebird": "^2.6.2" + }, + "dependencies": { + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", + "dev": true + } + } + }, + "strftime": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.0.tgz", + "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -4135,6 +5122,12 @@ "swagger-ui-dist": "^3.18.1" } }, + "symbol": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz", + "integrity": "sha1-tvmpANSWpX8CQI8iGYwQndoGMEE=", + "dev": true + }, "symbol-observable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", @@ -4313,6 +5306,12 @@ "request": "^2.88.0" } }, + "teleport-javascript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/teleport-javascript/-/teleport-javascript-1.0.0.tgz", + "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==", + "dev": true + }, "test-exclude": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", @@ -4546,6 +5545,19 @@ "mime-types": "~2.1.18" } }, + "uglify-js": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", + "dev": true, + "optional": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -4581,6 +5593,12 @@ "querystring": "0.2.0" } }, + "utcstring": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz", + "integrity": "sha1-Qw/VEKt/yVtdWRDJAteYgMIIQ2s=", + "dev": true + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4596,6 +5614,15 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" }, + "uvm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.0.1.tgz", + "integrity": "sha512-bZAckfNKnr95YkTCVZWyzK+7w1c8sYJuTresCBqhiizByVRtfPqhGJpTwFUSaS2YkaVfsMoN5xZcOCNxTx9uCA==", + "dev": true, + "requires": { + "flatted": "3.1.0" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -4685,6 +5712,12 @@ } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index b4ed94c..f44e466 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "view-data": "node src/scripts/view-data.js", "mock-challenge-api": "NODE_ENV=test node mock/mock-challenge-api", "test": "nyc --reporter=html --reporter=text mocha test/unit/test.js --require test/common/prepare.js --timeout 60000 --exit", - "e2e": "nyc --reporter=html --reporter=text mocha test/e2e/test.js --require test/common/prepare.js --timeout 60000 --exit" + "e2e": "nyc --reporter=html --reporter=text mocha test/e2e/test.js --require test/common/prepare.js --timeout 60000 --exit", + "test:newman": "node test/postman/newman.js" }, "author": "TCSCODER", "license": "none", @@ -25,6 +26,7 @@ "should": "^13.2.3", "mocha": "^5.2.0", "mocha-prepare": "^0.1.0", + "newman": "^5.2.2", "nyc": "^14.0.0", "standard": "^12.0.1", "nock": "^10.0.6" diff --git a/test/postman/newman.js b/test/postman/newman.js new file mode 100644 index 0000000..67419f3 --- /dev/null +++ b/test/postman/newman.js @@ -0,0 +1,116 @@ +const newman = require('newman') + +const requests = [ + { + folder: 'create resource role by admin', + iterationData: require('./testData/resource-role/create-resource-role-by-admin.json') + }, + { + folder: 'create resource role by m2m', + iterationData: require('./testData/resource-role/create-resource-role-by-m2m.json') + }, + { + folder: 'create resource role with all kinds of invalid token', + iterationData: require('./testData/resource-role/create-resource-role-with-invalid-tokens.json') + }, + { + folder: 'update resource role by admin', + iterationData: require('./testData/resource-role/update-resource-role-by-admin.json') + }, + { + folder: 'update resource role by m2m', + iterationData: require('./testData/resource-role/update-resource-role-by-m2m.json') + }, + { + folder: 'update resource role with all kinds of invalid token', + iterationData: require('./testData/resource-role/update-resource-role-with-invalid-tokens.json') + }, { + folder: 'failure - update resource role invalid id 404' + }, + { + folder: 'create dependency by admin', + iterationData: require('./testData/resource-role-phase-dependency/create-dependency.json') + }, + { + folder: 'create dependency by m2m', + iterationData: require('./testData/resource-role-phase-dependency/create-dependency.json') + }, + { + folder: 'create dependency with all kinds of invalid token', + iterationData: require('./testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json') + }, + { + folder: 'create dependency with not found phase id 404' + }, + { + folder: 'get all dependencies' + }, + { + folder: 'get matched dependencies' + }, + { + folder: 'get dependencies with all kinds of invalid token', + iterationData: require('./testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json') + }, + { + folder: 'update dependency by admin', + iterationData: require('./testData/resource-role-phase-dependency/update-dependency.json') + }, + { + folder: 'update dependency by m2m', + iterationData: require('./testData/resource-role-phase-dependency/update-dependency.json') + }, + { + folder: 'update not found dependency 404' + }, + { + folder: 'update dependency with all kinds of invalid token', + iterationData: require('./testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json') + }, + { + folder: 'delete dependency with all kinds of invalid token', + iterationData: require('./testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json') + }, + { + folder: 'delete dependency with admin' + }, + { + folder: 'delete dependency with m2m' + } +] + +const options = { + collection: require('./resource-api.postman_collection.json'), + exportEnvironment: 'test/postman/resource-api.postman_environment.json', + reporters: 'cli' +} + +const runner = (options) => new Promise((resolve, reject) => { + newman.run(options, function (err) { + if (err) { + reject(err) + return + } + resolve() + }) +}) + +;(async () => { + for (const request of requests) { + delete require.cache[require.resolve('./resource-api.postman_environment.json')] + options.environment = require('./resource-api.postman_environment.json') + options.folder = request.folder + options.iterationData = request.iterationData + try { + await runner(options) + } catch (err) { + console.log(err) + } + } +})().then(() => { + console.log('newman test completed!') + process.exit(0) +}).catch((err) => { + console.log(err) + process.exit(1) +}) diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json new file mode 100644 index 0000000..7ac6a57 --- /dev/null +++ b/test/postman/resource-api.postman_collection.json @@ -0,0 +1,1233 @@ +{ + "info": { + "_postman_id": "f9009c39-962f-4d40-a266-d3b1633d5c98", + "name": "resource-api", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Resource Roles", + "item": [ + { + "name": "create resource role", + "item": [ + { + "name": "create resource role by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.name).to.eq(iterationData.get('name'))", + " pm.expect(response.fullReadAccess).to.eq(iterationData.get('fullReadAccess'))", + " pm.expect(response.fullWriteAccess).to.eq(iterationData.get('fullWriteAccess'))", + " pm.expect(response.isActive).to.eq(iterationData.get('isActive'))", + " pm.expect(response.selfObtainable).to.eq(iterationData.get('selfObtainable'))", + " pm.environment.set(\"COPILOT_RESOURCE_ROLE_ID\", response.id);", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"isActive\": {{isActive}},\n\t\"selfObtainable\": {{selfObtainable}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles" + ] + } + }, + "response": [] + }, + { + "name": "create resource role by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.name).to.eq(iterationData.get('name'))", + " pm.expect(response.fullReadAccess).to.eq(iterationData.get('fullReadAccess'))", + " pm.expect(response.fullWriteAccess).to.eq(iterationData.get('fullWriteAccess'))", + " pm.expect(response.isActive).to.eq(iterationData.get('isActive'))", + " pm.expect(response.selfObtainable).to.eq(iterationData.get('selfObtainable'))", + " pm.environment.set(\"COPILOT_RESOURCE_ROLE_ID\", response.id);", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"isActive\": {{isActive}},\n\t\"selfObtainable\": {{selfObtainable}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles" + ] + } + }, + "response": [] + }, + { + "name": "create resource role with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"failure-token\",\n\t\"fullReadAccess\": true,\n \"fullWriteAccess\": false,\n\t\"isActive\": true,\n \"selfObtainable\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "update resource role", + "item": [ + { + "name": "update resource role by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.name).to.eq(iterationData.get('name'))", + " pm.expect(response.fullReadAccess).to.eq(iterationData.get('fullReadAccess'))", + " pm.expect(response.fullWriteAccess).to.eq(iterationData.get('fullWriteAccess'))", + " pm.expect(response.isActive).to.eq(iterationData.get('isActive'))", + " pm.expect(response.selfObtainable).to.eq(iterationData.get('selfObtainable'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"isActive\": {{isActive}},\n\t\"selfObtainable\": {{selfObtainable}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/{{COPILOT_RESOURCE_ROLE_ID}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "update resource role by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.name).to.eq(iterationData.get('name'))", + " pm.expect(response.fullReadAccess).to.eq(iterationData.get('fullReadAccess'))", + " pm.expect(response.fullWriteAccess).to.eq(iterationData.get('fullWriteAccess'))", + " pm.expect(response.isActive).to.eq(iterationData.get('isActive'))", + " pm.expect(response.selfObtainable).to.eq(iterationData.get('selfObtainable'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"isActive\": {{isActive}},\n\t\"selfObtainable\": {{selfObtainable}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/{{COPILOT_RESOURCE_ROLE_ID}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "update resource role with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"failure-test\",\n\t\"fullReadAccess\": true,\n \"fullWriteAccess\": false,\n\t\"isActive\": true,\n\t\"selfObtainable\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/{{COPILOT_RESOURCE_ROLE_ID}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "failure - update resource role invalid id 404", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"failure-test\",\n\t\"fullReadAccess\": true,\n \"fullWriteAccess\": false,\n\t\"isActive\": true,\n\t\"selfObtainable\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/test", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "test" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Resource Role Phase Dependencies", + "item": [ + { + "name": "create dependency", + "item": [ + { + "name": "create dependency by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " pm.environment.set(\"DEPENDENCY_ID_1\", pm.response.json().id);", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " pm.environment.set(\"DEPENDENCY_ID_2\", pm.response.json().id);", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency with not found phase id 404", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "get dependencies", + "item": [ + { + "name": "get all dependencies", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "get matched dependencies", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_read_token}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies?phaseId={{PHASE_ID}}&resourceRoleId={{SUBMITTER_RESOURCE_ROLE_ID}}&phaseState=false", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ], + "query": [ + { + "key": "phaseId", + "value": "{{PHASE_ID}}" + }, + { + "key": "resourceRoleId", + "value": "{{SUBMITTER_RESOURCE_ROLE_ID}}" + }, + { + "key": "phaseState", + "value": "false" + } + ] + } + }, + "response": [] + }, + { + "name": "get dependencies with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "update dependency", + "item": [ + { + "name": "update dependency by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "update dependency by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "update not found dependency 404", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{COPILOT_RESOURCE_ROLE_ID}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "update dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "delete dependency", + "item": [ + { + "name": "delete dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_2}}" + ] + } + }, + "response": [] + }, + { + "name": "delete dependency with admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "delete dependency with m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_2}}" + ] + } + }, + "response": [] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json new file mode 100644 index 0000000..66fc5a0 --- /dev/null +++ b/test/postman/resource-api.postman_environment.json @@ -0,0 +1,109 @@ +{ + "id": "8972a3df-731f-4475-b089-ccbb28735083", + "name": "resource-api", + "values": [ + { + "key": "URL", + "value": "http://localhost:3000/v5", + "enabled": true + }, + { + "key": "CHALLENGE_ID", + "value": "fe6d0a58-ce7d-4521-8501-b8132b1c0391", + "enabled": true + }, + { + "key": "CHALLENGE_NOT_FOUND_ID", + "value": "11111111-ce7d-4521-8501-b8132b1c0391", + "enabled": true + }, + { + "key": "user1_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "enabled": true + }, + { + "key": "user2_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiY29waWxvdCJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiaG9ob3NreSIsImV4cCI6MTY4MTc5MjM3MCwidXNlcklkIjoiMTYwOTY4MjMiLCJpYXQiOjE1NDk3OTE3NzAsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiZjFlNjEzYmUtZDViOS00MjMxLWJhYWUtZWU5ZjJkMjI3MjM0In0.YfzhT9rLFK6U2suPdiCSx_n7Ce6ZIt_oLZ0BcvfMqAk", + "enabled": true + }, + { + "key": "admin_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTY4MTA1MjIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU0OTc5MTYxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.ONh2RSE5NeJzyjBD68TSUdNFMs5v5BXtga4LchR2x3s", + "enabled": true + }, + { + "key": "m2m_all_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJhbGw6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZV9yb2xlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.UhuqMGrrNzj-VQz2-BogN28YZTE9uauIfdP7EOhrKB0", + "enabled": true + }, + { + "key": "COPILOT_RESOURCE_ROLE_ID", + "value": "", + "enabled": true + }, + { + "key": "OBSERVER_RESOURCE_ROLE_ID", + "value": "", + "enabled": true + }, + { + "key": "SUBMITTER_RESOURCE_ROLE_ID", + "value": "", + "enabled": true + }, + { + "key": "expire_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "enabled": true + }, + { + "key": "m2m_read_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "enabled": true + }, + { + "key": "m2m_modify_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", + "enabled": true + }, + { + "key": "REVIEWER_RESOURCE_ROLE_ID", + "value": "", + "enabled": true + }, + { + "key": "TEST_CHALLENGE_ID1", + "value": "fe6d0a58-ce7d-4521-8501-b8132b1c0392", + "enabled": true + }, + { + "key": "TEST_CHALLENGE_ID2", + "value": "fe6d0a58-ce7d-4521-8501-b8132b1c0393", + "enabled": true + }, + { + "key": "user3_token", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJsYXJzMjUyMCIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjg3MTMxIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.QIXF4-qSkH7n-i0_4mzF3peFTZ5PjaSYHjm9EjhTfS4", + "enabled": true + }, + { + "key": "PHASE_ID", + "value": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "enabled": true + }, + { + "key": "DEPENDENCY_ID_1", + "value": "", + "enabled": true + }, + { + "key": "DEPENDENCY_ID_2", + "value": "", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2020-12-28T13:53:00.316Z", + "_postman_exported_using": "Postman/7.36.1" +} \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json new file mode 100644 index 0000000..e5d6d1e --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency.json b/test/postman/testData/resource-role-phase-dependency/create-dependency.json new file mode 100644 index 0000000..590c26e --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency.json @@ -0,0 +1,17 @@ +[ + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 200 + }, + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": false, + "httpCode": 200 + }, + { + "phaseId": "abc", + "phaseState": false, + "httpCode": 404 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json new file mode 100644 index 0000000..e5d6d1e --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json new file mode 100644 index 0000000..801eb88 --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json new file mode 100644 index 0000000..e5d6d1e --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency.json b/test/postman/testData/resource-role-phase-dependency/update-dependency.json new file mode 100644 index 0000000..590c26e --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency.json @@ -0,0 +1,17 @@ +[ + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 200 + }, + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": false, + "httpCode": 200 + }, + { + "phaseId": "abc", + "phaseState": false, + "httpCode": 404 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-by-admin.json b/test/postman/testData/resource-role/create-resource-role-by-admin.json new file mode 100644 index 0000000..6a74f27 --- /dev/null +++ b/test/postman/testData/resource-role/create-resource-role-by-admin.json @@ -0,0 +1,55 @@ +[ + { + "name": "co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "Observer", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": false, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 200 + }, + { + "name": "reviewer", + "fullReadAccess": false, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "invalid": "invalid", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "httpCode": 400 + }, + { + "name": "failure-test", + "fullReadAccess": true, + "fullWriteAccess": false, + "httpCode": 400 + }, + { + "name": "submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 409 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-by-m2m.json b/test/postman/testData/resource-role/create-resource-role-by-m2m.json new file mode 100644 index 0000000..25a6b97 --- /dev/null +++ b/test/postman/testData/resource-role/create-resource-role-by-m2m.json @@ -0,0 +1,55 @@ +[ + { + "name": "co-pilot-m2m", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "Observer-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": false, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "submitter-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 200 + }, + { + "name": "reviewer-m2m", + "fullReadAccess": false, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "invalid": "invalid-m2m", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "httpCode": 400 + }, + { + "name": "failure-test-m2m", + "fullReadAccess": true, + "fullWriteAccess": false, + "httpCode": 400 + }, + { + "name": "submitter-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 409 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json new file mode 100644 index 0000000..e5d6d1e --- /dev/null +++ b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/update-resource-role-by-admin.json b/test/postman/testData/resource-role/update-resource-role-by-admin.json new file mode 100644 index 0000000..6b6f274 --- /dev/null +++ b/test/postman/testData/resource-role/update-resource-role-by-admin.json @@ -0,0 +1,48 @@ +[ + { + "name": "UPDATE_CO-PILOT-admin", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_OBSERVER-admin", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": false, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_SUBMITTER-admin", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 200 + }, + { + "name": "UPDATE_REVIEWER-admin", + "fullReadAccess": false, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_REVIEWER-admin1", + "isActive": true, + "selfObtainable": false, + "httpCode": 400 + }, + { + "name": "SUBMITTER", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 409 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/update-resource-role-by-m2m.json b/test/postman/testData/resource-role/update-resource-role-by-m2m.json new file mode 100644 index 0000000..3d1196f --- /dev/null +++ b/test/postman/testData/resource-role/update-resource-role-by-m2m.json @@ -0,0 +1,48 @@ +[ + { + "name": "UPDATE_CO-PILOT-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_OBSERVER-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": false, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_SUBMITTER-m2m", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 200 + }, + { + "name": "UPDATE_REVIEWER-m2m", + "fullReadAccess": false, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + { + "name": "UPDATE_REVIEWER-m2m1", + "isActive": true, + "selfObtainable": false, + "httpCode": 400 + }, + { + "name": "SUBMITTER", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 409 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json new file mode 100644 index 0000000..e5d6d1e --- /dev/null +++ b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file