diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef7d8f6..e58996a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,3 +28,6 @@ jobs: - name: Run build run: npm run build + + - name: Run unit tests + run: npm run test:unit diff --git a/.gitignore b/.gitignore index 6f81168..f79aed5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules build npm-debug.log .env -.DS_Store \ No newline at end of file +.DS_Store +coverage diff --git a/package-lock.json b/package-lock.json index 044420a..8083873 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1226,6 +1226,13 @@ "lodash.isequal": "^4.5.0", "lodash.isfunction": "^3.0.9", "lodash.isnil": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "14.18.24", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/node/-/node-14.18.24.tgz", + "integrity": "sha1-QGsiDcdIlH4ZWdijinWXnocWZwQ=" + } } }, "@fast-csv/parse": { @@ -1240,6 +1247,13 @@ "lodash.isnil": "^4.0.0", "lodash.isundefined": "^3.0.1", "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "@types/node": { + "version": "14.18.24", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/node/-/node-14.18.24.tgz", + "integrity": "sha1-QGsiDcdIlH4ZWdijinWXnocWZwQ=" + } } }, "@hapi/address": { @@ -1877,6 +1891,14 @@ "@babel/types": "^7.3.0" } }, + "@types/cheerio": { + "version": "0.22.31", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/cheerio/-/cheerio-0.22.31.tgz", + "integrity": "sha1-uFOBAGU9a7Gwih5G3sdbTypdXrY=", + "requires": { + "@types/node": "*" + } + }, "@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -1924,9 +1946,9 @@ "integrity": "sha1-EAHMXmo3BLg8I2An538vWOoBD0A=" }, "@types/node": { - "version": "14.18.24", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/node/-/node-14.18.24.tgz", - "integrity": "sha1-QGsiDcdIlH4ZWdijinWXnocWZwQ=" + "version": "18.7.5", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/@types/node/-/node-18.7.5.tgz", + "integrity": "sha1-8cHUt9gjHAJ4liNHFjZW+cNvPoM=" }, "@types/parse-json": { "version": "4.0.0", @@ -2433,6 +2455,29 @@ "indent-string": "^4.0.0" } }, + "airbnb-prop-types": { + "version": "2.16.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz", + "integrity": "sha1-uWJ0zvoauxT2I/gEFz7pfBOXHcI=", + "requires": { + "array.prototype.find": "^2.1.1", + "function.prototype.name": "^1.1.2", + "is-regex": "^1.1.0", + "object-is": "^1.1.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.2", + "prop-types": "^15.7.2", + "prop-types-exact": "^1.2.0", + "react-is": "^16.13.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ=" + } + } + }, "ajv": { "version": "6.12.6", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ajv/-/ajv-6.12.6.tgz", @@ -2465,9 +2510,9 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, "ansi-colors": { - "version": "3.2.4", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=" + "version": "4.1.3", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha1-N2ETQOsiQ+cMxgTK011jJw1IeBs=" }, "ansi-escapes": { "version": "4.3.2", @@ -2675,6 +2720,29 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, + "array.prototype.filter": { + "version": "1.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz", + "integrity": "sha1-IGiHkqzbl6CUiOqu6e6785ZqriE=", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + } + }, + "array.prototype.find": { + "version": "2.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/array.prototype.find/-/array.prototype.find-2.2.0.tgz", + "integrity": "sha1-FTuKKK2JZc2G0xF7B+ZZavbyiA0=", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.4", + "es-shim-unscopables": "^1.0.0" + } + }, "array.prototype.flat": { "version": "1.3.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", @@ -3771,6 +3839,14 @@ "yallist": "^3.0.2" } }, + "p-map": { + "version": "3.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha1-1wTZr4orpoTiYA2aIVmD1BQal50=", + "requires": { + "aggregate-error": "^3.0.0" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rimraf/-/rimraf-2.7.1.tgz", @@ -3936,6 +4012,122 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/chardet/-/chardet-0.7.0.tgz", "integrity": "sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=" }, + "cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha1-eIv3RmUGsca/X65R0kosTWLkdoM=", + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "dependencies": { + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha1-5BuALh7t+fbK4YPOXmIteJ19jlM=", + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha1-XEXo6GmVJiYzHXqrMm0B2vZdWJ0=" + }, + "domutils": { + "version": "3.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha1-aWs4dSODOMsYa2wGEr1JAciaTxw=", + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + } + }, + "entities": { + "version": "4.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/entities/-/entities-4.3.1.tgz", + "integrity": "sha1-w0BiqUyGXDIvnWe0OE5Babzt5qQ=" + } + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha1-TYZzKGuBJsoqjkJ0DV48SISuIbQ=", + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "dependencies": { + "css-select": { + "version": "5.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha1-uOvWVUw2N8zHZoiAStP2pv2uqKY=", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha1-+17/z3bx3eosgb36pN5E55uscPQ=" + }, + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha1-5BuALh7t+fbK4YPOXmIteJ19jlM=", + "requires": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha1-XEXo6GmVJiYzHXqrMm0B2vZdWJ0=" + }, + "domutils": { + "version": "3.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha1-aWs4dSODOMsYa2wGEr1JAciaTxw=", + "requires": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + } + }, + "entities": { + "version": "4.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/entities/-/entities-4.3.1.tgz", + "integrity": "sha1-w0BiqUyGXDIvnWe0OE5Babzt5qQ=" + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha1-yeq0KO/842zWuSySS9sADvHx7R0=", + "requires": { + "boolbase": "^1.0.0" + } + } + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/chokidar/-/chokidar-3.5.3.tgz", @@ -4075,6 +4267,53 @@ "restore-cursor": "^3.1.0" } }, + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha1-w54ovwXtzeW+O5iZKiLe7Vork8c=", + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "requires": { + "color-convert": "^2.0.1" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha1-SDFDxWeu7UeFdZwIZXhtx319LjE=" + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=" + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha1-Md3BCTCht+C2ewjJbC9Jt3p4l4c=", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + } + } + }, "cli-width": { "version": "3.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cli-width/-/cli-width-3.0.0.tgz", @@ -4189,6 +4428,11 @@ "simple-swizzle": "^0.2.2" } }, + "colorette": { + "version": "1.4.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha1-UZD7uHJ2JZqGrXAL/yxtb6o/ykA=" + }, "combined-stream": { "version": "1.0.8", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/combined-stream/-/combined-stream-1.0.8.tgz", @@ -5271,6 +5515,11 @@ "path-type": "^3.0.0" } }, + "discontinuous-range": { + "version": "1.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=" + }, "dns-equal": { "version": "1.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/dns-equal/-/dns-equal-1.0.0.tgz", @@ -5365,11 +5614,11 @@ } }, "domhandler": { - "version": "4.3.1", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha1-jXkgM0FvWdaLwDpap7AYwcqJJ5w=", + "version": "5.0.3", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha1-zDhff3UfHR/GUMITdIBCVFOMfTE=", "requires": { - "domelementtype": "^2.2.0" + "domelementtype": "^2.3.0" }, "dependencies": { "domelementtype": { @@ -5410,6 +5659,13 @@ "integrity": "sha1-kMzOcIzZzYLMTcjD3dmr3VWyDog=", "requires": { "is-obj": "^2.0.0" + }, + "dependencies": { + "is-obj": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=" + } } }, "dotenv": { @@ -5493,9 +5749,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.4.220", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/electron-to-chromium/-/electron-to-chromium-1.4.220.tgz", - "integrity": "sha1-lHAU5xea9Cm7z6G6RutyH+UJfEw=" + "version": "1.4.221", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/electron-to-chromium/-/electron-to-chromium-1.4.221.tgz", + "integrity": "sha1-H/hCXSV6i/yCadVSpCaZPFtSVHE=" }, "elliptic": { "version": "6.5.4", @@ -5576,11 +5832,123 @@ } } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=", + "requires": { + "ansi-colors": "^4.1.1" + } + }, "entities": { "version": "2.2.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/entities/-/entities-2.2.0.tgz", "integrity": "sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU=" }, + "enzyme": { + "version": "3.11.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enzyme/-/enzyme-3.11.0.tgz", + "integrity": "sha1-cdaAxYD+k0n29axsd1vD5rennCg=", + "requires": { + "array.prototype.flat": "^1.2.3", + "cheerio": "^1.0.0-rc.3", + "enzyme-shallow-equal": "^1.0.1", + "function.prototype.name": "^1.1.2", + "has": "^1.0.3", + "html-element-map": "^1.2.0", + "is-boolean-object": "^1.0.1", + "is-callable": "^1.1.5", + "is-number-object": "^1.0.4", + "is-regex": "^1.0.5", + "is-string": "^1.0.5", + "is-subset": "^0.1.1", + "lodash.escape": "^4.0.1", + "lodash.isequal": "^4.5.0", + "object-inspect": "^1.7.0", + "object-is": "^1.0.2", + "object.assign": "^4.1.0", + "object.entries": "^1.1.1", + "object.values": "^1.1.1", + "raf": "^3.4.1", + "rst-selector-parser": "^2.2.3", + "string.prototype.trim": "^1.2.1" + } + }, + "enzyme-adapter-react-16": { + "version": "1.15.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz", + "integrity": "sha1-/Wd6ZY1iZhrFr9f39UHxQfgIWQE=", + "requires": { + "enzyme-adapter-utils": "^1.14.0", + "enzyme-shallow-equal": "^1.0.4", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.values": "^1.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.13.1", + "react-test-renderer": "^16.0.0-0", + "semver": "^5.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/semver/-/semver-5.7.1.tgz", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=" + } + } + }, + "enzyme-adapter-utils": { + "version": "1.14.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz", + "integrity": "sha1-r7sEhegDOqUMdE77X1cR5k+/GtA=", + "requires": { + "airbnb-prop-types": "^2.16.0", + "function.prototype.name": "^1.1.3", + "has": "^1.0.3", + "object.assign": "^4.1.2", + "object.fromentries": "^2.0.3", + "prop-types": "^15.7.2", + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/semver/-/semver-5.7.1.tgz", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=" + } + } + }, + "enzyme-shallow-equal": { + "version": "1.0.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz", + "integrity": "sha1-uSVsslpfQw+b/gc6hICMHXT87S4=", + "requires": { + "has": "^1.0.3", + "object-is": "^1.1.2" + } + }, + "enzyme-to-json": { + "version": "3.6.2", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/enzyme-to-json/-/enzyme-to-json-3.6.2.tgz", + "integrity": "sha1-lPhcQTvK6KtnvlOwqUtppWDieCM=", + "requires": { + "@types/cheerio": "^0.22.22", + "lodash": "^4.17.21", + "react-is": "^16.12.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ=" + } + } + }, "errno": { "version": "0.1.8", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/errno/-/errno-0.1.8.tgz", @@ -7464,6 +7832,15 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/hsla-regex/-/hsla-regex-1.0.0.tgz", "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=" }, + "html-element-map": { + "version": "1.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/html-element-map/-/html-element-map-1.3.1.tgz", + "integrity": "sha1-RLLLz6e+eqT/WXeeR+UQEuHHPAg=", + "requires": { + "array.prototype.filter": "^1.0.0", + "call-bind": "^1.0.2" + } + }, "html-encoding-sniffer": { "version": "1.0.2", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", @@ -7528,24 +7905,24 @@ } }, "htmlparser2": { - "version": "6.1.0", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha1-xNditsM3GgXb5l6UrkOp+EX7j7c=", + "version": "8.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha1-q6qYVHT87+JpvHYad5tUTXGW0BA=", "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" }, "dependencies": { "dom-serializer": { - "version": "1.4.1", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha1-3l1Bsa6ikCFdxFptrorc8dMuLTA=", + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha1-5BuALh7t+fbK4YPOXmIteJ19jlM=", "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" } }, "domelementtype": { @@ -7554,14 +7931,19 @@ "integrity": "sha1-XEXo6GmVJiYzHXqrMm0B2vZdWJ0=" }, "domutils": { - "version": "2.8.0", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha1-RDfe9dtuLR9dbuhZvZXKfQIEgTU=", + "version": "3.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha1-aWs4dSODOMsYa2wGEr1JAciaTxw=", "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" } + }, + "entities": { + "version": "4.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/entities/-/entities-4.3.1.tgz", + "integrity": "sha1-w0BiqUyGXDIvnWe0OE5Babzt5qQ=" } } }, @@ -7623,26 +8005,68 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, - "hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha1-aRh5r44iCupXUOiCfbTvYqVONh0=" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } + "human-signals": { + "version": "2.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha1-3JH8ukLk0G5Kuu0zs+ejwC9RTqA=" }, - "icss-utils": { - "version": "4.1.1", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/icss-utils/-/icss-utils-4.1.1.tgz", - "integrity": "sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc=", + "husky": { + "version": "1.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/husky/-/husky-1.3.1.tgz", + "integrity": "sha1-JoI+OZMAOIyir/8Rz6ioawAz+uA=", + "dev": true, "requires": { - "postcss": "^7.0.14" - } + "cosmiconfig": "^5.0.7", + "execa": "^1.0.0", + "find-up": "^3.0.0", + "get-stdin": "^6.0.0", + "is-ci": "^2.0.0", + "pkg-dir": "^3.0.0", + "please-upgrade-node": "^3.1.1", + "read-pkg": "^4.0.1", + "run-node": "^1.0.0", + "slash": "^2.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha1-ngm/cSs2CrkiXoEgSPcf3pyJZXs=", + "dev": true + }, + "read-pkg": { + "version": "4.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/read-pkg/-/read-pkg-4.0.1.tgz", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "dev": true, + "requires": { + "normalize-package-data": "^2.3.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0" + } + } + } + }, + "hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha1-aRh5r44iCupXUOiCfbTvYqVONh0=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha1-IRcLU3ie4nRHwvR91oMIFAP5pGc=", + "requires": { + "postcss": "^7.0.14" + } }, "identity-obj-proxy": { "version": "3.0.0", @@ -8078,9 +8502,9 @@ } }, "is-obj": { - "version": "2.0.0", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=" + "version": "1.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, "is-path-cwd": { "version": "2.2.0", @@ -8161,6 +8585,11 @@ "has-tostringtag": "^1.0.0" } }, + "is-subset": { + "version": "0.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" + }, "is-symbol": { "version": "1.0.4", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-symbol/-/is-symbol-1.0.4.tgz", @@ -8878,6 +9307,11 @@ "version": "5.7.4", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/acorn/-/acorn-5.7.4.tgz", "integrity": "sha1-Po2KmUfQWZoXltECJddDL0pKz14=" + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha1-bXhlbj2o14tOwLkG98CO8d/j9gg=" } } }, @@ -9188,11 +9622,286 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha1-7KKE910pZQeTCdwK2SVauy68FjI=" }, + "lint-staged": { + "version": "11.2.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lint-staged/-/lint-staged-11.2.6.tgz", + "integrity": "sha1-9HexrwKU2wVOWTfxcWed9juqTEM=", + "requires": { + "cli-truncate": "2.1.0", + "colorette": "^1.4.0", + "commander": "^8.2.0", + "cosmiconfig": "^7.0.1", + "debug": "^4.3.2", + "enquirer": "^2.3.6", + "execa": "^5.1.1", + "listr2": "^3.12.2", + "micromatch": "^4.0.4", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.2.0", + "string-argv": "0.3.1", + "stringify-object": "3.3.0", + "supports-color": "8.1.1" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/braces/-/braces-3.0.2.tgz", + "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", + "requires": { + "fill-range": "^7.0.1" + } + }, + "commander": { + "version": "8.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/commander/-/commander-8.3.0.tgz", + "integrity": "sha1-SDfqGy2me5xhamevuw+v7lZ7ymY=" + }, + "cosmiconfig": { + "version": "7.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cosmiconfig/-/cosmiconfig-7.0.1.tgz", + "integrity": "sha1-cU11ZSLKzoZ4Z8y0R0xdAbuuXW0=", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/execa/-/execa-5.1.1.tgz", + "integrity": "sha1-+ArZy/Qpj3vR1MlVXCHpN0HEEd0=", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha1-omLY7vZ6ztV8KFKtYWdSakPL97c=" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha1-NxYsJfy566oublPVtNiM4X2eDCs=", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=" + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha1-+sHj1TuXrVqdCunO8jifWBClwHc=" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha1-vImZp8u/d83InxMvbkZwUbSQkMY=", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha1-t+zR5e1T2o43pV4cImnguX7XSOo=", + "requires": { + "path-key": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha1-x2/Gbe5UIxyWKyK8yKcs8vmXU80=", + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha1-zW/BfihQDP9WwbhsCn/UpUpzAFw=", + "requires": { + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/which/-/which-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "listenercount": { "version": "1.0.1", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/listenercount/-/listenercount-1.0.1.tgz", "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" }, + "listr2": { + "version": "3.14.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha1-IxAcxi4Tdf1YNrJIJ20dK1H9vp4=", + "requires": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=" + }, + "colorette": { + "version": "2.0.19", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha1-zfBE9HrUGg9LVrOg1bTm4aLVp5g=" + }, + "rxjs": { + "version": "7.5.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha1-BEZXdVeGKv1pA1F858rnnsuWYrw=", + "requires": { + "tslib": "^2.1.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "tslib": { + "version": "2.4.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha1-fOyqfwc85oCgWEeqd76UEJjzbcM=" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/load-json-file/-/load-json-file-4.0.0.tgz", @@ -9309,6 +10018,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.difference/-/lodash.difference-4.5.0.tgz", "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" }, + "lodash.escape": { + "version": "4.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.escape/-/lodash.escape-4.0.1.tgz", + "integrity": "sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg=" + }, "lodash.escaperegexp": { "version": "4.1.2", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", @@ -9319,6 +10033,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" + }, "lodash.groupby": { "version": "4.6.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.groupby/-/lodash.groupby-4.6.0.tgz", @@ -9391,6 +10110,78 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "log-update": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha1-WJ7NNSRx8qHAxXAodUOmTf0g4KE=", + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "requires": { + "color-convert": "^2.0.1" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha1-SDFDxWeu7UeFdZwIZXhtx319LjE=" + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha1-UA6N0P1VsFgVCGJVsxla3ypF/ms=", + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha1-6Tk7oHEC5skaOyIUePAlfNKFblM=", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "loglevel": { "version": "1.8.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/loglevel/-/loglevel-1.8.0.tgz", @@ -9927,6 +10718,11 @@ "minimist": "^1.2.6" } }, + "moo": { + "version": "0.5.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/moo/-/moo-0.5.1.tgz", + "integrity": "sha1-eq5/OEubCfYgtqv29067zRtl28Q=" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -9999,6 +10795,17 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "nearley": { + "version": "2.20.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha1-JGzTPv8NAS+vGX/2d016x4rN1HQ=", + "requires": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/negotiator/-/negotiator-0.6.3.tgz", @@ -10460,7 +11267,6 @@ "version": "2.0.5", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/object.fromentries/-/object.fromentries-2.0.5.tgz", "integrity": "sha1-ezeyBRCcIedB5gVyf+iwrV+gglE=", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -10663,9 +11469,9 @@ } }, "p-map": { - "version": "3.0.0", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha1-1wTZr4orpoTiYA2aIVmD1BQal50=", + "version": "4.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs=", "requires": { "aggregate-error": "^3.0.0" } @@ -10772,9 +11578,28 @@ } }, "parse5": { - "version": "4.0.0", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha1-bXhlbj2o14tOwLkG98CO8d/j9gg=" + "version": "7.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha1-UfdKUlf1/MU2OJ6MLQs4AuG/qRo=", + "requires": { + "entities": "^4.3.0" + }, + "dependencies": { + "entities": { + "version": "4.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/entities/-/entities-4.3.1.tgz", + "integrity": "sha1-w0BiqUyGXDIvnWe0OE5Babzt5qQ=" + } + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha1-I8LMIzvPCbt766i4pp1GsIxiwvE=", + "requires": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + } }, "parseurl": { "version": "1.3.3", @@ -10926,6 +11751,14 @@ "find-up": "^3.0.0" } }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha1-rt3T+ZTJM+StmLmdmlVu+g4v6UI=", + "requires": { + "semver-compare": "^1.0.0" + } + }, "pn": { "version": "1.1.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/pn/-/pn-1.1.0.tgz", @@ -12005,6 +12838,16 @@ } } }, + "prop-types-exact": { + "version": "1.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/prop-types-exact/-/prop-types-exact-1.2.0.tgz", + "integrity": "sha1-gl1r5GCUZjhII345JamMbpROmGk=", + "requires": { + "has": "^1.0.3", + "object.assign": "^4.1.0", + "reflect.ownkeys": "^0.2.0" + } + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -12128,6 +12971,20 @@ "performance-now": "^2.1.0" } }, + "railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=" + }, + "randexp": { + "version": "0.4.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha1-6YatXl4x2uE93W97MBmqfIf2DKM=", + "requires": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/randombytes/-/randombytes-2.1.0.tgz", @@ -12451,6 +13308,24 @@ "tiny-warning": "^1.0.0" } }, + "react-test-renderer": { + "version": "16.14.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-test-renderer/-/react-test-renderer-16.14.0.tgz", + "integrity": "sha1-6YNgCHNI4mDFbU/iMV6XBIDCKK4=", + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "react-is": "^16.8.6", + "scheduler": "^0.19.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ=" + } + } + }, "react-transition-group": { "version": "4.4.5", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -12560,6 +13435,11 @@ "strip-indent": "^3.0.0" } }, + "reflect.ownkeys": { + "version": "0.2.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", + "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=" + }, "regenerate": { "version": "1.4.2", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/regenerate/-/regenerate-1.4.2.tgz", @@ -12707,6 +13587,14 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domelementtype/-/domelementtype-2.3.0.tgz", "integrity": "sha1-XEXo6GmVJiYzHXqrMm0B2vZdWJ0=" }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha1-jXkgM0FvWdaLwDpap7AYwcqJJ5w=", + "requires": { + "domelementtype": "^2.2.0" + } + }, "domutils": { "version": "2.8.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/domutils/-/domutils-2.8.0.tgz", @@ -12717,6 +13605,17 @@ "domhandler": "^4.2.0" } }, + "htmlparser2": { + "version": "6.1.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha1-xNditsM3GgXb5l6UrkOp+EX7j7c=", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, "nth-check": { "version": "2.1.1", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/nth-check/-/nth-check-2.1.1.tgz", @@ -12964,6 +13863,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rework-visit/-/rework-visit-1.0.0.tgz", "integrity": "sha1-mUWygD8hni96ygCtuLyfZA+ELJo=" }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha1-0LfEQasnINBdxM8m4ByJYx2doIs=" + }, "rgb-regex": { "version": "1.0.1", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rgb-regex/-/rgb-regex-1.0.1.tgz", @@ -12991,6 +13895,15 @@ "inherits": "^2.0.1" } }, + "rst-selector-parser": { + "version": "2.2.3", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", + "integrity": "sha1-gbIw6i/MYGbInjRy3nlChdmwPZE=", + "requires": { + "lodash.flattendeep": "^4.4.0", + "nearley": "^2.7.10" + } + }, "rsvp": { "version": "4.8.5", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/rsvp/-/rsvp-4.8.5.tgz", @@ -13001,6 +13914,12 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/run-async/-/run-async-2.4.1.tgz", "integrity": "sha1-hEDsz5nqPnC9QJ1JqriOEMGJpFU=" }, + "run-node": { + "version": "1.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/run-node/-/run-node-1.0.0.tgz", + "integrity": "sha1-RrULlGoqotSUeuHYhumFb9nKvl4=", + "dev": true + }, "run-queue": { "version": "1.0.3", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/run-queue/-/run-queue-1.0.3.tgz", @@ -13173,6 +14092,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/semver/-/semver-6.3.0.tgz", "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=" }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + }, "send": { "version": "0.18.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/send/-/send-0.18.0.tgz", @@ -13902,6 +14826,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" }, + "string-argv": { + "version": "0.3.1", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha1-leL77AQnrhkYSTX4FtdKqkxcGdo=" + }, "string-length": { "version": "2.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/string-length/-/string-length-2.0.0.tgz", @@ -13967,6 +14896,16 @@ "side-channel": "^1.0.4" } }, + "string.prototype.trim": { + "version": "1.2.6", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz", + "integrity": "sha1-gklgeH2zep4kcRgC7QwdHAJU+D4=", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, "string.prototype.trimend": { "version": "1.0.5", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", @@ -14003,13 +14942,6 @@ "get-own-enumerable-property-symbols": "^3.0.0", "is-obj": "^1.0.1", "is-regexp": "^1.0.0" - }, - "dependencies": { - "is-obj": { - "version": "1.0.1", - "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - } } }, "strip-ansi": { @@ -14039,6 +14971,11 @@ "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=" + }, "strip-indent": { "version": "3.0.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/strip-indent/-/strip-indent-3.0.0.tgz", @@ -15492,6 +16429,11 @@ "uuid": "^3.3.2" }, "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=" + }, "uuid": { "version": "3.4.0", "resolved": "https://artylab.expedia.biz/api/npm/public-npm-virtual/uuid/-/uuid-3.4.0.tgz", diff --git a/package.json b/package.json index e8d4b5f..f5bff7d 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,9 @@ "css-loader": "3.4.2", "dotenv": "8.2.0", "dotenv-expand": "5.1.0", + "enzyme": "^3.11.0", + "enzyme-adapter-react-16": "^1.15.6", + "enzyme-to-json": "^3.6.2", "eslint": "^6.8.0", "eslint-config-react-app": "^5.2.0", "eslint-loader": "3.0.3", @@ -41,6 +44,7 @@ "jest-resolve": "24.9.0", "jest-watch-typeahead": "0.4.2", "jira-connector": "^3.1.0", + "lint-staged": "^11.0.0", "mini-css-extract-plugin": "0.9.0", "node-sass": "^4.13.1", "optimize-css-assets-webpack-plugin": "5.0.3", @@ -76,7 +80,8 @@ "eslint-config-prettier": "^6.10.1", "eslint-plugin-jest": "^23.8.2", "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.18.0" + "eslint-plugin-react": "^7.18.0", + "husky": "^1.1.2" }, "engines": { "node": "14.18.2", @@ -86,7 +91,22 @@ "start": "concurrently --kill-others \"npm run server\" \"node scripts/start.js\"", "server": "node server/server.js", "build": "node scripts/build.js", - "lint": "eslint src/**/*.js" + "test:unit": "jest --coverage", + "lint": "eslint src/**/*.js", + "lint-staged": "lint-staged", + "prettier:check": "prettier --check \"src/**/*.js\"" + }, + "husky": { + "hooks": { + "pre-commit": "npm run lint-staged", + "pre-push": "npm run test:unit" + } + }, + "lint-staged": { + "src/**/*.js": [ + "npm run lint", + "npm run prettier:check" + ] }, "eslintConfig": { "extends": "react-app" @@ -117,6 +137,14 @@ "setupFilesAfterEnv": [ "/src/setupTests.js" ], + "coverageThreshold": { + "global": { + "lines": 47, + "statements": 47, + "functions": 41, + "branches": 32 + } + }, "testMatch": [ "/src/**/__tests__/**/*.{js,jsx,ts,tsx}", "/src/**/*.{spec,test}.{js,jsx,ts,tsx}" diff --git a/src/components/App/tests/App.test.js b/src/components/App/tests/App.test.js new file mode 100644 index 0000000..b772be4 --- /dev/null +++ b/src/components/App/tests/App.test.js @@ -0,0 +1,12 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import serializer from 'enzyme-to-json/serializer'; +import App from '../App'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + it('renders App component', () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/src/components/App/tests/__snapshots__/App.test.js.snap b/src/components/App/tests/__snapshots__/App.test.js.snap new file mode 100644 index 0000000..4ce0a33 --- /dev/null +++ b/src/components/App/tests/__snapshots__/App.test.js.snap @@ -0,0 +1,34 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders App component 1`] = ` + + + Welcome to the JIRA project! + + + + +
+ + +`; diff --git a/src/components/Checkboxes/GreenCheckbox/tests/GreenCheckbox.test.js b/src/components/Checkboxes/GreenCheckbox/tests/GreenCheckbox.test.js new file mode 100644 index 0000000..7c42c79 --- /dev/null +++ b/src/components/Checkboxes/GreenCheckbox/tests/GreenCheckbox.test.js @@ -0,0 +1,14 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import GreenCheckbox from '../GreenCheckbox'; +import serializer from 'enzyme-to-json/serializer'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + it('renders GreenCheckbox component', () => { + const component = shallow().dive(); + + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/components/Checkboxes/GreenCheckbox/tests/__snapshots__/GreenCheckbox.test.js.snap b/src/components/Checkboxes/GreenCheckbox/tests/__snapshots__/GreenCheckbox.test.js.snap new file mode 100644 index 0000000..17e5510 --- /dev/null +++ b/src/components/Checkboxes/GreenCheckbox/tests/__snapshots__/GreenCheckbox.test.js.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders GreenCheckbox component 1`] = ` + +`; diff --git a/src/components/Checkboxes/tests/Checkboxes.test.js b/src/components/Checkboxes/tests/Checkboxes.test.js new file mode 100644 index 0000000..a15d791 --- /dev/null +++ b/src/components/Checkboxes/tests/Checkboxes.test.js @@ -0,0 +1,75 @@ +import React from 'react'; +import {mount, shallow} from 'enzyme'; +import Checkboxes from '../Checkboxes'; +import serializer from 'enzyme-to-json/serializer'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + let defaultProps; + + beforeEach(() => { + defaultProps = { + checkboxState: { + agreeChecked: false, + unblockChecked: true, + keyChecked: true, + issueTypeChecked: true, + summaryChecked: true, + assigneeChecked: true, + storyPointsChecked: true, + statusChecked: true, + reporterChecked: true, + labelsChecked: true, + priorityChecked: true, + subtasksCountChecked: true, + updatedDateChecked: true, + componentsChecked: true, + fixVersionsChecked: true + } + }; + }); + + it('renders Checkboxes component', () => { + const component = shallow(); + + expect(component.find('.required-checkboxes')).toHaveLength(1); + expect(component).toMatchSnapshot(); + }); + + it('should hide required fields configuration, if unblockChecked is false', () => { + defaultProps = { + ...defaultProps, + checkboxState: { + unblockChecked: false + } + }; + + const component = shallow(); + + expect(component.find('.required-checkboxes')).toHaveLength(0); + }); + + it('should call setCheckboxState prop function on checkbox value change', async () => { + defaultProps = { + ...defaultProps, + setCheckboxState: jest.fn() + }; + + const event = { + target: { + name: 'agreeChecked', + checked: true + } + }; + + const component = mount(); + + component + .find('WithStyles(ForwardRef(Checkbox))') + .last() + .prop('onChange')(event); + + expect(component.prop('setCheckboxState')).toHaveBeenCalled(); + }); +}); diff --git a/src/components/Checkboxes/tests/__snapshots__/Checkboxes.test.js.snap b/src/components/Checkboxes/tests/__snapshots__/Checkboxes.test.js.snap new file mode 100644 index 0000000..8d17b9c --- /dev/null +++ b/src/components/Checkboxes/tests/__snapshots__/Checkboxes.test.js.snap @@ -0,0 +1,232 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders Checkboxes component 1`] = ` + +
+ + If you want, you can configure fields, data from which will be saved in your source file! + +
+ + Required fields + +
+ + + } + label="Do you want to configure required fields?" + /> + +
+
+
+ + + } + label="Key" + /> + + } + label="Issue Type" + /> + + } + label="Summary" + /> + + } + label="Assignee" + /> + + } + label="Story points" + /> + + } + label="Status" + /> + +
+
+
+ + Optional fields + +
+
+
+ + + } + label="Reporter" + /> + + } + label="Labels" + /> + + } + label="Priority" + /> + + } + label="Subtasks count" + /> + + } + label="Updated date" + /> + + } + label="Components" + /> + + } + label="Fix versions" + /> + +
+
+
+ + + } + label="Are you agree with current configuration?" + /> + +
+
+`; diff --git a/src/components/DataButton/tests/DataButton.test.js b/src/components/DataButton/tests/DataButton.test.js new file mode 100644 index 0000000..a5bc336 --- /dev/null +++ b/src/components/DataButton/tests/DataButton.test.js @@ -0,0 +1,45 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import DataButton from '../DataButton'; +import serializer from 'enzyme-to-json/serializer'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + let defaultProps; + + beforeEach(() => { + defaultProps = { + jiraUrl: 'jira.example.com', + username: 'username', + password: 'password', + jql: 'status=done AND project="EXAMPLE" AND assignee=username' + }; + }); + it('renders DataButton component', () => { + const component = shallow().dive(); + + expect(component).toMatchSnapshot(); + }); + + it('should disable DataButton, when all required props are provided', () => { + const component = shallow().dive(); + + expect( + component.find('WithStyles(ForwardRef(Button))').prop('disabled') + ).toEqual(false); + }); + + it('should disable DataButton, when at least one of required props is not provided', () => { + defaultProps = { + ...defaultProps, + jql: null + }; + + const component = shallow().dive(); + + expect( + component.find('WithStyles(ForwardRef(Button))').prop('disabled') + ).toEqual(true); + }); +}); diff --git a/src/components/DataButton/tests/__snapshots__/DataButton.test.js.snap b/src/components/DataButton/tests/__snapshots__/DataButton.test.js.snap new file mode 100644 index 0000000..ac1b40b --- /dev/null +++ b/src/components/DataButton/tests/__snapshots__/DataButton.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders DataButton component 1`] = ` +
+ + GET DATA + +
+`; diff --git a/src/components/DownloadButton/tests/DownloadButton.test.js b/src/components/DownloadButton/tests/DownloadButton.test.js new file mode 100644 index 0000000..a2a45b0 --- /dev/null +++ b/src/components/DownloadButton/tests/DownloadButton.test.js @@ -0,0 +1,59 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import DownloadButton from '../DownloadButton'; +import serializer from 'enzyme-to-json/serializer'; +import { + SUCCESS_MESSAGE, + ERROR_MESSAGE +} from '../../../constants/statusMessages'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + let defaultProps; + + beforeEach(() => { + defaultProps = { + status: SUCCESS_MESSAGE, + checkboxState: { + agreeChecked: true + } + }; + }); + it('renders DownloadButton component', () => { + const component = shallow().dive(); + + expect( + component.find('WithStyles(ForwardRef(Button))').prop('disabled') + ).toEqual(false); + expect(component).toMatchSnapshot(); + }); + + it('should disable DownloadButton, when status is success, but agreeChecked is false', () => { + defaultProps = { + ...defaultProps, + checkboxState: { + agreeChecked: false + } + }; + + const component = shallow().dive(); + + expect( + component.find('WithStyles(ForwardRef(Button))').prop('disabled') + ).toEqual(true); + }); + + it('should disable DownloadButton, when status is error', () => { + defaultProps = { + ...defaultProps, + status: ERROR_MESSAGE + }; + + const component = shallow().dive(); + + expect( + component.find('WithStyles(ForwardRef(Button))').prop('disabled') + ).toEqual(true); + }); +}); diff --git a/src/components/DownloadButton/tests/__snapshots__/DownloadButton.test.js.snap b/src/components/DownloadButton/tests/__snapshots__/DownloadButton.test.js.snap new file mode 100644 index 0000000..782e9c0 --- /dev/null +++ b/src/components/DownloadButton/tests/__snapshots__/DownloadButton.test.js.snap @@ -0,0 +1,20 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders DownloadButton component 1`] = ` +
+ + Upload + + +
+`; diff --git a/src/components/JiraCredentails/tests/JiraCredentials.test.js b/src/components/JiraCredentails/tests/JiraCredentials.test.js new file mode 100644 index 0000000..e093862 --- /dev/null +++ b/src/components/JiraCredentails/tests/JiraCredentials.test.js @@ -0,0 +1,66 @@ +import React from 'react'; +import {mount, shallow} from 'enzyme'; +import JiraCredentials from '../JiraCredentials'; +import serializer from 'enzyme-to-json/serializer'; +import {act} from 'react-dom/test-utils'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + let defaultProps; + + beforeEach(() => { + defaultProps = { + username: 'username', + password: 'password', + setUsername: jest.fn(), + setPassword: jest.fn() + }; + }); + + it('renders JiraCredentials component', () => { + const component = shallow(); + + expect(component).toMatchSnapshot(); + }); + + it('should call setUsername function on username value change', () => { + const component = mount(); + const event = { + target: { + value: 'other_username' + } + }; + + act(() => { + component + .find('WithStyles(ForwardRef(TextField))') + .first() + .prop('onChange')(event); + }); + + expect(component.prop('setUsername')).toHaveBeenCalledWith( + 'other_username' + ); + }); + + it('should call setPassword function on password value change', () => { + const component = mount(); + const event = { + target: { + value: 'other_password' + } + }; + + act(() => { + component + .find('WithStyles(ForwardRef(TextField))') + .last() + .prop('onChange')(event); + }); + + expect(component.prop('setPassword')).toHaveBeenCalledWith( + 'other_password' + ); + }); +}); diff --git a/src/components/JiraCredentails/tests/__snapshots__/JiraCredentials.test.js.snap b/src/components/JiraCredentails/tests/__snapshots__/JiraCredentials.test.js.snap new file mode 100644 index 0000000..3b79638 --- /dev/null +++ b/src/components/JiraCredentails/tests/__snapshots__/JiraCredentials.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders JiraCredentials component 1`] = ` + + + Please, enter your JIRA credentials here! + +
+
+ +
+
+ +
+
+
+`; diff --git a/src/components/JiraQuery/tests/JiraQuery.test.js b/src/components/JiraQuery/tests/JiraQuery.test.js new file mode 100644 index 0000000..383d181 --- /dev/null +++ b/src/components/JiraQuery/tests/JiraQuery.test.js @@ -0,0 +1,18 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import JiraQuery from '../JiraQuery'; +import serializer from 'enzyme-to-json/serializer'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + it('renders JiraQuery component', () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/components/JiraQuery/tests/__snapshots__/JiraQuery.test.js.snap b/src/components/JiraQuery/tests/__snapshots__/JiraQuery.test.js.snap new file mode 100644 index 0000000..c22a35b --- /dev/null +++ b/src/components/JiraQuery/tests/__snapshots__/JiraQuery.test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders JiraQuery component 1`] = ` + + + Please, enter JIRA query needed to retrieve issues data! + +
+ +
+
+`; diff --git a/src/components/JiraUrl/tests/JiraUrl.test.js b/src/components/JiraUrl/tests/JiraUrl.test.js new file mode 100644 index 0000000..7d3e880 --- /dev/null +++ b/src/components/JiraUrl/tests/JiraUrl.test.js @@ -0,0 +1,32 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import JiraUrl from '../JiraUrl'; +import serializer from 'enzyme-to-json/serializer'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + it('renders JiraUrl component', () => { + const component = shallow(); + + expect(component).toMatchSnapshot(); + }); + + it('should not show an error, when isJiraUrlTouched is true and jiraUrl prop is provided', () => { + const component = shallow( + + ); + + expect( + component.find('WithStyles(ForwardRef(TextField))').prop('error') + ).toEqual(false); + }); + + it('should show an error, when isJiraUrlTouched is true and jiraUrl prop is not provided', () => { + const component = shallow(); + + expect( + component.find('WithStyles(ForwardRef(TextField))').prop('error') + ).toEqual(true); + }); +}); diff --git a/src/components/JiraUrl/tests/__snapshots__/JiraUrl.test.js.snap b/src/components/JiraUrl/tests/__snapshots__/JiraUrl.test.js.snap new file mode 100644 index 0000000..793f50a --- /dev/null +++ b/src/components/JiraUrl/tests/__snapshots__/JiraUrl.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders JiraUrl component 1`] = ` + + + Please, enter JIRA URL below! (Example - jira.organization.com) + +
+ + +
+`; diff --git a/src/components/Status/tests/Status.test.js b/src/components/Status/tests/Status.test.js new file mode 100644 index 0000000..774435f --- /dev/null +++ b/src/components/Status/tests/Status.test.js @@ -0,0 +1,40 @@ +import React from 'react'; +import {mount} from 'enzyme'; +import Status from '../Status'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { + SUCCESS_MESSAGE, + ERROR_MESSAGE +} from '../../../constants/statusMessages'; + +describe('', () => { + it('renders CircularProgress component, when isLoading prop is true', () => { + const component = mount(); + + expect(component.contains()).toBe(true); + }); + + it('should render error text, when status prop equals ERROR_MESSAGE and isLoading is false', () => { + const component = mount(); + + expect(component.find('.error')).toHaveLength(1); + expect(component.find('div').text()).toEqual( + "Something went wrong. Maybe it's the problem with your VPN connection. Also, please check your JIRA credentials, URL, query and try again..." + ); + }); + + it('should render success text, when status prop equals SUCCESS_MESSAGE and isLoading is false', () => { + const component = mount(); + + expect(component.find('.success')).toHaveLength(1); + expect(component.find('div').text()).toEqual( + 'Success! Data was received' + ); + }); + + it('should render no text, when status prop not equals ERROR_MESSAGE or SUCCESS_MESSAGE and isLoading is false', () => { + const component = mount(); + + expect(component.find('div').text()).toEqual(''); + }); +}); diff --git a/src/components/UploadFile/tests/UploadFile.test.js b/src/components/UploadFile/tests/UploadFile.test.js new file mode 100644 index 0000000..fa9436c --- /dev/null +++ b/src/components/UploadFile/tests/UploadFile.test.js @@ -0,0 +1,33 @@ +import React from 'react'; +import {shallow} from 'enzyme'; +import serializer from 'enzyme-to-json/serializer'; +import UploadFile from '../UploadFile'; + +expect.addSnapshotSerializer(serializer); + +describe('', () => { + let defaultProps; + + beforeEach(async () => { + defaultProps = { + selectedFile: false, + onFileChange: jest.fn() + }; + }); + + it('renders UploadFile component', () => { + const component = shallow().dive(); + + expect(component.find('.choose-file-container')).toHaveLength(1); + }); + + it('should show CheckIcon, if selectedFile prop is true', () => { + defaultProps = { + ...defaultProps, + selectedFile: true + }; + const component = shallow().dive(); + + expect(component.find('.hide-check-icon')).toHaveLength(0); + }); +}); diff --git a/src/index.js b/src/index.js index f38104e..6e8f1ac 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ /* eslint-disable no-undef */ import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/src/serviceWorker.js b/src/serviceWorker.js index 4ae2a43..3e096f8 100644 --- a/src/serviceWorker.js +++ b/src/serviceWorker.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ /* eslint-disable no-console */ /* eslint-disable no-undef */ // This optional code is used to register a service worker. diff --git a/src/setupTests.js b/src/setupTests.js index 74b1a27..9bfd6b4 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -1,5 +1,5 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom +import {configure} from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; import '@testing-library/jest-dom/extend-expect'; + +configure({adapter: new Adapter()});