From c59ad4dd9ac5c11ecf667e365443470f278138ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 06:02:01 +0000 Subject: [PATCH 001/261] Bump qs from 6.5.2 to 6.5.3 Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a838afe8f..d7fc25822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19150,9 +19150,9 @@ } }, "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, "engines": { "node": ">=0.6" @@ -39784,9 +39784,9 @@ "dev": true }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "query-string": { From b311bd8738d191a29c7ad3a3ebf90d0b52f08b3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:21:59 +0000 Subject: [PATCH 002/261] Bump express from 4.17.2 to 4.18.2 Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 495 ++++++++++++++++++++++++++++++---------------- 1 file changed, 320 insertions(+), 175 deletions(-) diff --git a/package-lock.json b/package-lock.json index a838afe8f..3b8ff4d3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5785,13 +5785,13 @@ "dev": true }, "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { "node": ">= 0.6" @@ -6857,24 +6857,27 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "dependencies": { - "bytes": "3.1.1", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/body-parser/node_modules/debug": { @@ -6886,17 +6889,29 @@ "ms": "2.0.0" } }, + "node_modules/body-parser/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "node_modules/body-parser/node_modules/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" }, @@ -7196,9 +7211,9 @@ "dev": true }, "node_modules/bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "engines": { "node": ">= 0.8" @@ -8074,9 +8089,9 @@ } }, "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true, "engines": { "node": ">= 0.6" @@ -9113,10 +9128,14 @@ } }, "node_modules/destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } }, "node_modules/detect-newline": { "version": "2.1.0", @@ -9404,7 +9423,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, "node_modules/ejs": { @@ -9462,7 +9481,7 @@ "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true, "engines": { "node": ">= 0.8" @@ -9993,7 +10012,7 @@ "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, "engines": { "node": ">= 0.6" @@ -10230,38 +10249,39 @@ } }, "node_modules/express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "dependencies": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.1", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.1", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.9.6", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", + "send": "0.18.0", + "serve-static": "1.15.0", "setprototypeof": "1.2.0", - "statuses": "~1.5.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -10279,6 +10299,15 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -10286,10 +10315,13 @@ "dev": true }, "node_modules/express/node_modules/qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, "engines": { "node": ">=0.6" }, @@ -10317,6 +10349,15 @@ } ] }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -10672,17 +10713,17 @@ } }, "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "engines": { @@ -10701,9 +10742,18 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/finalhandler/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/find-babel-config": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", @@ -10882,7 +10932,7 @@ "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, "engines": { "node": ">= 0.6" @@ -11612,19 +11662,37 @@ "dev": true }, "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "dependencies": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" } }, "node_modules/http-parser-js": { @@ -16707,7 +16775,7 @@ "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, "engines": { "node": ">= 0.6" @@ -17125,9 +17193,9 @@ "dev": true }, "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, "engines": { "node": ">= 0.6" @@ -17593,9 +17661,9 @@ "dev": true }, "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "dependencies": { "ee-first": "1.1.1" @@ -19225,13 +19293,13 @@ } }, "node_modules/raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, "dependencies": { - "bytes": "3.1.1", - "http-errors": "1.8.1", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -20173,24 +20241,24 @@ } }, "node_modules/send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" @@ -20208,9 +20276,18 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/send/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -20229,6 +20306,15 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", @@ -20299,15 +20385,15 @@ "dev": true }, "node_modules/serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" }, "engines": { "node": ">= 0.8.0" @@ -22178,7 +22264,7 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true, "engines": { "node": ">= 0.8" @@ -28975,13 +29061,13 @@ "dev": true }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "acorn": { @@ -29828,21 +29914,23 @@ "dev": true }, "body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, "requires": { - "bytes": "3.1.1", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "dependencies": { "debug": { @@ -29854,17 +29942,26 @@ "ms": "2.0.0" } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } } } }, @@ -30123,9 +30220,9 @@ "dev": true }, "bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, "cacache": { @@ -30822,9 +30919,9 @@ } }, "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true }, "cookie-signature": { @@ -31651,9 +31748,9 @@ } }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true }, "detect-newline": { @@ -31897,7 +31994,7 @@ "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, "ejs": { @@ -31950,7 +32047,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true }, "end-of-stream": { @@ -32343,7 +32440,7 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true }, "event-pubsub": { @@ -32541,38 +32638,39 @@ } }, "express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.1", + "body-parser": "1.20.1", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.1", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.9.6", + "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.17.2", - "serve-static": "1.14.2", + "send": "0.18.0", + "serve-static": "1.15.0", "setprototypeof": "1.2.0", - "statuses": "~1.5.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -32587,6 +32685,12 @@ "ms": "2.0.0" } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -32594,16 +32698,25 @@ "dev": true }, "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", - "dev": true + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true } } }, @@ -32897,17 +33010,17 @@ } }, "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" }, "dependencies": { @@ -32923,7 +33036,13 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true } } @@ -33057,7 +33176,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, "from2": { @@ -33627,16 +33746,30 @@ "dev": true }, "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } } }, "http-parser-js": { @@ -37747,7 +37880,7 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, "memory-fs": { @@ -38096,9 +38229,9 @@ "dev": true }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "neo-async": { @@ -38471,9 +38604,9 @@ "dev": true }, "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "requires": { "ee-first": "1.1.1" @@ -39843,13 +39976,13 @@ "dev": true }, "raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, "requires": { - "bytes": "3.1.1", - "http-errors": "1.8.1", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } @@ -40586,24 +40719,24 @@ "dev": true }, "send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dev": true, "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { "debug": { @@ -40618,11 +40751,17 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true } } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -40634,6 +40773,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true } } }, @@ -40703,15 +40848,15 @@ } }, "serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" } }, "set-blocking": { @@ -42250,7 +42395,7 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "dev": true }, "unquote": { From c3b113d301909295a58c7d08ed4b4e47fc0c8a90 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 16 Jan 2023 15:50:36 -0500 Subject: [PATCH 003/261] CSR-1083 | Child part prices not included in service package quotes --- src/mixins/base-mixin.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 0bebdc372..896a663ef 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -64,17 +64,12 @@ export default { }; }, getTierOnePackagePrice(lineItems) { - let totalPrice = 0; - lineItems.forEach((lineItem) => { - const partType = lineItem.partType.toUpperCase(); - if ( - partType != partTypeStrings.FRONT_WIPER && - partType != partTypeStrings.REAR_WIPER && - partType != partTypeStrings.RAIN_DEFENSE - ) { - totalPrice += this.getTotalLineItemPrice(lineItem); - } + let lineItemsToPrice = lineItems.filter(lineItem => { + return lineItem.partType != partTypeStrings.FRONT_WIPER && + lineItem.partType != partTypeStrings.REAR_WIPER && + lineItem.partType != partTypeStrings.RAIN_DEFENSE }); + let totalPrice = this.getTotalPriceOfAllLineItemsAndChildParts(lineItemsToPrice); return totalPrice; }, filterOutFees(lineItems) { @@ -86,6 +81,16 @@ export default { }); return filteredLineItems; }, + getTotalPriceOfAllLineItemsAndChildParts(lineItems) { + let totalPrice = 0; + lineItems.forEach((lineItem) => { + totalPrice += this.getTotalLineItemPrice(lineItem); + if (lineItem.childParts) { + totalPrice += this.getTotalPriceOfAllLineItemsAndChildParts(lineItem.childParts); + } + }); + return totalPrice; + }, getTotalLineItemPrice(lineItem) { return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice; }, From 3e0d4a789fc989f0bac332922ddfa963c5d277f7 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 16 Jan 2023 15:59:02 -0500 Subject: [PATCH 004/261] CSR-1083 | Formatting --- src/mixins/base-mixin.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 896a663ef..9018de79b 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -64,10 +64,12 @@ export default { }; }, getTierOnePackagePrice(lineItems) { - let lineItemsToPrice = lineItems.filter(lineItem => { - return lineItem.partType != partTypeStrings.FRONT_WIPER && - lineItem.partType != partTypeStrings.REAR_WIPER && - lineItem.partType != partTypeStrings.RAIN_DEFENSE + let lineItemsToPrice = lineItems.filter((lineItem) => { + return ( + lineItem.partType != partTypeStrings.FRONT_WIPER && + lineItem.partType != partTypeStrings.REAR_WIPER && + lineItem.partType != partTypeStrings.RAIN_DEFENSE + ); }); let totalPrice = this.getTotalPriceOfAllLineItemsAndChildParts(lineItemsToPrice); return totalPrice; @@ -86,7 +88,9 @@ export default { lineItems.forEach((lineItem) => { totalPrice += this.getTotalLineItemPrice(lineItem); if (lineItem.childParts) { - totalPrice += this.getTotalPriceOfAllLineItemsAndChildParts(lineItem.childParts); + totalPrice += this.getTotalPriceOfAllLineItemsAndChildParts( + lineItem.childParts + ); } }); return totalPrice; From ad71e03985e0e274d53b0c2ad38e844c59e808c5 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 16 Jan 2023 16:58:32 -0500 Subject: [PATCH 005/261] CSR-1051: update funnel-sub-header class logic / fix modal ul spacing --- .../funnel-sub-header/funnel-sub-header.vue | 7 ++++--- .../service-package-radio/service-package-radio.vue | 6 ++++++ src/layouts/vehicle-make/vehicle-make.vue | 3 ++- src/layouts/vehicle-model/vehicle-model.vue | 3 ++- src/layouts/vehicle-style/vehicle-style.vue | 3 ++- src/layouts/vehicle-year/vehicle-year.vue | 2 +- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/common-components/funnel-sub-header/funnel-sub-header.vue b/src/common-components/funnel-sub-header/funnel-sub-header.vue index 356e6fb0e..356dc50c1 100644 --- a/src/common-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/common-components/funnel-sub-header/funnel-sub-header.vue @@ -32,6 +32,10 @@ export default { props: { hasBackButton: Boolean, cmsWidgetName: String, + headerColor: { + type: String, + default: "dark-header", + }, }, components: { buttonBack, @@ -46,9 +50,6 @@ export default { backButtonAccessibleText() { return this.getCmsContent(this.cmsWidgetName, "BackButtonAccessibleText"); }, - headerColor() { - return this.subText ? "dark-header" : "light-header"; - }, }, methods: { clickEvent() { diff --git a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue index 856b5a940..74bed2c5e 100644 --- a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue +++ b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue @@ -229,6 +229,12 @@ export default { li { margin-bottom: 0.5rem; font-size: 0.875rem; + line-height: 1.714; + a { + line-height: 1.714; + padding: 0; + text-underline-offset: 0.1em; + } } } diff --git a/src/layouts/vehicle-make/vehicle-make.vue b/src/layouts/vehicle-make/vehicle-make.vue index 1034b0959..6babfa443 100644 --- a/src/layouts/vehicle-make/vehicle-make.vue +++ b/src/layouts/vehicle-make/vehicle-make.vue @@ -7,7 +7,8 @@ + @click-event="backButtonAction" + headerColor="light-header" />
+ @click-event="backButtonAction" + headerColor="light-header" />
+ @click-event="backButtonAction" + headerColor="light-header" />
- +
Date: Tue, 17 Jan 2023 10:19:54 -0500 Subject: [PATCH 006/261] CSR-1086 Recover from old saved sessions and errors --- .../heritage-integration/order-helper.js | 2 +- src/store/index.js | 38 ++++++++++++------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js index 05b4c4dc4..7cf3cc12b 100644 --- a/src/helpers/heritage-integration/order-helper.js +++ b/src/helpers/heritage-integration/order-helper.js @@ -44,7 +44,7 @@ export async function loadSessionIfPresent(isConceptInsurance) { funnelCookie.ReferralCorrelationId, isConceptInsurance ) - ).data; + )?.data; } /* diff --git a/src/store/index.js b/src/store/index.js index c41f38ddf..d2634dd10 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -10,6 +10,7 @@ import { experimentTriggers } from "@/constants/experiments"; import { damageLocationsSelected } from "@/constants/damage-locations-selected"; import { fmgPageValues } from "@/router/router-constants/fmgPage-values"; import router from "@/router"; +import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js"; // Export State const getDefaultState = () => { @@ -1059,23 +1060,32 @@ export const actions = { referralCorrelationId: referralCorrelationId, }, }) - .then((response) => { - // Flatten location and name properties - response.data.order.damage?.glassToReplace?.map((glass) => { - glass.glassLocation = glass.location; - glass.glassName = glass.name; - delete glass.location; - delete glass.name; - return glass; - }); + .then( + (response) => { + // Flatten location and name properties + response.data.order.damage?.glassToReplace?.map((glass) => { + glass.glassLocation = glass.location; + glass.glassName = glass.name; + delete glass.location; + delete glass.name; + return glass; + }); - // clear the state if the existing EON does not equal what is returned from loadSession - if (context.state.order.eon && context.state.order.eon != response.data.eon) { + // clear the state if the existing EON does not equal what is returned from loadSession + if (context.state.order.eon && context.state.order.eon != response.data.eon) { + context.commit(storeMutations.RESET_STATE); + } + context.commit( + storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, + response.data + ); + return response; + }, + (error) => { + deleteFunnelCookie(); context.commit(storeMutations.RESET_STATE); } - context.commit(storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, response.data); - return response; - }); + ); }, // Business domain actions From 58de89028176406b21bbdd6e181049f2732c1fff Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 17 Jan 2023 14:05:02 -0500 Subject: [PATCH 007/261] CSR-1021 Move shared components into unique folders. --- .../base-input-button/base-input-button.spec.js | 0 .../base-input-button/base-input-button.vue | 2 +- .../base-input-button/button-functionality-props.js | 0 .../button-question/button-question.spec.js | 0 .../button-question/button-question.vue | 8 ++++---- .../date-picker/date-picker-spec.js1 | 0 .../date-picker/date-picker.vue | 0 .../dropdown-question/dropdown-question.spec.js | 0 .../dropdown-question/dropdown-question.vue | 0 .../modal/modal.spec.js | 0 .../modal/modal.vue | 2 +- .../question-chain/question-chain.spec.js | 0 .../question-chain/question-chain.vue | 4 ++-- .../text-block/text-block.spec.js | 0 .../text-block/text-block.vue | 0 .../textbox-question/textbox-question.spec.js | 0 .../textbox-question/textbox-question.vue | 0 .../funnel-footer/funnel-footer.spec.js | 0 .../funnel-footer/funnel-footer.vue | 0 .../funnel-header/funnel-header.spec.js | 0 .../funnel-header/funnel-header.vue | 2 +- .../funnel-header/menu-modal/menu-modal.spec.js | 0 .../funnel-header/menu-modal/menu-modal.vue | 0 .../button-back/button-back.spec.js | 0 .../funnel-sub-header/button-back/button-back.vue | 0 .../funnel-sub-header/funnel-sub-header.spec.js | 0 .../funnel-sub-header/funnel-sub-header.vue | 2 +- .../questions-page-layout.spec.js | 0 .../questions-page-layout/questions-page-layout.vue | 12 ++++++------ .../loading-modal/loading-modal.spec.js | 0 .../loading-modal/loading-modal.vue | 0 .../ux-components/alert/alert.spec.js | 0 .../ux-components/alert/alert.vue | 0 .../ux-components/button-main/button-main.spec.js | 0 .../ux-components/button-main/button-main.vue | 0 .../ux-components/checkbox/checkbox.spec.js | 0 .../ux-components/checkbox/checkbox.vue | 0 .../list-button-horizontal.spec.js | 0 .../list-button-horizontal.vue | 2 +- .../ux-components/list-button/list-button.spec.js | 0 .../ux-components/list-button/list-button.vue | 2 +- .../ux-components/list-card/list-card.spec.js | 0 .../ux-components/list-card/list-card.vue | 2 +- .../ux-components/loader/loader.spec.js | 0 .../ux-components/loader/loader.vue | 0 .../ux-components/radio/radio.spec.js | 0 .../ux-components/radio/radio.vue | 2 +- .../ux-components/text-link/text-link.spec.js | 0 .../ux-components/text-link/text-link.vue | 0 .../vehicle-banner/vehicle-banner.spec.js | 0 .../vehicle-banner/vehicle-banner.vue | 0 51 files changed, 20 insertions(+), 20 deletions(-) rename src/{common-components => digital-components}/base-input-button/base-input-button.spec.js (100%) rename src/{common-components => digital-components}/base-input-button/base-input-button.vue (98%) rename src/{common-components => digital-components}/base-input-button/button-functionality-props.js (100%) rename src/{common-components => digital-components}/button-question/button-question.spec.js (100%) rename src/{common-components => digital-components}/button-question/button-question.vue (96%) rename src/{common-components => digital-components}/date-picker/date-picker-spec.js1 (100%) rename src/{common-components => digital-components}/date-picker/date-picker.vue (100%) rename src/{common-components => digital-components}/dropdown-question/dropdown-question.spec.js (100%) rename src/{common-components => digital-components}/dropdown-question/dropdown-question.vue (100%) rename src/{common-components => digital-components}/modal/modal.spec.js (100%) rename src/{common-components => digital-components}/modal/modal.vue (98%) rename src/{common-components => digital-components}/question-chain/question-chain.spec.js (100%) rename src/{common-components => digital-components}/question-chain/question-chain.vue (98%) rename src/{common-components => digital-components}/text-block/text-block.spec.js (100%) rename src/{common-components => digital-components}/text-block/text-block.vue (100%) rename src/{common-components => digital-components}/textbox-question/textbox-question.spec.js (100%) rename src/{common-components => digital-components}/textbox-question/textbox-question.vue (100%) rename src/{common-components => fmg-components}/funnel-footer/funnel-footer.spec.js (100%) rename src/{common-components => fmg-components}/funnel-footer/funnel-footer.vue (100%) rename src/{common-components => fmg-components}/funnel-header/funnel-header.spec.js (100%) rename src/{common-components => fmg-components}/funnel-header/funnel-header.vue (96%) rename src/{common-components => fmg-components}/funnel-header/menu-modal/menu-modal.spec.js (100%) rename src/{common-components => fmg-components}/funnel-header/menu-modal/menu-modal.vue (100%) rename src/{common-components => fmg-components}/funnel-sub-header/button-back/button-back.spec.js (100%) rename src/{common-components => fmg-components}/funnel-sub-header/button-back/button-back.vue (100%) rename src/{common-components => fmg-components}/funnel-sub-header/funnel-sub-header.spec.js (100%) rename src/{common-components => fmg-components}/funnel-sub-header/funnel-sub-header.vue (95%) rename src/{common-components => fmg-components}/layouts/questions-page-layout/questions-page-layout.spec.js (100%) rename src/{common-components => fmg-components}/layouts/questions-page-layout/questions-page-layout.vue (87%) rename src/{common-components => fmg-components}/loading-modal/loading-modal.spec.js (100%) rename src/{common-components => fmg-components}/loading-modal/loading-modal.vue (100%) rename src/{ => fmg-components}/ux-components/alert/alert.spec.js (100%) rename src/{ => fmg-components}/ux-components/alert/alert.vue (100%) rename src/{ => fmg-components}/ux-components/button-main/button-main.spec.js (100%) rename src/{ => fmg-components}/ux-components/button-main/button-main.vue (100%) rename src/{ => fmg-components}/ux-components/checkbox/checkbox.spec.js (100%) rename src/{ => fmg-components}/ux-components/checkbox/checkbox.vue (100%) rename src/{ => fmg-components}/ux-components/list-button-horizontal/list-button-horizontal.spec.js (100%) rename src/{ => fmg-components}/ux-components/list-button-horizontal/list-button-horizontal.vue (98%) rename src/{ => fmg-components}/ux-components/list-button/list-button.spec.js (100%) rename src/{ => fmg-components}/ux-components/list-button/list-button.vue (97%) rename src/{ => fmg-components}/ux-components/list-card/list-card.spec.js (100%) rename src/{ => fmg-components}/ux-components/list-card/list-card.vue (98%) rename src/{ => fmg-components}/ux-components/loader/loader.spec.js (100%) rename src/{ => fmg-components}/ux-components/loader/loader.vue (100%) rename src/{ => fmg-components}/ux-components/radio/radio.spec.js (100%) rename src/{ => fmg-components}/ux-components/radio/radio.vue (95%) rename src/{ => fmg-components}/ux-components/text-link/text-link.spec.js (100%) rename src/{ => fmg-components}/ux-components/text-link/text-link.vue (100%) rename src/{common-components => fmg-components}/vehicle-banner/vehicle-banner.spec.js (100%) rename src/{common-components => fmg-components}/vehicle-banner/vehicle-banner.vue (100%) diff --git a/src/common-components/base-input-button/base-input-button.spec.js b/src/digital-components/base-input-button/base-input-button.spec.js similarity index 100% rename from src/common-components/base-input-button/base-input-button.spec.js rename to src/digital-components/base-input-button/base-input-button.spec.js diff --git a/src/common-components/base-input-button/base-input-button.vue b/src/digital-components/base-input-button/base-input-button.vue similarity index 98% rename from src/common-components/base-input-button/base-input-button.vue rename to src/digital-components/base-input-button/base-input-button.vue index 5cc7d3836..e9b5e6411 100644 --- a/src/common-components/base-input-button/base-input-button.vue +++ b/src/digital-components/base-input-button/base-input-button.vue @@ -33,7 +33,7 @@ import { handleButtonComponentFocus, handleInputComponentBlur, } from "@/helpers/button-question-focus-helper"; -import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props"; +import { inputButtonProps } from "@/digital-components/base-input-button/button-functionality-props"; export default { name: "base-input-button", diff --git a/src/common-components/base-input-button/button-functionality-props.js b/src/digital-components/base-input-button/button-functionality-props.js similarity index 100% rename from src/common-components/base-input-button/button-functionality-props.js rename to src/digital-components/base-input-button/button-functionality-props.js diff --git a/src/common-components/button-question/button-question.spec.js b/src/digital-components/button-question/button-question.spec.js similarity index 100% rename from src/common-components/button-question/button-question.spec.js rename to src/digital-components/button-question/button-question.spec.js diff --git a/src/common-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue similarity index 96% rename from src/common-components/button-question/button-question.vue rename to src/digital-components/button-question/button-question.vue index 646b244be..661e3ace1 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -74,10 +74,10 @@ + + From 4fd467af59f580cc8ab3b0bca8936bfe0bb4d400 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 18 Jan 2023 12:27:33 -0500 Subject: [PATCH 029/261] CSR-1012 | file path updates --- src/layouts/service-location/service-location.vue | 6 +++--- .../service-zip-modal-question.vue | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index aa32c1921..4f8230456 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -17,9 +17,9 @@ fmg diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index b02714ffa..5a65933b0 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -1,13 +1,13 @@ digital @@ -55,8 +55,8 @@ import baseInputButton from "@/digital-components/base-input-button/base-input-b import textLink from "@/ux-components/text-link/text-link"; import inputButtonWrapperMixin from "@/mixins/input-button-wrapper-mixin"; import { - getLinkDisplayTextFromCopy, - getLinkTargetFromCopy, + getRouterLinkDisplayTextFromCopy, + getRouterLinkRouteFromCopy, splitCopyOnCMSPlaceHolder, doesCopyContainTextLink, } from "@/helpers/cms-content-helper"; @@ -74,8 +74,8 @@ export default { }, }, methods: { - getLinkDisplayTextFromCopy, - getLinkTargetFromCopy, + getRouterLinkDisplayTextFromCopy, + getRouterLinkRouteFromCopy, splitCopyOnCMSPlaceHolder, doesCopyContainTextLink, stripUlTagFromCopy(copy) { diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js index 343323b9e..978777116 100644 --- a/src/ux-components/alert/alert.spec.js +++ b/src/ux-components/alert/alert.spec.js @@ -49,7 +49,7 @@ describe("alert.vue", () => { expect(wrapper.vm.alertCopy).toBe("testCopy"); }); - it("Should container a tag if the manualCopy contains a {routerLink: testName, testLink} placeholder", () => { + it.only("Should container a tag if the manualCopy contains a {routerLink: testName, testLink} placeholder", () => { // Arrange & Act const wrapper = shallowMount( alert, diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue index 0c3ac4b99..cecbad90c 100644 --- a/src/ux-components/alert/alert.vue +++ b/src/ux-components/alert/alert.vue @@ -19,12 +19,10 @@ {{ getLinkDisplayTextFromCopy(copy) }}{{ getRouterLinkDisplayTextFromCopy(copy) }} @@ -43,8 +41,8 @@ import { doesCopyContainRouterLink, splitCopyOnCMSPlaceHolder, - getLinkTargetFromCopy, - getLinkDisplayTextFromCopy, + getRouterLinkRouteFromCopy, + getRouterLinkDisplayTextFromCopy, splitCMSCopyOnParagraphTag, } from "@/helpers/cms-content-helper"; import { applicationConfig } from "@/constants/application-config"; @@ -78,8 +76,8 @@ export default { }, }, computed: { - applicationQueryString() { - return applicationConfig.APPLICATION_QUERYSTRING; + pageQueryString() { + return applicationConfig.PAGE_QUERYSTRING; }, alertHeadline() { return this.manualHeadline @@ -98,8 +96,8 @@ export default { methods: { doesCopyContainRouterLink, splitCopyOnCMSPlaceHolder, - getLinkTargetFromCopy, - getLinkDisplayTextFromCopy, + getRouterLinkRouteFromCopy, + getRouterLinkDisplayTextFromCopy, ensureAlertIsInViewPort() { if (this.shouldScrollToOnMount && this.$el.style.display != "none") { var footerHeight = this.getFooterInfoBoxHeight(); From a45ad5a11e954a04c3268d189843298f31fde245 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 25 Jan 2023 09:27:31 -0500 Subject: [PATCH 043/261] Remove .only from unit test. --- src/ux-components/alert/alert.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js index 978777116..343323b9e 100644 --- a/src/ux-components/alert/alert.spec.js +++ b/src/ux-components/alert/alert.spec.js @@ -49,7 +49,7 @@ describe("alert.vue", () => { expect(wrapper.vm.alertCopy).toBe("testCopy"); }); - it.only("Should container a tag if the manualCopy contains a {routerLink: testName, testLink} placeholder", () => { + it("Should container a tag if the manualCopy contains a {routerLink: testName, testLink} placeholder", () => { // Arrange & Act const wrapper = shallowMount( alert, From 01ad8942e8159d50e23a34f39aa7a579fb72496a Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 25 Jan 2023 09:44:52 -0500 Subject: [PATCH 044/261] Add minor change to force update. --- src/ux-components/alert/alert.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js index 343323b9e..1f5d0fcc8 100644 --- a/src/ux-components/alert/alert.spec.js +++ b/src/ux-components/alert/alert.spec.js @@ -41,7 +41,7 @@ describe("alert.vue", () => { expect(wrapperDiv.classes()).toContain("warning"); }); - it("Should update alert Headline to manualHeadline datam entered and alert copy to manualCopy datam entered when no cmsWidgetName entered", async () => { + it("Should update alert Headline to manualHeadline datam entered and alert copy to manualCopy datam entered when no cmsWidgetName entered.", async () => { // Arrange const wrapper = shallowMount(alert, setupMocks({})); // Assert From 91df4b31656ab3fe129ff87ba89155e9439c143d Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 25 Jan 2023 09:45:15 -0500 Subject: [PATCH 045/261] Changed name of model opened callback --- .../service-zip-modal-question/service-zip-modal-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 1ab55f165..78068a835 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -19,7 +19,7 @@
Date: Wed, 25 Jan 2023 10:46:22 -0500 Subject: [PATCH 046/261] CSR-1050 fix spacing in header. --- src/fmg-components/funnel-sub-header/funnel-sub-header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fmg-components/funnel-sub-header/funnel-sub-header.vue b/src/fmg-components/funnel-sub-header/funnel-sub-header.vue index a5cdf5c0b..6beeaf321 100644 --- a/src/fmg-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/fmg-components/funnel-sub-header/funnel-sub-header.vue @@ -2,7 +2,7 @@
-
+
{{ text }} From b8a87c343ba866863e3134bd7d7ff16f08b09949 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 12 Jan 2023 11:20:43 -0500 Subject: [PATCH 047/261] CSR-1012 | service zip modal question new component service-zip-modal-question added to the service-location page --- src/digital-components/modal/modal.vue | 28 +++- .../service-location/service-location.vue | 13 +- .../service-zip-modal-question.spec.js | 3 + .../service-zip-modal-question.vue | 157 ++++++++++++++++++ 4 files changed, 193 insertions(+), 8 deletions(-) create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 7de269644..f8c5e01e5 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -11,12 +11,13 @@ @@ -48,6 +49,9 @@ export default { name: "modal", props: { cmsWidgetName: String, + buttonClick: { + type: Function, + }, }, computed: { ModalHeadline() { @@ -68,11 +72,29 @@ export default { ModalCloseButtonText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, + showModalBody() { + return ( + this.ModalImage || + this.ModalHeadline || + this.ModalSubheadertext || + this.ModalBodyText + ); + }, }, methods: { resetButtonStyle() { this.$refs.buttonMain.resetButtonStyle(); }, + closeModal() { + this.$refs.modalXButton.click(); + }, + buttonMainClick() { + if (this.buttonClick) { + this.buttonClick(); + } else { + this.closeModal(); + } + }, }, components: { buttonMain, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e29ebdb5e..aa32c1921 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -4,6 +4,7 @@ fmg
+ // Components -import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; -import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; -import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; -import { Form } from "vee-validate"; +import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; +import funnelHeader from "@/common-components/funnel-header/funnel-header"; +import funnelFooter from "@/common-components/funnel-footer/funnel-footer"; +import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; -// Supporting files +//Supporting Files +import { Form } from "vee-validate"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -57,6 +59,7 @@ export default { forwardButtonAction() {}, }, components: { + serviceZipModalQuestion, funnelHeader, funnelFooter, funnelSubHeader, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js new file mode 100644 index 000000000..a81727c73 --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -0,0 +1,3 @@ +describe("service-zip-modal-question.vue", () => { + test.todo("test this"); +}); diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue new file mode 100644 index 000000000..0397609aa --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -0,0 +1,157 @@ + + + + + From 314fe42c189cfa92dd3b4d5207d2e7f2382cfe1d Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 18 Jan 2023 12:27:33 -0500 Subject: [PATCH 048/261] CSR-1012 | file path updates --- src/layouts/service-location/service-location.vue | 6 +++--- .../service-zip-modal-question.vue | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index aa32c1921..4f8230456 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -17,9 +17,9 @@ fmg + + diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 418a1ec2e..4d0a527c6 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,6 +10,10 @@ fmg textboxQuestionWidgetName="ServiceZipQuestionWidget" alertNonServiceableZipWidgetName="AlertNonServiceableZipWidget" alertInvalidZipWidgetName="AlertInvalidZipWidget" /> + // Components import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; +import mobileLocationModalQuestion from "@/layouts/service-location/mobile-location-modal-question/mobile-location-modal-question"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; @@ -65,6 +70,7 @@ export default { }, components: { serviceZipModalQuestion, + mobileLocationModalQuestion, funnelHeader, funnelFooter, funnelSubHeader, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 78068a835..d05cca807 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -1,17 +1,18 @@ @@ -106,6 +105,9 @@ export default { input.focus(); }); }, + saveMobileLocationData() { + + }, }, computed: { getModalId() { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index e3b9a767a..478ac8766 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,6 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> -
-
From 734f3d6643e548055359d4f93ec0f4873d7c30fa Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 12 Jan 2023 11:20:43 -0500 Subject: [PATCH 067/261] CSR-1012 | service zip modal question new component service-zip-modal-question added to the service-location page --- src/digital-components/modal/modal.vue | 28 +++- .../service-location/service-location.vue | 13 +- .../service-zip-modal-question.spec.js | 3 + .../service-zip-modal-question.vue | 157 ++++++++++++++++++ 4 files changed, 193 insertions(+), 8 deletions(-) create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 7de269644..f8c5e01e5 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -11,12 +11,13 @@ @@ -48,6 +49,9 @@ export default { name: "modal", props: { cmsWidgetName: String, + buttonClick: { + type: Function, + }, }, computed: { ModalHeadline() { @@ -68,11 +72,29 @@ export default { ModalCloseButtonText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, + showModalBody() { + return ( + this.ModalImage || + this.ModalHeadline || + this.ModalSubheadertext || + this.ModalBodyText + ); + }, }, methods: { resetButtonStyle() { this.$refs.buttonMain.resetButtonStyle(); }, + closeModal() { + this.$refs.modalXButton.click(); + }, + buttonMainClick() { + if (this.buttonClick) { + this.buttonClick(); + } else { + this.closeModal(); + } + }, }, components: { buttonMain, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e29ebdb5e..aa32c1921 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -4,6 +4,7 @@ fmg
+ // Components -import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; -import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; -import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; -import { Form } from "vee-validate"; +import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; +import funnelHeader from "@/common-components/funnel-header/funnel-header"; +import funnelFooter from "@/common-components/funnel-footer/funnel-footer"; +import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; -// Supporting files +//Supporting Files +import { Form } from "vee-validate"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -57,6 +59,7 @@ export default { forwardButtonAction() {}, }, components: { + serviceZipModalQuestion, funnelHeader, funnelFooter, funnelSubHeader, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js new file mode 100644 index 000000000..a81727c73 --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -0,0 +1,3 @@ +describe("service-zip-modal-question.vue", () => { + test.todo("test this"); +}); diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue new file mode 100644 index 000000000..0397609aa --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -0,0 +1,157 @@ + + + + + From 48f71c5a7d0d9e4366f5d29e12ecbf2e138f1f9e Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 18 Jan 2023 12:27:33 -0500 Subject: [PATCH 068/261] CSR-1012 | file path updates --- src/layouts/service-location/service-location.vue | 6 +++--- .../service-zip-modal-question.vue | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index aa32c1921..4f8230456 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -17,9 +17,9 @@ fmg + + diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 418a1ec2e..4d0a527c6 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,6 +10,10 @@ fmg textboxQuestionWidgetName="ServiceZipQuestionWidget" alertNonServiceableZipWidgetName="AlertNonServiceableZipWidget" alertInvalidZipWidgetName="AlertInvalidZipWidget" /> + // Components import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; +import mobileLocationModalQuestion from "@/layouts/service-location/mobile-location-modal-question/mobile-location-modal-question"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; @@ -65,6 +70,7 @@ export default { }, components: { serviceZipModalQuestion, + mobileLocationModalQuestion, funnelHeader, funnelFooter, funnelSubHeader, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 1ab55f165..c26b7743b 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -1,17 +1,18 @@ @@ -32,28 +37,49 @@ // Components import textLink from "@/ux-components/text-link/text-link"; import modal from "@/digital-components/modal/modal"; +import buttonQuestion from "@/digital-components/button-question/button-question"; import alert from "@/ux-components/alert/alert"; import textboxQuestion from "@/digital-components/textbox-question/textbox-question"; import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions"; +import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question"; +import textBlock from "@/digital-components/text-block/text-block"; -//Supporting Files +// Supporting Files import { defineRule } from "vee-validate"; import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; -import { isNoUnitNumericStyleProp } from "@vue/shared"; +import { storeActions } from "@/constants/store-actions.js"; +import baseMixin from "@/mixins/base-mixin.js"; +import TextBlock from '../../../digital-components/text-block/text-block.vue'; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); defineRule("zip-format", regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT)); export default { - name: "mobile-location-modal-question", + name: "mobile-location-modal-questions", + emits: ["update:modelValue"], // The component emits an event data() { return { - + isVehicleProtectedAnswers: [], }; }, props: { + modelValue: { + type: Object, + default: () => ({ + addressQuestions: { + streetAddress: "", + apartmentNumberOrBusinessName: "", + city: "", + state: "", + zipCode: "", + }, + isZipServiceableMobile: Boolean, + isZipServiceableInShop: Boolean, + isVehicleProtected: Boolean, + }), + }, cmsWidgetName: String, modalWidgetName: String, textboxQuestionWidgetName: String, @@ -61,7 +87,25 @@ export default { alertInvalidZipWidgetName: String, }, methods: { - + loadInitialData() { + return baseMixin.methods.dispatchStoreAction(storeActions.GET_VEHICLE_YEARS, {}); + }, + initializeComponent(initialData) { + this.isVehicleProtectedAnswers = initialData; + }, + openModal() { + this.$refs.mobileServiceModal.openModal(); + }, + closeModal() { + this.$refs.mobileServiceModal.closeModal(); + }, + focusOnZipInput() { + this.$nextTick(() => { + console.log(this.$refs); + const input = this.$refs.streetAddressField; + input.focus(); + }); + }, }, computed: { getModalId() { @@ -71,17 +115,25 @@ export default { return this.getCmsContent(this.cmsWidgetName, "HeaderText"); }, mobileLocationDisplayText() { - return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, - }, - mounted() { + mobileQuestionModel: { + get: function () { + return this.modelValue; + }, + set: function (newValue) { + this.$emit("update:modelValue", newValue); + }, + }, }, + mounted() {}, components: { textLink, modal, - addressQuestions + addressQuestions, + vehicleProtectedQuestion, + textBlock }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue new file mode 100644 index 000000000..b8c795d5f --- /dev/null +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 4d0a527c6..cece16fdd 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -10,10 +10,11 @@ fmg textboxQuestionWidgetName="ServiceZipQuestionWidget" alertNonServiceableZipWidgetName="AlertNonServiceableZipWidget" alertInvalidZipWidgetName="AlertInvalidZipWidget" /> - + textboxQuestionWidgetName="MobileLocationQuestionWidget" /> // Components import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; -import mobileLocationModalQuestion from "@/layouts/service-location/mobile-location-modal-question/mobile-location-modal-question"; +import mobileLocationModalQuestions from "@/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; @@ -39,7 +40,17 @@ import { settleAllPromises } from "@/helpers/layout-helper"; export default { name: "service-location", data() { - return {}; + return { + mobileLocationQuestion: { + addressQuestions: { + streetAddress: "", + apartmentNumberOrBusinessName: "", + city: "", + state: "", + zipCode: "", + }, + }, + }; }, async beforeRouteEnter(to, from, next) { // Call APIs @@ -70,7 +81,7 @@ export default { }, components: { serviceZipModalQuestion, - mobileLocationModalQuestion, + mobileLocationModalQuestions, funnelHeader, funnelFooter, funnelSubHeader, From c782dd7e9f3b5e26256a92ddeea37f145ea3c49b Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 27 Jan 2023 10:28:46 -0500 Subject: [PATCH 091/261] CSR-1012 | created content-group-modal --- src/digital-components/modal/modal.vue | 61 ++----------- .../content-group-modal.spec.js | 3 + .../content-group-modal.vue | 88 +++++++++++++++++++ .../service-location/service-location.vue | 1 - .../service-zip-modal-question.vue | 31 ++++--- 5 files changed, 116 insertions(+), 68 deletions(-) create mode 100644 src/fmg-components/content-group-modal/content-group-modal.spec.js create mode 100644 src/fmg-components/content-group-modal/content-group-modal.vue diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index acb545e52..a4efbba3e 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -3,7 +3,7 @@ @@ -49,16 +39,11 @@ import { Modal } from "bootstrap"; export default { name: "modal", props: { - cmsWidgetName: String, + modalId: String, + footerButtonText: String, onModalOpenedCallback: { type: Function, }, - - footerButtonCallback: { - type: Function, - // return true to close modal - // if undefined, footer button closes modal - }, }, data() { return { @@ -66,30 +51,7 @@ export default { }; }, mounted() { - this.modal = new Modal(document.getElementById(this.cmsWidgetName)); - }, - computed: { - ModalHeadline() { - return this.getCmsContent(this.cmsWidgetName, "HeaderText"); - }, - ModalSubheadertext() { - return this.getCmsContent(this.cmsWidgetName, "SubheaderText"); - }, - ModalBodyText() { - return this.getCmsContent(this.cmsWidgetName, "BodyText"); - }, - ModalSubBodyText() { - return this.getCmsContent(this.cmsWidgetName, "BodyText2"); - }, - ModalImage() { - return this.getCmsContent(this.cmsWidgetName, "Image"); - }, - ModalCloseButtonText() { - return this.getCmsContent(this.cmsWidgetName, "FooterText"); - }, - showModalBody() { - return this.ModalBodyText; - }, + this.modal = new Modal(document.getElementById(this.modalId)); }, methods: { resetButtonStyle() { @@ -101,15 +63,6 @@ export default { closeModal() { this.modal.hide(); }, - async footerButtonClick() { - if (this.footerButtonCallback) { - if (await this.footerButtonCallback()) { - this.closeModal(); - } - } else { - this.closeModal(); - } - }, }, components: { buttonMain, diff --git a/src/fmg-components/content-group-modal/content-group-modal.spec.js b/src/fmg-components/content-group-modal/content-group-modal.spec.js new file mode 100644 index 000000000..81946c2d0 --- /dev/null +++ b/src/fmg-components/content-group-modal/content-group-modal.spec.js @@ -0,0 +1,3 @@ +describe("content-group-modal.vue", () => { + test.todo("test this"); +}); diff --git a/src/fmg-components/content-group-modal/content-group-modal.vue b/src/fmg-components/content-group-modal/content-group-modal.vue new file mode 100644 index 000000000..a446a01d0 --- /dev/null +++ b/src/fmg-components/content-group-modal/content-group-modal.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index cece16fdd..a34875dbb 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -6,7 +6,6 @@ fmg diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 169281b71..e3b9a767a 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -17,10 +17,11 @@
+ :ref="modalName" + :modalId="modalName" + :onModalOpenedCallback="onModalOpened" + :footerButtonText="footerButtonText" + @footer-button-event="setZip">
Date: Fri, 27 Jan 2023 10:46:04 -0500 Subject: [PATCH 092/261] CSR-1012 | moved body padding into modal component --- src/digital-components/modal/modal.vue | 4 +++- .../content-group-modal.vue | 18 +++++++-------- .../mobile-location-modal-questions.vue | 22 ++++++++++--------- .../service-zip-modal-question.vue | 2 -- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index a4efbba3e..a2151215a 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -17,7 +17,9 @@ data-bs-dismiss="modal" aria-label="Close">
- + - + :footerButtonText="mobileLocationDisplayText" + @footer-button-event="saveMobileLocationData"> + + + @@ -106,6 +105,9 @@ export default { input.focus(); }); }, + saveMobileLocationData() { + + }, }, computed: { getModalId() { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index e3b9a767a..478ac8766 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,6 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> -
-
From c9736f6d4ba921c86c9bbceed9ddb07fce73eeb8 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 27 Jan 2023 14:08:49 -0500 Subject: [PATCH 093/261] CSR-1012 | content group modals on quote page --- .../content-group-modal.vue | 24 --------- src/layouts/quote/quote.vue | 14 ++--- .../mobile-location-modal-questions.vue | 11 ++-- .../vehicle-protected-question.vue | 4 +- .../service-zip-modal-question.vue | 54 +++++++++---------- 5 files changed, 39 insertions(+), 68 deletions(-) diff --git a/src/fmg-components/content-group-modal/content-group-modal.vue b/src/fmg-components/content-group-modal/content-group-modal.vue index ab0bdee86..f0d2ba75a 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.vue +++ b/src/fmg-components/content-group-modal/content-group-modal.vue @@ -60,27 +60,3 @@ export default { }, }; - - diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 21f5753bb..620310d5e 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -29,11 +29,11 @@ digital cmsWidgetName="quoteDisclaimer" justifyText="left" typeStyle="caption" - class="mt-7" /> - - - - + class="mt-4" /> + + + + - + @@ -49,7 +49,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import { storeActions } from "@/constants/store-actions.js"; import baseMixin from "@/mixins/base-mixin.js"; -import TextBlock from '../../../digital-components/text-block/text-block.vue'; +import TextBlock from "../../../digital-components/text-block/text-block.vue"; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); @@ -105,9 +105,7 @@ export default { input.focus(); }); }, - saveMobileLocationData() { - - }, + saveMobileLocationData() {}, }, computed: { getModalId() { @@ -127,7 +125,6 @@ export default { this.$emit("update:modelValue", newValue); }, }, - }, mounted() {}, components: { @@ -135,7 +132,7 @@ export default { modal, addressQuestions, vehicleProtectedQuestion, - textBlock + textBlock, }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index b8c795d5f..68dc5e7b4 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -18,7 +18,7 @@ export default { name: "vehicle-protected-question", data() { return { - answers: [ "Yes", "No" ], + answers: ["Yes", "No"], }; }, props: { @@ -50,4 +50,4 @@ export default { }, }, }; - \ No newline at end of file + diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 478ac8766..be33ddb86 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,31 +22,31 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> - - - + + + @@ -152,9 +152,7 @@ export default { if (this.serviceZip && this.serviceZip != 0) { return this.serviceZipState + ", " + this.serviceZip; } - return ( - this.getCmsContent(this.cmsWidgetName, "SubheaderText") || "Enter your service ZIP" - ); + return this.getCmsContent(this.cmsWidgetName, "SubheaderText"); }, footerButtonText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); From 3abb66cf8edeff5cacd364afd960d58beb2a83d1 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 27 Jan 2023 16:15:35 -0500 Subject: [PATCH 094/261] Got the programmatic opening of modals working on quote page, still need to handle the buttonQuestion issue --- .../button-question/button-question.vue | 4 ++ .../content-group-modal.vue | 4 +- src/layouts/quote/quote.vue | 18 ++++--- .../service-package-question.vue | 4 +- .../service-package-radio.vue | 12 ++++- .../mobile-location-modal-questions.vue | 11 ++-- .../vehicle-protected-question.vue | 4 +- .../service-zip-modal-question.vue | 50 +++++++++---------- 8 files changed, 62 insertions(+), 45 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..7defb5b5d 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -53,6 +53,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :lastValuePushedToGa="lastValuePushedToGa" :setLastValuePushedToGa="setLastValuePushedToGa" :suppressError="suppressError" + @openModal="openModal" v-model="selectedValues" /> @@ -214,6 +215,9 @@ export default { setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; }, + openModal(modalName) { + this.$emit("openModal", modalName); + } }, components: { listButton, diff --git a/src/fmg-components/content-group-modal/content-group-modal.vue b/src/fmg-components/content-group-modal/content-group-modal.vue index ab0bdee86..d9d9da937 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.vue +++ b/src/fmg-components/content-group-modal/content-group-modal.vue @@ -48,11 +48,11 @@ export default { }, methods: { openModal() { - this.$refs[this.ModalName()].openModal(); + this.$refs[this.ModalName].openModal(); }, footerButtonClick() { - this.$refs[this.ModalName()].closeModal(); + this.$refs[this.ModalName].closeModal(); }, }, components: { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 5a65933b0..b5eb3ff6e 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -1,4 +1,3 @@ -digital @@ -141,6 +142,7 @@ export default { shouldDisplayTierTwoPackage() { return this.frontWipersApplicableForTierTwo || this.rearWiperApplicableForTierTwo; }, + }, methods: { processIfStatements, diff --git a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue index 9738d3dde..8286efde7 100644 --- a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue +++ b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue @@ -29,12 +29,19 @@ + @@ -88,6 +95,9 @@ export default { .split(/(?:)|(?:<\/li>)/g) .filter((lineItem) => lineItem); }, + openModal(modalName) { + this.$emit("openModal", modalName); + } }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 3a82b0362..6fa8728ba 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -27,7 +27,7 @@ ref="addressQuestions" v-model="mobileQuestionModel.addressQuestions" captureApartmentNumberOrBusinessName="true" /> - + @@ -49,7 +49,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import { storeActions } from "@/constants/store-actions.js"; import baseMixin from "@/mixins/base-mixin.js"; -import TextBlock from '../../../digital-components/text-block/text-block.vue'; +import TextBlock from "../../../digital-components/text-block/text-block.vue"; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); @@ -105,9 +105,7 @@ export default { input.focus(); }); }, - saveMobileLocationData() { - - }, + saveMobileLocationData() {}, }, computed: { getModalId() { @@ -127,7 +125,6 @@ export default { this.$emit("update:modelValue", newValue); }, }, - }, mounted() {}, components: { @@ -135,7 +132,7 @@ export default { modal, addressQuestions, vehicleProtectedQuestion, - textBlock + textBlock, }, }; diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index b8c795d5f..68dc5e7b4 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -18,7 +18,7 @@ export default { name: "vehicle-protected-question", data() { return { - answers: [ "Yes", "No" ], + answers: ["Yes", "No"], }; }, props: { @@ -50,4 +50,4 @@ export default { }, }, }; - \ No newline at end of file + diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 478ac8766..687afa6a6 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,31 +22,31 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" @footer-button-event="setZip"> - - - + + + From 6e5b98058a01da78230c227659a4205eeaf9cfe6 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 30 Jan 2023 15:39:50 -0500 Subject: [PATCH 095/261] CSR-896 Fix regex to error on more than one dot in email address prior to domain extension. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 5c8ee6b4e..f73d21b9c 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 0f8508921..e92a0bc9f 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 5b7c0b568..1abf2daf7 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 6db8736c3..b5a39b310 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 10e1c9a17293e982d045e81b8a4c47e8244aa9a2 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 30 Jan 2023 16:59:15 -0500 Subject: [PATCH 096/261] Update regex. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index f73d21b9c..172973e28 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index e92a0bc9f..2efff8d21 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 1abf2daf7..9714e2ead 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index b5a39b310..e118f9664 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.])+\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 9817c7d3282a456ddbca89590c11a915fe5dcffa Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 31 Jan 2023 08:26:18 -0500 Subject: [PATCH 097/261] Add dash to regex. --- .../address-lookup/customer-questions/customer-questions.vue | 2 +- src/layouts/estimate/estimate.vue | 2 +- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 172973e28..f0b2e9b33 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -56,7 +56,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 2efff8d21..c6d691e16 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 9714e2ead..afa442e09 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -120,7 +120,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index e118f9664..e48f0e42b 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -145,7 +145,7 @@ defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIR defineRule( "email-address-format", regex( - /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,})$/, + /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT ) ); From 9f363c5ed9007a5b2121916a08a82cab9866060a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 31 Jan 2023 08:37:14 -0500 Subject: [PATCH 098/261] Checkpoint - Quote page models now opening programatically --- .../button-question/button-question.vue | 9 +++++---- .../address-questions/address-questions.vue | 6 ------ .../service-package-question.vue | 4 ++-- .../service-package-radio/service-package-radio.vue | 12 +++++++----- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 7defb5b5d..7472c95f5 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -53,7 +53,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :lastValuePushedToGa="lastValuePushedToGa" :setLastValuePushedToGa="setLastValuePushedToGa" :suppressError="suppressError" - @openModal="openModal" + @nestedComponentEvent="handleNestedComponentEvent" v-model="selectedValues" /> @@ -215,9 +215,10 @@ export default { setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; }, - openModal(modalName) { - this.$emit("openModal", modalName); - } + handleNestedComponentEvent(event) { + const eventName = event.eventName; + this.$emit(`${eventName}`, event.args); + }, }, components: { listButton, diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index ff7fb0d9a..ff8e7d7a7 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -320,7 +320,6 @@ export default { } function fillInAddress(place) { - console.log("fillInAddress"); if (!place) { place = autocomplete.getPlace(); } @@ -416,11 +415,6 @@ export default { } }, }, - "addressModel.streetAddress": { - handler(newValue, oldValue) { - console.log(`I got changed from ${oldValue} to ${newValue}`); - }, - }, }, components: { textboxQuestion, diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 25a0dfb2f..b0f3c1023 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -1,5 +1,6 @@ diff --git a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue index 83f430792..e806ac261 100644 --- a/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue +++ b/src/layouts/quote/service-package-question/service-package-radio/service-package-radio.vue @@ -33,7 +33,7 @@ :text="getRouterLinkDisplayTextFromCopy(copy)" href="#!" @click-event=" - $emit('nestedComponentEvent', { + $emit('buttonEvent', { eventName: 'openModal', args: getRouterLinkRouteFromCopy(copy), }) From b0ff984f75a9ef78c87e6299e60b9e602f592daf Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 1 Feb 2023 14:42:10 -0500 Subject: [PATCH 106/261] CSR-1156 move css to appropriate pages. --- .../button-question/button-question.vue | 18 ------------------ .../questions-page-layout.vue | 3 ++- src/layouts/vehicle-parts/vehicle-parts.vue | 10 ++++++++++ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..ec73b348b 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,22 +255,4 @@ export default { text-align: center; } } - -.vehicle-parts { - .question-text { - span { - font-size: 0.875rem; - text-align: left; - margin: 0 0 0.5rem 0; - } - } - .question-text { - margin: 0; - } - fieldset { - .ui-radio { - margin: 0; - } - } -} diff --git a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue index f6bb2a656..a900cfba9 100644 --- a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue +++ b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue @@ -98,9 +98,10 @@ export default { .questions-page { .question-text { margin-bottom: 0.5rem; - span { + font-size: 0.875rem; text-align: left; + margin: 0 0 0.5rem 0; } } } diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 5723cd0a8..6df0b7393 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -227,3 +227,13 @@ export default { }, }; + + From bc617b8d793fcf84fc741e193c7313da495fba78 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 2 Feb 2023 13:43:56 -0500 Subject: [PATCH 107/261] Revert "CSR-1156 move css to appropriate pages." This reverts commit b0ff984f75a9ef78c87e6299e60b9e602f592daf. --- .../button-question/button-question.vue | 18 ++++++++++++++++++ .../questions-page-layout.vue | 3 +-- src/layouts/vehicle-parts/vehicle-parts.vue | 10 ---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index ec73b348b..4c60b0708 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,4 +255,22 @@ export default { text-align: center; } } + +.vehicle-parts { + .question-text { + span { + font-size: 0.875rem; + text-align: left; + margin: 0 0 0.5rem 0; + } + } + .question-text { + margin: 0; + } + fieldset { + .ui-radio { + margin: 0; + } + } +} diff --git a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue index a900cfba9..f6bb2a656 100644 --- a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue +++ b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue @@ -98,10 +98,9 @@ export default { .questions-page { .question-text { margin-bottom: 0.5rem; + span { - font-size: 0.875rem; text-align: left; - margin: 0 0 0.5rem 0; } } } diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 6df0b7393..5723cd0a8 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -227,13 +227,3 @@ export default { }, }; - - From db056adf44f8a005780b4f96c3158e6d1fa73d5e Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 2 Feb 2023 13:59:41 -0500 Subject: [PATCH 108/261] CSR-1157 button question change from ISS --- src/digital-components/button-question/button-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..e874a40f6 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -209,7 +209,7 @@ export default { }, methods: { formatString(str) { - return str?.replaceAll(" ", "-"); + return String(str).replaceAll(" ", "-"); }, setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; From 5c3937798b9e49a802d554cae704b54eeae277aa Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 2 Feb 2023 15:46:08 -0500 Subject: [PATCH 109/261] Remove unused css. This reverts commit b0ff984f75a9ef78c87e6299e60b9e602f592daf. --- .../button-question/button-question.vue | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 4c60b0708..ec73b348b 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -255,22 +255,4 @@ export default { text-align: center; } } - -.vehicle-parts { - .question-text { - span { - font-size: 0.875rem; - text-align: left; - margin: 0 0 0.5rem 0; - } - } - .question-text { - margin: 0; - } - fieldset { - .ui-radio { - margin: 0; - } - } -} From 6ee2e80a23c9b6918ad0176ab4b252fd5356b150 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 2 Feb 2023 16:16:15 -0500 Subject: [PATCH 110/261] CSR-976 always nav back to vin-lookup when vin exists --- src/mixins/vehicle-questions-mixin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 93e57daeb..32739426f 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -493,6 +493,11 @@ export default { ? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS : navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; + if (vin) { + backNavigationScenario = + navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; + } + if ( hasCapabilityQuestions && this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) From adeba5d936c8d873e29e7423aa2a1a9070e93644 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 3 Feb 2023 09:46:54 -0500 Subject: [PATCH 111/261] CSR-976 cleanup back vin condition --- src/mixins/vehicle-questions-mixin.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 32739426f..718f8fc50 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -485,19 +485,13 @@ export default { this.hasGlassLocationWithMultipleParts(allPartsOrQuestions); const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions); const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions); - const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); const vin = self.$store.getters.vehicle.vin; let backNavigationScenario = - !vin || vin === "" || skipVinLookup + !vin || vin === "" ? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS : navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; - if (vin) { - backNavigationScenario = - navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; - } - if ( hasCapabilityQuestions && this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) From 31d787d62d8231d08878efeafb79ca4fd670b899 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 3 Feb 2023 10:55:12 -0500 Subject: [PATCH 112/261] Refactor method, add prop. --- .../button-question/button-question.vue | 39 +++++++++++++++---- .../glass-part-question.vue | 1 + src/layouts/vehicle-parts/vehicle-parts.vue | 2 +- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index ec73b348b..7e32f6f08 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -5,7 +5,10 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com :class=" isOverflowScrollable ? 'button-question button-question-overflow' : 'button-question' "> -
+
{{ questionText }}
@@ -123,6 +126,7 @@ export default { useTextForValue: Boolean, valueToLogType: String, additionalButtonStyling: String, + isSmallQuestionText: Boolean, }, beforeMount() { if (this.buttonTypeObject) { @@ -136,13 +140,15 @@ export default { }, computed: { getFieldSetClasses() { - if (this.isOverflowScrollable) { - return "container-fluid overflow-scroll position-absolute px-5 pt-1 py-0"; - } else if (this.buttonTypeString == "listCard") { - return "w-100"; - } else { - return ""; - } + const baseClasses = this.isOverflowScrollable + ? "container-fluid overflow-scroll position-absolute px-5 pt-1 py-0" + : this.buttonTypeString == "listCard" + ? "w-100" + : ""; + const withSmallQuestionClass = this.isSmallQuestionText + ? baseClasses + " small-question-text" + : baseClasses; + return withSmallQuestionClass; }, getComponentLoopWrapperClasses() { let classes; @@ -255,4 +261,21 @@ export default { text-align: center; } } +.small-question-text { + &.question-text { + span { + font-size: 0.875rem; + text-align: left; + margin: 1rem 0 0.5rem 0; + } + } + &.question-text { + margin: 0; + } + & fieldset { + .ui-radio { + margin: 0; + } + } +} diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue index a6f5e3f0a..7317b743d 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue @@ -25,6 +25,7 @@ textPosition="text-start" :loaderEnabled="false" isRequired + isSmallQuestionText :groupName="`${glassLocation}-${glassName}-${selectedTint}`" :validationRules="partValidationRules" />
diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 5723cd0a8..56ac2ed15 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -1,6 +1,6 @@ + + diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 6102373aa..dbce77065 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -30,9 +30,9 @@ v-model="mobileLocationQuestionModel.addressQuestions" captureApartmentNumberOrBusinessName="true" /> + cmsWidgetName="VehicleProtectedQuestionWidget" /> @@ -55,7 +55,6 @@ import baseMixin from "@/mixins/base-mixin.js"; // Define Validation Rules - export default { name: "mobile-location-modal-questions", emits: ["update:modelValue"], // The component emits an event @@ -68,9 +67,9 @@ export default { const modalForm = useForm(); return { - modalForm, - } - }, + modalForm, + }; + }, props: { modelValue: { type: Object, @@ -100,7 +99,7 @@ export default { }, mobileLocationLinkText() { return this.getCmsContent(this.cmsWidgetName, "BodyText"); - }, + }, getModalId() { return "#" + this.modalWidgetName; }, @@ -139,7 +138,6 @@ export default { } else { this.$refs.mobileLocationModal.resetButtonStyle(); } - }, }, @@ -169,5 +167,4 @@ export default { .address-questions { margin-top: 0em; } - diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue index 45b80caa6..3f7636fd1 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue @@ -10,8 +10,6 @@ isRequired /> - - diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 262d6e769..50090769a 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,8 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" :headerText="textboxQuestionPrompt" - @footer-button-event="setZip"> + @footer-button-event="setZip" + :modalForm="modalForm"> Date: Mon, 6 Feb 2023 13:48:05 -0500 Subject: [PATCH 117/261] Prettified --- src/digital-components/modal/modal.vue | 6 +++--- .../mobile-location-modal-questions.vue | 2 +- .../service-zip-modal-question.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index b90449ffb..89ff1f8ed 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -60,9 +60,9 @@ export default { async validateAndEmit() { const validationResult = await this.modalForm.validate(); if (validationResult.valid) { - this.$emit('footer-button-event'); - } - + this.$emit("footer-button-event"); + } + this.resetButtonStyle(); }, resetButtonStyle() { diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index fc898fdfb..5dab5edf0 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -123,7 +123,7 @@ export default { this.$refs.mobileLocationModal.closeModal(); }, async setMobileLocation() { - this.closeModal(); + this.closeModal(); }, }, components: { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 50090769a..d06c4dfda 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -132,7 +132,7 @@ export default { this.resetAlerts(); const zipCodeData = await this.getZipCodeData(this.serviceZipCodeInput); - + if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true; } else if (!zipCodeData.isServiceable) { From 97d347f9c82340f9f12383141e79585b8220f343 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 7 Feb 2023 13:50:24 -0500 Subject: [PATCH 118/261] CSR-1077 supporting items changes This was required to get repair orders to load when the customer didn't progress past the parts page to quote. the load wouldn't have any parts and no chips to indicate repair. --- src/layouts/estimate/estimate.vue | 19 +++++++++++++ .../service-package-question.vue | 28 ++++++++++--------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index f46034412..36a52a2ff 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -223,6 +223,25 @@ export default { } else if (this.$store.getters.order.referralNumber?.length === 6) { await this.navigateForwardWithSingleCarMatch(); } else if (this.isRepair) { + const supportingItemsPromise = await this.dispatchStoreAction( + storeActions.GET_SUPPORTING_ITEMS + ); + + const promiseResultMap = [ + { + resultKey: "supportingItems", + promise: supportingItemsPromise, + }, + ]; + + const resultMap = await settleAllPromises(promiseResultMap); + + this.dispatchStoreAction( + this.storeActions.SAVE_SUPPORTING_ITEMS, + resultMap.supportingItems, + false + ); + // call saveSession here - navigateWithSaving saves too late in the flow await saveSession({}); return this.$router.navigateWithoutSaving( diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 4f543064c..796da19e9 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -42,7 +42,7 @@ export default { }, watch: { availableLineItems() { - if (this.$store.getters.lineItems.supportingItems) { + if (this.$store.getters.lineItems.vaps) { this.selectDefaultPackage(); } }, @@ -212,18 +212,20 @@ export default { selectDefaultPackage() { const vapsFromStore = this.$store.getters.lineItems.vaps; let lowestTierForPackage = packageNames.TIER_ONE; - vapsFromStore.every((vapsItem) => { - let lowestTierForThisItem = this.getLowestTierForThisItem(vapsItem); - if (lowestTierForThisItem === packageNames.TIER_THREE) { - lowestTierForPackage = packageNames.TIER_THREE; - return false; - } else if (lowestTierForThisItem === packageNames.TIER_TWO) { - lowestTierForPackage = packageNames.TIER_TWO; - return true; - } else { - return true; - } - }); + if (vapsFromStore.length > 0) { + vapsFromStore.every((vapsItem) => { + let lowestTierForThisItem = this.getLowestTierForThisItem(vapsItem); + if (lowestTierForThisItem === packageNames.TIER_THREE) { + lowestTierForPackage = packageNames.TIER_THREE; + return false; + } else if (lowestTierForThisItem === packageNames.TIER_TWO) { + lowestTierForPackage = packageNames.TIER_TWO; + return true; + } else { + return true; + } + }); + } this.selectedPackageName = lowestTierForPackage; }, getLowestTierForThisItem(vapsItem) { From c8e7bc79ee87ef7113383bfc45494c504e974f17 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 7 Feb 2023 13:56:31 -0500 Subject: [PATCH 119/261] CSR-1166 | Update navigation rules with Quote page --- src/helpers/heritage-integration/navigation-helper.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 6fa248c63..0e756a8a4 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -28,7 +28,11 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita // If navigating to a specific page, and that page is not part of the vin pages. // Return that page, so that it can navigate like normal. - if (toRoute.query[queryStrings.FMG_PAGE] !== undefined && !isVinRelatedPage(toRoute)) { + if ( + toRoute.query[queryStrings.FMG_PAGE] !== undefined && + toRoute.query[queryStrings.FMG_PAGE] !== fmgPageValues.QUOTE && + !isVinRelatedPage(toRoute) + ) { return overrideYmmsDirectionIfNeeded(toRoute); } @@ -107,6 +111,7 @@ async function getLatestPageForRedirection() { const capabilityQuestionsComponent = await getLazyLoadedComponent( fmgPageValues.CAPABILITY_QUESTIONS ); + const quoteComponent = await getLazyLoadedComponent(fmgPageValues.QUOTE); const skipVin = await skipVinLookup(); @@ -121,7 +126,9 @@ async function getLatestPageForRedirection() { } else if (!estimateComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE_DAMAGE; } else { - if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { + if (quoteComponent.methods.arePagePrerequisitesValid()) { + return fmgPageValues.QUOTE; + } else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.CAPABILITY_QUESTIONS; } else if (moldingQuestionsComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.MOLDING_QUESTIONS; From 66f1a0039fafe24aac3bede89c12639bfdefb94b Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Tue, 7 Feb 2023 14:36:07 -0500 Subject: [PATCH 120/261] CSR-1012 | modal loader and improved validation --- src/digital-components/modal/modal.spec.js | 65 ++++--------------- src/digital-components/modal/modal.vue | 10 ++- .../content-group-modal.spec.js | 63 +++++++++++++++++- .../service-zip-modal-question.vue | 10 ++- 4 files changed, 90 insertions(+), 58 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 2664accfa..40c1fd44a 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,68 +1,31 @@ import { shallowMount } from "@vue/test-utils"; import Modal from "./modal"; +const modalId = "modal-one"; +const footerButtonText = "Sample footer text here."; +const headerText = "Sample header text here."; + describe("modal.vue", () => { - it("Should display header text when HeaderText is defined in the CMS", async () => { - // Act + it("Should display footer button text when footerButtonText is defined", async () => { const wrapper = shallowMount(Modal, { - mixins: [mockMixin], props: { - cmsWidgetName: "test", + modalId: modalId, + footerButtonText: footerButtonText, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["HeaderText"])); + expect(wrapper.html()).toEqual(expect.stringContaining(footerButtonText)); }); - it("Should display subheader text when SubheaderText is defined in the CMS", async () => { - // Act + it("Should display modal header text when headerText is defined", async () => { const wrapper = shallowMount(Modal, { - mixins: [mockMixin], props: { - cmsWidgetName: "test", + modalId: modalId, + footerButtonText: footerButtonText, + headerText: headerText, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["SubheaderText"])); - }); - - it("Should insert image url when Image is defined in the CMS", async () => { - // Act - const wrapper = shallowMount(Modal, { - mixins: [mockMixin], - props: { - cmsWidgetName: "test", - }, - attachTo: document.body, - }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Image"])); - }); - - it("Should display body text when BodyText is defined in the CMS", async () => { - // Act - const wrapper = shallowMount(Modal, { - mixins: [mockMixin], - props: { - cmsWidgetName: "test", - }, - attachTo: document.body, - }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"])); - }); + expect(wrapper.html()).toEqual(expect.stringContaining(headerText)); + }); }); - -const mockMixin = { - methods: { - getCmsContent: jest.fn((widgetName, cmsFieldName) => { - return mockCmsContent[cmsFieldName]; - }), - }, -}; - -const mockCmsContent = { - HeaderText: "Sample header text here.", - SubheaderText: "Sample subheader text here.", - Image: "https://www.sampleImage.sample", - BodyText: "Sample body text here.", - FooterText: "Sample footer text here.", -}; diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 89ff1f8ed..0a87d1633 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -30,7 +30,7 @@ isPrimary class="w-100" ref="buttonMain" - suppressLoader + loaderColor="white" :buttonText="footerButtonText" @click-event="validateAndEmit" />
@@ -58,8 +58,12 @@ export default { }, methods: { async validateAndEmit() { - const validationResult = await this.modalForm.validate(); - if (validationResult.valid) { + if (this.modalForm) { + const validationResult = await this.modalForm.validate(); + if (validationResult.valid) { + this.$emit("footer-button-event"); + } + } else { this.$emit("footer-button-event"); } diff --git a/src/fmg-components/content-group-modal/content-group-modal.spec.js b/src/fmg-components/content-group-modal/content-group-modal.spec.js index 81946c2d0..a8058b2d5 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.spec.js +++ b/src/fmg-components/content-group-modal/content-group-modal.spec.js @@ -1,3 +1,64 @@ +import { mount } from "@vue/test-utils"; +import contentGroupModal from "./content-group-modal"; + describe("content-group-modal.vue", () => { - test.todo("test this"); + it("Should display header text when HeaderText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["HeaderText"])); + }); + + it("Should display subheader text when SubheaderText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["SubheaderText"])); + }); + + it("Should insert image url when Image is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Image"])); + }); + + it("Should display body text when BodyText is defined in the CMS", async () => { + const wrapper = mount(contentGroupModal, { + mixins: [mockMixin], + props: { + cmsWidgetName: "test", + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"])); + }); }); + +const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + return mockCmsContent[cmsFieldName]; + }), + }, +}; + +const mockCmsContent = { + HeaderText: "Sample header text here.", + SubheaderText: "Sample subheader text here.", + Image: "https://www.sampleImage.sample", + BodyText: "Sample body text here.", + FooterText: "Sample footer text here.", +}; diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index d06c4dfda..8f0cbd049 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -22,7 +22,7 @@ :onModalOpenedCallback="onModalOpened" :footerButtonText="footerButtonText" :headerText="textboxQuestionPrompt" - @footer-button-event="setZip" + @footer-button-event="setZipCode" :modalForm="modalForm"> Date: Wed, 8 Feb 2023 08:22:03 -0500 Subject: [PATCH 121/261] Added code to enable / disable the Footer Button --- src/digital-components/modal/modal.vue | 30 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 89ff1f8ed..e206dd3e3 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -32,7 +32,8 @@ ref="buttonMain" suppressLoader :buttonText="footerButtonText" - @click-event="validateAndEmit" /> + @click-event="validateAndEmit" + :class="isFooterButtonDisabled && 'form-test-invalid'" />
@@ -42,6 +43,7 @@ From 744939503b86a64dbd2c13eeedeba0ff08d97337 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Mon, 13 Feb 2023 14:41:51 -0500 Subject: [PATCH 145/261] CSR-1012 bug fixes for header text and zip on modal open --- src/digital-components/modal/modal.spec.js | 3 +++ .../content-group-modal/content-group-modal.spec.js | 3 +++ .../service-zip-modal-question/service-zip-modal-question.vue | 1 + 3 files changed, 7 insertions(+) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 5feaf0216..7ed8fff12 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,10 +1,13 @@ import { shallowMount } from "@vue/test-utils"; import Modal from "./modal"; +import crypto from "crypto"; const modalId = "modal-one"; const footerButtonText = "Sample footer text here."; const headerText = "Sample header text here."; +global.crypto = crypto; + describe("modal.vue", () => { it("Should display footer button text when footerButtonText is defined", async () => { const wrapper = shallowMount(Modal, { diff --git a/src/fmg-components/content-group-modal/content-group-modal.spec.js b/src/fmg-components/content-group-modal/content-group-modal.spec.js index a8058b2d5..cbdf6e182 100644 --- a/src/fmg-components/content-group-modal/content-group-modal.spec.js +++ b/src/fmg-components/content-group-modal/content-group-modal.spec.js @@ -1,5 +1,8 @@ import { mount } from "@vue/test-utils"; import contentGroupModal from "./content-group-modal"; +import crypto from "crypto"; + +global.crypto = crypto; describe("content-group-modal.vue", () => { it("Should display header text when HeaderText is defined in the CMS", async () => { diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 371754477..c8352697c 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -127,6 +127,7 @@ export default { }, onModalOpened() { + this.serviceZipCodeInput = this.serviceZipModel.zipCode; this.focusOnZipInput(); }, From eb87accfb71dcb4151054e297d150903ceb9fa36 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 13 Feb 2023 15:06:18 -0500 Subject: [PATCH 146/261] Moved 'useForm' into modal component --- src/digital-components/modal/modal.spec.js | 4 ++++ src/digital-components/modal/modal.vue | 4 +++- .../mobile-location-modal-questions.vue | 7 ------- .../service-zip-modal-question.vue | 7 ------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 5feaf0216..963167829 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,10 +1,14 @@ import { shallowMount } from "@vue/test-utils"; import Modal from "./modal"; +import crypto from "crypto"; +import { useForm } from "vee-validate"; const modalId = "modal-one"; const footerButtonText = "Sample footer text here."; const headerText = "Sample header text here."; +global.crypto = crypto; + describe("modal.vue", () => { it("Should display footer button text when footerButtonText is defined", async () => { const wrapper = shallowMount(Modal, { diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 1bf7c3fce..e0be2e9c0 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -43,7 +43,7 @@ From 4562f7679eec2c10f28b4be97c7a06b954e809e4 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 17 Feb 2023 09:35:10 -0500 Subject: [PATCH 166/261] Added code to display invalid zip alert --- .../mobile-location-modal-questions.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 31378fc95..dc2df2e9a 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -36,7 +36,7 @@ ref="alertInvalidZip" v-if="displayInvalidZipAlert" class="my-4" - :cmsWidgetName="AlertInvalidZipWidget" + cmsWidgetName="AlertInvalidZipWidget" alertClass="alert-danger" v-bind:isDismissible="false" /> @@ -57,6 +57,7 @@ export default { data() { return { internalModel: this.copyModel(this.modelValue), + displayInvalidZipAlert: false, }; }, props: { @@ -162,11 +163,17 @@ export default { async setMobileLocation() { // TODO: Any lookups or actions to be taken before assigning the Mobile Location + const zipCodeData = await this.getZipCodeData(this.internalModel.addressQuestions.zipCode); - // Update the page level model - this.$emit("update:modelValue", this.internalModel); + if (!zipCodeData.isValid) { + this.displayInvalidZipAlert = true; + } else { + // Update the page level model + this.$emit("update:modelValue", this.internalModel); + + this.closeModal(); + } - this.closeModal(); }, }, watch: { From 487c83e3a0173b5ed2c9a94ff131ddd3bbcc0058 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 17 Feb 2023 09:39:40 -0500 Subject: [PATCH 167/261] Resolving this issue: https://stackoverflow.com/questions/75179573/how-to-fix-loading-the-google-maps-javascript-api-without-a-callback-is-not-supp --- .../address-questions/address-questions.vue | 2 +- .../mobile-location-modal-questions.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index 8a28ea669..c37e596ef 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -215,7 +215,7 @@ export default { const apiKey = applicationConfig.GOOGLE_PLACES_API_KEY; this.$loadScript( - `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places` + `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=Function.prototype` ) .then(() => { // Script is loaded, initialize the autocomplete textbox diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index dc2df2e9a..6a6e6cc56 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -163,7 +163,9 @@ export default { async setMobileLocation() { // TODO: Any lookups or actions to be taken before assigning the Mobile Location - const zipCodeData = await this.getZipCodeData(this.internalModel.addressQuestions.zipCode); + const zipCodeData = await this.getZipCodeData( + this.internalModel.addressQuestions.zipCode + ); if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true; @@ -173,7 +175,6 @@ export default { this.closeModal(); } - }, }, watch: { From 1fccadd678d929109944f21e57da878425bc3481 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 17 Feb 2023 10:22:56 -0500 Subject: [PATCH 168/261] CSR-1012 some unit tests for service-location-modal-question --- .../service-zip-modal-question.spec.js | 80 ++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index a81727c73..4f18fd52a 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -1,3 +1,81 @@ +import { mount } from "@vue/test-utils"; +import serviceZipModalQuestion from "./service-zip-modal-question"; +import crypto from "crypto"; +global.crypto = crypto; + +jest.mock('@/digital-components/textbox-question/textbox-question', () => ({ + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + return widgetName[cmsFieldName]; + }), +})); + +const linkWidgetName = "linkWidgetName"; +const modalWidgetName = "modalWidgetName"; +const textboxQuestionWidgetName = "textboxQuestionWidgetName"; + +const mockLinkCmsContent = { + BodyText: "Sample link body text here.", +}; + +const mockModalCmsContent = { + FooterText: "Sample modal footer text here.", +}; + +const mockTextboxQuestionCmsContent = { + QuestionText: "Sample question text here." +}; + +const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + if (widgetName === linkWidgetName) + return mockLinkCmsContent[cmsFieldName]; + + if (widgetName === modalWidgetName) + return mockModalCmsContent[cmsFieldName]; + + if (widgetName === textboxQuestionWidgetName) + return mockTextboxQuestionCmsContent[cmsFieldName]; + + return null; + }), + + getZipCodeData: jest.fn((zip) => { + return { + isValid: true, + state: "OH", + isServiceable: true, + }; + }), + }, +}; + describe("service-zip-modal-question.vue", () => { - test.todo("test this"); + + it("Should display text from textboxQuestionWidget", async () => { + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"])); + }); + + it("Should display footer text from modalWidget", async () => { + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(mockModalCmsContent["FooterText"])); + }); + }); From 66104b1d9e44b1cf0772a5a075f13550dc3c1374 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Fri, 17 Feb 2023 10:28:21 -0500 Subject: [PATCH 169/261] CSR-1012 formatting --- .../service-zip-modal-question.spec.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index 4f18fd52a..f0c022ba8 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -3,7 +3,7 @@ import serviceZipModalQuestion from "./service-zip-modal-question"; import crypto from "crypto"; global.crypto = crypto; -jest.mock('@/digital-components/textbox-question/textbox-question', () => ({ +jest.mock("@/digital-components/textbox-question/textbox-question", () => ({ getCmsContent: jest.fn((widgetName, cmsFieldName) => { return widgetName[cmsFieldName]; }), @@ -22,20 +22,23 @@ const mockModalCmsContent = { }; const mockTextboxQuestionCmsContent = { - QuestionText: "Sample question text here." + QuestionText: "Sample question text here.", }; const mockMixin = { methods: { getCmsContent: jest.fn((widgetName, cmsFieldName) => { - if (widgetName === linkWidgetName) + if (widgetName === linkWidgetName) { return mockLinkCmsContent[cmsFieldName]; + } - if (widgetName === modalWidgetName) + if (widgetName === modalWidgetName) { return mockModalCmsContent[cmsFieldName]; + } - if (widgetName === textboxQuestionWidgetName) + if (widgetName === textboxQuestionWidgetName) { return mockTextboxQuestionCmsContent[cmsFieldName]; + } return null; }), @@ -51,7 +54,6 @@ const mockMixin = { }; describe("service-zip-modal-question.vue", () => { - it("Should display text from textboxQuestionWidget", async () => { const wrapper = mount(serviceZipModalQuestion, { mixins: [mockMixin], @@ -62,7 +64,9 @@ describe("service-zip-modal-question.vue", () => { }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"])); + expect(wrapper.html()).toEqual( + expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"]) + ); }); it("Should display footer text from modalWidget", async () => { @@ -77,5 +81,4 @@ describe("service-zip-modal-question.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(mockModalCmsContent["FooterText"])); }); - }); From 1fb34d29b1029c95c9e06d84ff3c63c170b4ad77 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Fri, 17 Feb 2023 15:53:06 -0500 Subject: [PATCH 170/261] Updated test case data --- .../service-location/service-location.spec.js | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 1b6fcd57f..904580d9d 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -24,11 +24,20 @@ jest.mock("@/store", () => ({ dispatch: jest.fn(), getters: { lineItems: { - supportingItems: [], + supportingItems: [ + { + description: null, + kitPrice: 0, + laborAmount: 0, + partNumber: "SUPPLIES-REPAIR", + partType: "REPAIR FEE", + sellingPrice: 7.99 + } + ], }, order: { serviceLocation: { - zipCode: "00000", + zipCode: "43235", }, }, payment: { @@ -40,18 +49,27 @@ jest.mock("@/store", () => ({ beforeEach(() => { store.getters = { lineItems: { - supportingItems: [], + supportingItems: [ + { + description: null, + kitPrice: 0, + laborAmount: 0, + partNumber: "SUPPLIES-REPAIR", + partType: "REPAIR FEE", + sellingPrice: 7.99 + } + ], }, order: { serviceLocation: { - zipCode: "00000", + zipCode: "43235", }, }, payment: { isInsurance: false, }, - } -}) + }; +}); describe("service-location.vue", () => { describe("arePagePrerequisitesValid", () => { @@ -70,7 +88,7 @@ describe("service-location.vue", () => { payment: { isInsurance: null, }, - } + }; serviceLocation.beforeRouteEnter.call( wrapper.vm, From 4ddc9c41d0756161d51914771fc1f8365810255b Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Feb 2023 09:22:22 -0500 Subject: [PATCH 171/261] Suggested changes from Mark regarding inputIDs for textboxQuestion and dropdownQuestion --- .../dropdown-question/dropdown-question.vue | 3 ++ .../text-block/text-block.vue | 4 ++ .../textbox-question/textbox-question.vue | 7 +++- .../mobile-location-modal-questions.vue | 29 ++++++++++++--- .../service-location/service-location.vue | 37 +++++++++++++++---- .../service-zip-modal-question.vue | 20 +++++++--- 6 files changed, 81 insertions(+), 19 deletions(-) diff --git a/src/digital-components/dropdown-question/dropdown-question.vue b/src/digital-components/dropdown-question/dropdown-question.vue index 3dfc82947..e122837c4 100644 --- a/src/digital-components/dropdown-question/dropdown-question.vue +++ b/src/digital-components/dropdown-question/dropdown-question.vue @@ -86,6 +86,9 @@ export default { errors, }; }, + mounted() { + this.$emit("dropdownQuestionEvent.inputIdAssigned", this.inputId); + }, computed: { questionText() { return this.getCmsContent(this.cmsWidgetName, "QuestionText"); diff --git a/src/digital-components/text-block/text-block.vue b/src/digital-components/text-block/text-block.vue index 33854e143..9e7df6312 100644 --- a/src/digital-components/text-block/text-block.vue +++ b/src/digital-components/text-block/text-block.vue @@ -9,6 +9,7 @@ export default { name: "textBlock", props: { + customText: String, // used to allow the insert of token values into textblock justifyText: String, // left, right, center typeStyle: String, // h1-h6, body, small, label, caption (see Figma or Confluence documentation) fontWeight: String, // bold=500, default is 400 @@ -16,6 +17,9 @@ export default { }, computed: { TextBlockCopy() { + if (this.customText) { + return this.customText; + } return this.getCmsContent(this.cmsWidgetName, "Text"); }, }, diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 90aa33ddf..2b14aac6b 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -76,7 +76,9 @@ export default { includeSearchIcon: Boolean, }, setup(props) { - const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId; + const inputId = !props.customInputId + ? `input-${crypto.randomUUID()}` + : props.customInputId; const propsClone = Object.assign({}, props); const modelValue = propsClone.modelValue; @@ -126,6 +128,9 @@ export default { }, }, }, + mounted() { + this.$emit("textboxQuestionEvent.inputIdAssigned", this.inputId); + }, watch: { async value(newValue) { const result = await validate(newValue, this.validationRules); // do a test validation check, without triggering full validation diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 6a6e6cc56..bb768fa14 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -15,7 +15,10 @@ @click-event="openModal" aria-label="Modal window" />
- +
+ v-model="internalModel.zipCode" + v-on="{ 'textboxQuestionEvent.inputIdAssigned': onInputIdAssigned }" + :cmsWidgetName="textboxQuestionWidgetName" /> Date: Mon, 20 Feb 2023 10:39:06 -0500 Subject: [PATCH 172/261] Checking in before writing some unit tests --- src/constants/endpoints.js | 4 +++ src/constants/store-actions.js | 1 + .../textbox-question/textbox-question.vue | 4 +-- .../mobile-location-modal-questions.vue | 27 ++++++++++++++++--- src/store/index.js | 7 +++++ 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 9f4c60d61..19019477b 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -70,6 +70,10 @@ const endpoints = { url: "/parts/api/v1/parts/rain-defense", method: "GET", }, + GetMobileFeePart: { + url: "/parts/api/v1/parts/mobile-fee", + method: "GET", + }, GetSupportingItems: { url: "/parts/api/v1/parts/supporting-items", method: "POST", diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 428280d40..eb781b020 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -27,6 +27,7 @@ const storeActions = { GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions", GET_PART_FROM_CAPABILITY_QUESTION_ANSWER: "getPartFromCapabilityQuestionAnswer", GET_MOLDING_QUESTIONS: "getMoldingQuestions", + GET_MOBILE_FEE_PART: "getMobileFeePart", SAVE_SESSION: "saveSession", LOAD_SESSION: "loadSession", UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse", diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 2b14aac6b..2766e2cd9 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -76,9 +76,7 @@ export default { includeSearchIcon: Boolean, }, setup(props) { - const inputId = !props.customInputId - ? `input-${crypto.randomUUID()}` - : props.customInputId; + const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId; const propsClone = Object.assign({}, props); const modelValue = propsClone.modelValue; diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index bb768fa14..9aeda710c 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -53,6 +53,8 @@ import alert from "@/ux-components/alert/alert"; import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions"; import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question"; import textBlock from "@/digital-components/text-block/text-block"; +import baseMixin from "@/mixins/base-mixin.js"; +import { storeActions } from "@/constants/store-actions"; export default { name: "mobile-location-modal-questions", @@ -61,7 +63,7 @@ export default { return { internalModel: this.copyModel(this.modelValue), displayInvalidZipAlert: false, - mobileFee: this.getMobileFee(), + mobileFee: "" }; }, props: { @@ -88,6 +90,9 @@ export default { alertNonServiceableZipWidgetName: String, alertInvalidZipWidgetName: String, }, + async mounted() { + this.mobileFee = await this.getMobileFee(); + }, computed: { mobileFeeText() { const cmsContentText = this.getCmsContent("MobileFeeDisclaimerWidget", "Text"); @@ -142,10 +147,24 @@ export default { isZipServiceableInShop: modelToCopy.isZipServiceableInShop, }; }, + + async getMobileFee() { + // Get the Mobile Fee Part + const mobileFeePart = await baseMixin.methods.dispatchStoreAction( + storeActions.GET_MOBILE_FEE_PART, + null, + false + ); + + // Get the Mobile Fee Part Price + const pricingResults = await baseMixin.methods.dispatchStoreAction( + storeActions.PRICE_ORDER_ITEMS, + [ mobileFeePart.data ], + false + ); + + return await baseMixin.methods.getTotalLineItemPrice(pricingResults[0]); - getMobileFee() { - // TODO: Call new service endpoint to get the Mobile Fee price - return "34.99"; }, openModal() { diff --git a/src/store/index.js b/src/store/index.js index 93a3e5a25..10cf7d797 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -907,6 +907,13 @@ export const actions = { }); }, + getMobileFeePart(context) { + return globalMethods.callMockHttpClient({ + method: endpoints.GetMobileFeePart.method, + endpoint: "https://run.mocky.io/v3/795de4cb-d014-48b4-9338-dab33261adce", //TODO: Remove Mocky Endpoint + }); + }, + getSupportingItems(context) { const glassPartsArray = context.getters.lineItems.glassParts ?? []; const carId = context.getters.vehicle.carId; From 023a521ec11c834f386151032916ad7c3389fed5 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Feb 2023 13:14:51 -0500 Subject: [PATCH 173/261] Now retrieving the actual mobile fee but we're mocking the part call --- src/constants/endpoints.js | 2 +- .../mobile-location-modal-questions.vue | 9 ++++----- src/store/index.js | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 19019477b..6b1e69609 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -70,7 +70,7 @@ const endpoints = { url: "/parts/api/v1/parts/rain-defense", method: "GET", }, - GetMobileFeePart: { + GetMobileFeePart: { url: "/parts/api/v1/parts/mobile-fee", method: "GET", }, diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 9aeda710c..d1aa4dd4b 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -63,7 +63,7 @@ export default { return { internalModel: this.copyModel(this.modelValue), displayInvalidZipAlert: false, - mobileFee: "" + mobileFee: "", }; }, props: { @@ -147,24 +147,23 @@ export default { isZipServiceableInShop: modelToCopy.isZipServiceableInShop, }; }, - + async getMobileFee() { // Get the Mobile Fee Part const mobileFeePart = await baseMixin.methods.dispatchStoreAction( storeActions.GET_MOBILE_FEE_PART, - null, + null, false ); // Get the Mobile Fee Part Price const pricingResults = await baseMixin.methods.dispatchStoreAction( storeActions.PRICE_ORDER_ITEMS, - [ mobileFeePart.data ], + [mobileFeePart.data], false ); return await baseMixin.methods.getTotalLineItemPrice(pricingResults[0]); - }, openModal() { diff --git a/src/store/index.js b/src/store/index.js index 10cf7d797..5f4d7c1f5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -912,7 +912,7 @@ export const actions = { method: endpoints.GetMobileFeePart.method, endpoint: "https://run.mocky.io/v3/795de4cb-d014-48b4-9338-dab33261adce", //TODO: Remove Mocky Endpoint }); - }, + }, getSupportingItems(context) { const glassPartsArray = context.getters.lineItems.glassParts ?? []; From ea4820ec5e7af0c6d4a6c4e4dd4c6d2b7dfc52d4 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 31 Jan 2023 17:05:05 -0500 Subject: [PATCH 174/261] CSR-1058 | URI encode the serverData --- src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index d2634dd10..93a3e5a25 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1432,7 +1432,7 @@ export const actions = { `${availableLineItemsFormattedForRequest}`; const lineItemServerData = context.getters.order.lineItems.serverData; if (lineItemServerData) { - queryString += `&ServerData=${lineItemServerData}`; + queryString += `&ServerData=${encodeURIComponent(lineItemServerData)}`; } const response = await globalMethods.callHttpClient({ method: endpoints.PriceOrderItems.method, From c148f56361871aa16221fd207b2ec4a237e5086a Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Mon, 20 Feb 2023 15:41:43 -0500 Subject: [PATCH 175/261] Removed unnecessary nextTick calls from tests --- src/layouts/service-location/service-location.spec.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 904580d9d..4dec285bd 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -73,7 +73,7 @@ beforeEach(() => { describe("service-location.vue", () => { describe("arePagePrerequisitesValid", () => { - test("No prerequisites set: Should return false.", async () => { + test("No prerequisites set: Should return false.", () => { const { wrapper } = setupMocks({}); store.getters = { @@ -98,12 +98,11 @@ describe("service-location.vue", () => { ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); - await nextTick(); expect(arePagePrerequisitesValid).toBe(false); }); - test("All prerequisites set: Should return true.", async () => { + test("All prerequisites set: Should return true.", () => { const { wrapper } = setupMocks({}); serviceLocation.beforeRouteEnter.call( @@ -114,12 +113,11 @@ describe("service-location.vue", () => { ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); - await nextTick(); expect(arePagePrerequisitesValid).toBe(true); }); - test("Some prerequisites set: Should return false.", async () => { + test("Some prerequisites set: Should return false.", () => { const { wrapper } = setupMocks({}); store.getters.order.serviceLocation.zipCode = null; @@ -132,7 +130,6 @@ describe("service-location.vue", () => { ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); - await nextTick(); expect(arePagePrerequisitesValid).toBe(false); }); From ca215c3af53eece80d9e2924ec1ce0751c8619e5 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Mon, 20 Feb 2023 15:42:48 -0500 Subject: [PATCH 176/261] Fix formatting --- src/layouts/service-location/service-location.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 4dec285bd..a1f44936b 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -31,8 +31,8 @@ jest.mock("@/store", () => ({ laborAmount: 0, partNumber: "SUPPLIES-REPAIR", partType: "REPAIR FEE", - sellingPrice: 7.99 - } + sellingPrice: 7.99, + }, ], }, order: { @@ -56,8 +56,8 @@ beforeEach(() => { laborAmount: 0, partNumber: "SUPPLIES-REPAIR", partType: "REPAIR FEE", - sellingPrice: 7.99 - } + sellingPrice: 7.99, + }, ], }, order: { From c533cc4357eb751699d0c780df1c8ebbe6a20155 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 21 Feb 2023 14:18:41 -0500 Subject: [PATCH 177/261] Added tests to verify that the footer-button-event emit is only fired when the form is valid --- src/digital-components/modal/modal.spec.js | 87 +++++++++++++++++++--- src/digital-components/modal/modal.vue | 4 +- 2 files changed, 78 insertions(+), 13 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 7ed8fff12..0ce53b761 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,6 +1,21 @@ +const veeValidate = require("vee-validate"); +jest.mock("vee-validate", () => ({ + useForm: jest.fn(), + useIsFormTouched: jest.fn(), + useIsFormDirty: jest.fn(), + useIsFormValid: jest.fn() +})); + + + + + +const mockValidate = (returnValue) => jest.fn(async () => Promise.resolve({ valid: returnValue })); + import { shallowMount } from "@vue/test-utils"; import Modal from "./modal"; import crypto from "crypto"; +import { useForm, useIsFormDirty, useIsFormTouched, useIsFormValid } from "vee-validate" const modalId = "modal-one"; const footerButtonText = "Sample footer text here."; @@ -8,18 +23,9 @@ const headerText = "Sample header text here."; global.crypto = crypto; -describe("modal.vue", () => { - it("Should display footer button text when footerButtonText is defined", async () => { - const wrapper = shallowMount(Modal, { - props: { - modalId: modalId, - footerButtonText: footerButtonText, - }, - attachTo: document.body, - }); - expect(wrapper.html()).toEqual(expect.stringContaining(footerButtonText)); - }); + +describe("modal.vue", () => { it("Should display modal header text when headerText is defined", async () => { const wrapper = shallowMount(Modal, { props: { @@ -31,4 +37,63 @@ describe("modal.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(headerText)); }); + + it("Should display footer button text when footerButtonText is defined", async () => { + const wrapper = shallowMount(Modal, { + props: { + modalId: modalId, + footerButtonText: footerButtonText, + }, + attachTo: document.body, + }); + expect(wrapper.html()).toEqual(expect.stringContaining(footerButtonText)); + }); + + it("Should emit 'footer-button-event' if the form is valid", async () => { + useForm.mockReturnValue({ + validate: mockValidate(true) + }) + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(Modal, { + props: { + modalId: modalId, + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); + await buttonMain.trigger("click-event"); + + expect(wrapper.emitted("footer-button-event")).toBeTruthy(); + + }); + + it("Should not emit 'footer-button-event' if the form is not valid", async () => { + useForm.mockReturnValue({ + validate: mockValidate(false) + }) + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(Modal, { + props: { + modalId: modalId, + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); + await buttonMain.trigger("click-event"); + + expect(wrapper.emitted("footer-button-event")).toBeFalsy(); + + }); + }); + diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 0034b5155..75e6ae665 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -74,8 +74,8 @@ export default { }; }, methods: { - async validateAndEmit() { - const validationResult = await this.form.validate(); + async validateAndEmit() { + const validationResult = await this.form.validate(); if (validationResult.valid) { this.$emit("footer-button-event"); } From 7af8d9d26edab200411007e3b85d87c7fef765c2 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 22 Feb 2023 09:20:58 -0500 Subject: [PATCH 178/261] CSR-1088 Added unit tests for modal component --- src/digital-components/modal/modal.spec.js | 42 +++++++--------------- src/digital-components/modal/modal.vue | 4 +-- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 0ce53b761..3d6375094 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -1,37 +1,28 @@ -const veeValidate = require("vee-validate"); jest.mock("vee-validate", () => ({ useForm: jest.fn(), useIsFormTouched: jest.fn(), useIsFormDirty: jest.fn(), - useIsFormValid: jest.fn() + useIsFormValid: jest.fn(), })); - - - - const mockValidate = (returnValue) => jest.fn(async () => Promise.resolve({ valid: returnValue })); -import { shallowMount } from "@vue/test-utils"; +import { mount, shallowMount } from "@vue/test-utils"; import Modal from "./modal"; import crypto from "crypto"; -import { useForm, useIsFormDirty, useIsFormTouched, useIsFormValid } from "vee-validate" +import { useForm, useIsFormDirty, useIsFormTouched, useIsFormValid } from "vee-validate"; -const modalId = "modal-one"; const footerButtonText = "Sample footer text here."; const headerText = "Sample header text here."; global.crypto = crypto; - - describe("modal.vue", () => { it("Should display modal header text when headerText is defined", async () => { const wrapper = shallowMount(Modal, { props: { - modalId: modalId, - footerButtonText: footerButtonText, headerText: headerText, + footerButtonText: footerButtonText, }, attachTo: document.body, }); @@ -41,7 +32,6 @@ describe("modal.vue", () => { it("Should display footer button text when footerButtonText is defined", async () => { const wrapper = shallowMount(Modal, { props: { - modalId: modalId, footerButtonText: footerButtonText, }, attachTo: document.body, @@ -51,49 +41,43 @@ describe("modal.vue", () => { it("Should emit 'footer-button-event' if the form is valid", async () => { useForm.mockReturnValue({ - validate: mockValidate(true) - }) - + validate: mockValidate(true), + }); + const resetButtonStyle = jest.fn(); const wrapper = shallowMount(Modal, { props: { - modalId: modalId, footerButtonText: footerButtonText, headerText: headerText, }, attachTo: document.body, - }); - wrapper.vm.resetButtonStyle = resetButtonStyle; + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); await buttonMain.trigger("click-event"); expect(wrapper.emitted("footer-button-event")).toBeTruthy(); - }); - it("Should not emit 'footer-button-event' if the form is not valid", async () => { + it("Should not emit 'footer-button-event' if the form is not valid", async () => { useForm.mockReturnValue({ - validate: mockValidate(false) - }) + validate: mockValidate(false), + }); const resetButtonStyle = jest.fn(); const wrapper = shallowMount(Modal, { props: { - modalId: modalId, footerButtonText: footerButtonText, headerText: headerText, }, attachTo: document.body, - }); + }); wrapper.vm.resetButtonStyle = resetButtonStyle; const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); await buttonMain.trigger("click-event"); expect(wrapper.emitted("footer-button-event")).toBeFalsy(); - }); - }); - diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 75e6ae665..0034b5155 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -74,8 +74,8 @@ export default { }; }, methods: { - async validateAndEmit() { - const validationResult = await this.form.validate(); + async validateAndEmit() { + const validationResult = await this.form.validate(); if (validationResult.valid) { this.$emit("footer-button-event"); } From 96fec12f94517cd11771e5267031fb9899ce718d Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 22 Feb 2023 11:39:13 -0500 Subject: [PATCH 179/261] Updated Textbox Question and Dropdown Question unit tests --- .../dropdown-question.spec.js | 22 +-- src/digital-components/modal/modal.spec.js | 137 +++++++++++++++++- .../textbox-question/textbox-question.spec.js | 24 +-- 3 files changed, 137 insertions(+), 46 deletions(-) diff --git a/src/digital-components/dropdown-question/dropdown-question.spec.js b/src/digital-components/dropdown-question/dropdown-question.spec.js index a606e3d19..654709926 100644 --- a/src/digital-components/dropdown-question/dropdown-question.spec.js +++ b/src/digital-components/dropdown-question/dropdown-question.spec.js @@ -1,5 +1,6 @@ import { shallowMount } from "@vue/test-utils"; import dropdownQuestion from "./dropdown-question"; +import crypto from "crypto"; // Mock CMS content const questionText = "Question Text"; @@ -11,6 +12,8 @@ const mockMixin = { }, }; +global.crypto = crypto; + // TODO: Remove the following from dropdown-question.vue -> :class="(errors && errors.length) || hasError ? 'has-error' : ''" // It is not being used. describe("dropdownQuestion.vue", () => { @@ -46,23 +49,6 @@ describe("dropdownQuestion.vue", () => { expect(label.text()).toContain(questionText); }); - it("Should return input id as the id of the select field", async () => { - // Arrange - const wrapper = shallowMount(dropdownQuestion, { - propsData: { - inputId: "input ID", - options: {}, - }, - mixins: [mockMixin], - }); - - // Act - const select = wrapper.find("select"); - - // Assert - expect(select.attributes().id).toEqual("input ID"); - }); - it("Should render the 'questionText' data value as the aria-label attribute.", async () => { // Arrange const wrapper = shallowMount(dropdownQuestion, { @@ -118,7 +104,7 @@ describe("dropdownQuestion.vue", () => { const wrapper = shallowMount(dropdownQuestion, { propsData: { options: {}, - modelValue: 0, + modelValue: "0", }, mixins: [mockMixin], }); diff --git a/src/digital-components/modal/modal.spec.js b/src/digital-components/modal/modal.spec.js index 3d6375094..ace7d49a5 100644 --- a/src/digital-components/modal/modal.spec.js +++ b/src/digital-components/modal/modal.spec.js @@ -7,10 +7,11 @@ jest.mock("vee-validate", () => ({ const mockValidate = (returnValue) => jest.fn(async () => Promise.resolve({ valid: returnValue })); -import { mount, shallowMount } from "@vue/test-utils"; -import Modal from "./modal"; +import { shallowMount } from "@vue/test-utils"; +import modal from "./modal"; import crypto from "crypto"; import { useForm, useIsFormDirty, useIsFormTouched, useIsFormValid } from "vee-validate"; +import { Modal } from "bootstrap"; const footerButtonText = "Sample footer text here."; const headerText = "Sample header text here."; @@ -19,33 +20,40 @@ global.crypto = crypto; describe("modal.vue", () => { it("Should display modal header text when headerText is defined", async () => { - const wrapper = shallowMount(Modal, { + // Arrange / Act + const wrapper = shallowMount(modal, { props: { headerText: headerText, footerButtonText: footerButtonText, }, attachTo: document.body, }); + + // Assert expect(wrapper.html()).toEqual(expect.stringContaining(headerText)); }); it("Should display footer button text when footerButtonText is defined", async () => { - const wrapper = shallowMount(Modal, { + // Arrange / Act + const wrapper = shallowMount(modal, { props: { footerButtonText: footerButtonText, }, attachTo: document.body, }); + + // Assert expect(wrapper.html()).toEqual(expect.stringContaining(footerButtonText)); }); it("Should emit 'footer-button-event' if the form is valid", async () => { + // Arrange useForm.mockReturnValue({ validate: mockValidate(true), }); const resetButtonStyle = jest.fn(); - const wrapper = shallowMount(Modal, { + const wrapper = shallowMount(modal, { props: { footerButtonText: footerButtonText, headerText: headerText, @@ -54,19 +62,22 @@ describe("modal.vue", () => { }); wrapper.vm.resetButtonStyle = resetButtonStyle; + // Act const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); await buttonMain.trigger("click-event"); + // Assert expect(wrapper.emitted("footer-button-event")).toBeTruthy(); }); - it("Should not emit 'footer-button-event' if the form is not valid", async () => { + it("Should not emit 'footer-button-event' if the form is invalid", async () => { + // Arrange useForm.mockReturnValue({ validate: mockValidate(false), }); const resetButtonStyle = jest.fn(); - const wrapper = shallowMount(Modal, { + const wrapper = shallowMount(modal, { props: { footerButtonText: footerButtonText, headerText: headerText, @@ -75,9 +86,121 @@ describe("modal.vue", () => { }); wrapper.vm.resetButtonStyle = resetButtonStyle; + // Act const buttonMain = wrapper.findComponent({ ref: "buttonMain" }); await buttonMain.trigger("click-event"); + // Assert expect(wrapper.emitted("footer-button-event")).toBeFalsy(); }); + + it("Should have a disabled footer button when the form has not been touched", async () => { + // Arrange / Act + useForm.mockReturnValue({ + validate: mockValidate(false), + }); + + useIsFormTouched.mockReturnValue(false); + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(modal, { + props: { + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + // Assert + expect(wrapper.vm.isFooterButtonDisabled).toBe(true); + + }); + + it("Should have a disabled footer button when the form is invalid", async () => { + // Arrange / Act + useForm.mockReturnValue({ + validate: mockValidate(false), + }); + + useIsFormTouched.mockReturnValue(true); + useIsFormDirty.mockReturnValue(true); + useIsFormValid.mockReturnValue(false); + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(modal, { + props: { + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + // Assert + expect(wrapper.vm.isFooterButtonDisabled).toBe(true); + + }); + + it("Should call bootstrap Modal method 'show' when calling 'openModal'", async () => { + // Arrange + useForm.mockReturnValue({ + validate: mockValidate(false), + }); + + useIsFormDirty.mockReturnValue(true); + useIsFormValid.mockReturnValue(true); + + const showMock = jest + .spyOn(Modal.prototype, "show"); + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(modal, { + props: { + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + // Act + wrapper.vm.openModal(); + + // Assert + expect(showMock).toHaveBeenCalled(); + + }); + + it("Should call bootstrap Modal method 'hide' when calling 'closeModal'", async () => { + // Arrange + useForm.mockReturnValue({ + validate: mockValidate(false), + }); + + useIsFormDirty.mockReturnValue(true); + useIsFormValid.mockReturnValue(true); + + const hideMock = jest + .spyOn(Modal.prototype, "hide"); + + const resetButtonStyle = jest.fn(); + const wrapper = shallowMount(modal, { + props: { + footerButtonText: footerButtonText, + headerText: headerText, + }, + attachTo: document.body, + }); + wrapper.vm.resetButtonStyle = resetButtonStyle; + + // Act + wrapper.vm.openModal(); + wrapper.vm.closeModal(); + + // Assert + expect(hideMock).toHaveBeenCalled(); + + }); + }); diff --git a/src/digital-components/textbox-question/textbox-question.spec.js b/src/digital-components/textbox-question/textbox-question.spec.js index 694142fb9..dba54d544 100644 --- a/src/digital-components/textbox-question/textbox-question.spec.js +++ b/src/digital-components/textbox-question/textbox-question.spec.js @@ -1,5 +1,6 @@ import { shallowMount } from "@vue/test-utils"; import textboxQuestion from "./textbox-question"; +import crypto from "crypto"; // Mock CMS content const questionText = "Question Text"; @@ -12,6 +13,8 @@ const mockMixin = { }; const maska = jest.fn(); +global.crypto = crypto; + describe("textboxQuestion.vue", () => { it("Should render a text input", async () => { // Arrange @@ -73,27 +76,6 @@ describe("textboxQuestion.vue", () => { expect(paragraph.attributes("class")).toContain("form-control"); }); - it("Should return input id as the id of the input field", async () => { - // Arrange - const wrapper = shallowMount(textboxQuestion, { - global: { - directives: { - maska: maska, - }, - }, - propsData: { - inputId: "input ID", - }, - mixins: [mockMixin], - }); - - // Act - const input = wrapper.find("input"); - - // Assert - expect(input.attributes().id).toEqual("input ID"); - }); - it("Should render the 'questionText' data value as the aria-label attribute.", async () => { // Arrange const wrapper = shallowMount(textboxQuestion, { From 8af938177177fac54a5c9b21d24d5685b65f2553 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 22 Feb 2023 12:49:05 -0500 Subject: [PATCH 180/261] CSR-1012 unit testing for service-zip-modal-question --- .../service-zip-modal-question.spec.js | 272 +++++++++++++++++- .../service-zip-modal-question.vue | 11 +- .../service-zip-question.vue | 0 3 files changed, 270 insertions(+), 13 deletions(-) rename src/layouts/service-location/service-zip-modal-question/{ => service-zip-question}/service-zip-question.vue (100%) diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index f0c022ba8..4a0dec045 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -1,4 +1,4 @@ -import { mount } from "@vue/test-utils"; +import { mount, shallowMount } from "@vue/test-utils"; import serviceZipModalQuestion from "./service-zip-modal-question"; import crypto from "crypto"; global.crypto = crypto; @@ -9,6 +9,12 @@ jest.mock("@/digital-components/textbox-question/textbox-question", () => ({ }), })); +jest.mock("@/digital-components/modal/modal", () => ({ + methods: { + closeModal: jest.fn(), + }, +})); + const linkWidgetName = "linkWidgetName"; const modalWidgetName = "modalWidgetName"; const textboxQuestionWidgetName = "textboxQuestionWidgetName"; @@ -44,41 +50,287 @@ const mockMixin = { }), getZipCodeData: jest.fn((zip) => { + if (zip === "43235") { + return { + containsMilitaryBase: false, + isServiceable: true, + isValid: true, + state: "OH", + zipCodeCtu: "01820", + }; + } + + if (zip === "61606") { + return { + containsMilitaryBase: false, + isServiceable: true, + isValid: true, + state: "IL", + zipCodeCtu: "01526", + }; + } + return { - isValid: true, - state: "OH", - isServiceable: true, + containsMilitaryBase: false, + isServiceable: false, + isValid: false, + state: null, + zipCodeCtu: null, }; }), }, }; describe("service-zip-modal-question.vue", () => { - it("Should display text from textboxQuestionWidget", async () => { + it("Initial state on load with no existing location info", async () => { + let serviceZipCodeQuestion = { + state: "", + zipCode: "", + isServiceable: undefined, + }; + + // Arrange const wrapper = mount(serviceZipModalQuestion, { mixins: [mockMixin], props: { + modelValue: serviceZipCodeQuestion, linkWidgetName: linkWidgetName, modalWidgetName: modalWidgetName, textboxQuestionWidgetName: textboxQuestionWidgetName, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual( - expect.stringContaining(mockTextboxQuestionCmsContent["QuestionText"]) - ); + + // Assert + expect(wrapper.html()).toEqual(expect.stringContaining(mockLinkCmsContent["BodyText"])); }); - it("Should display footer text from modalWidget", async () => { + it("Initial state on load with existing location info", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "OH", + zipCode: "43235", + isServiceable: true, + }; + const wrapper = mount(serviceZipModalQuestion, { mixins: [mockMixin], props: { + modelValue: serviceZipCodeQuestion, linkWidgetName: linkWidgetName, modalWidgetName: modalWidgetName, textboxQuestionWidgetName: textboxQuestionWidgetName, }, attachTo: document.body, }); - expect(wrapper.html()).toEqual(expect.stringContaining(mockModalCmsContent["FooterText"])); + + // Assert + expect(wrapper.html()).not.toEqual(expect.stringContaining(mockLinkCmsContent["BodyText"])); + }); + + it("Should emit update:modelValue on setZipCode for a valid, serviceable zip", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = "43235"; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + + let expectedEmit = [[{ isServiceable: true, state: "OH", zipCode: "43235" }]]; + + // Assert + expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit); + }); + + it("Should not emit update:modelValue on setZipCode for an invalid zip", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = ""; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + + // Assert + expect(wrapper.emitted("update:modelValue")).not.toBeTruthy(); + }); + + it("Should emit service-zip-updated on setZipCode for a valid, serviceable zip", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = "43235"; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + + // Assert + expect(wrapper.emitted("service-zip-updated")).toBeTruthy(); + }); + + it("Should not emit service-zip-updated on setZipCode for an invalid zip", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = ""; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + + // Assert + expect(wrapper.emitted("service-zip-updated")).not.toBeTruthy(); + }); + + it("Should display invalid zip alerts for invalid ip inputs", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = "11111"; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + + // Assert + expect(wrapper.vm.displayInvalidZipAlert).toBe(true); + }); + + it("Should reset all alerts on onModalClosed", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = ""; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + await wrapper.vm.setZipCode(); + wrapper.vm.onModalClosed(); + + // Assert + expect(wrapper.vm.displayInvalidZipAlert).toBe(false); + }); + + it("Should prepopulate the zip on onModalOpened", async () => { + // Arrange + let serviceZipCodeQuestion = { + state: "IL", + zipCode: "61606", + isServiceable: true, + }; + + const zip = "123"; + + const wrapper = mount(serviceZipModalQuestion, { + mixins: [mockMixin], + props: { + modelValue: serviceZipCodeQuestion, + linkWidgetName: linkWidgetName, + modalWidgetName: modalWidgetName, + textboxQuestionWidgetName: textboxQuestionWidgetName, + }, + attachTo: document.body, + }); + + // Act + wrapper.vm.internalModel.zipCode = zip; + wrapper.vm.onModalOpened(); + + // Assert + expect(wrapper.vm.internalModel.zipCode).toEqual("61606"); }); }); diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 4ca6990b3..ef8e00c1d 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -35,7 +35,7 @@ From acc8e791af1b2dbeb36c55d101ddcf05d55db1b3 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Mar 2023 10:10:58 -0500 Subject: [PATCH 223/261] fixed unit tests --- .../mobile-location-modal-questions.spec.js | 2 - .../mobile-location-modal-questions.vue | 11 +-- .../service-location/service-location.spec.js | 67 +++++++++++++------ .../service-location/service-location.vue | 11 ++- 4 files changed, 58 insertions(+), 33 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js index f7a2238c8..d90f68b1f 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js @@ -332,8 +332,6 @@ describe("mobile-location-modal-questions.vue", () => { expect(wrapper.vm.internalModel.addressQuestions.streetAddress).toEqual(""); expect(wrapper.vm.internalModel.addressQuestions.apartmentNumberOrBusinessName).toEqual(""); expect(wrapper.vm.internalModel.addressQuestions.city).toEqual(""); - expect(wrapper.vm.internalModel.addressQuestions.state).toEqual(""); - expect(wrapper.vm.internalModel.addressQuestions.zipCode).toEqual(""); expect(wrapper.vm.internalModel.isVehicleProtected).toEqual(null); }); }); diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index ecd1345f0..6aceb6262 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -63,7 +63,6 @@ export default { return { internalModel: deepClone(this.modelValue), displayInvalidZipAlert: false, - modalName: "MobileLocationModalWidget", }; }, props: { @@ -108,6 +107,9 @@ export default { } return this.getCmsContent(this.linkWidgetName, "BodyText"); }, + modalName() { + return "MobileLocationModalWidget"; + }, modalHeaderText() { return this.getCmsContent(this.modalWidgetName, "HeaderText"); }, @@ -115,9 +117,6 @@ export default { const cmsContentText = this.getCmsContent("MobileFeeDisclaimerWidget", "Text"); return cmsContentText.replaceAll("{custom:mobileFee}", this.mobileFee); }, - modalFooterText() { - return this.getCmsContent(this.modalWidgetName, "FooterText"); - }, mobileFee() { if (!this.modelValue.mobileFeePart) { return 0; @@ -127,7 +126,11 @@ export default { this.modelValue.mobileFeePart.sellingPrice + this.modelValue.mobileFeePart.kitPrice ); + }, + modalFooterText() { + return this.getCmsContent(this.modalWidgetName, "FooterText"); }, + addressModel: { get: function () { return this.modelValue.addressQuestions; diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 6e09b6fa3..d60de2603 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -177,6 +177,12 @@ describe("service-location.vue", () => { wrapper.vm.$refs.mobileLocationModalQuestions.resetComponent = jest.fn(); wrapper.vm.$refs.serviceZipCodeQuestion.resetMobileFeePart = jest.fn(); + const newServiceZipCodeQuestion = { + zipCode: "61606", + state: "IL", + isServiceable: true, + }; + const mobileLocationQuestions = { addressQuestions: { streetAddress: "5555 Sulgrave Dr", @@ -186,8 +192,7 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - serviceZipCode: "43054", - mobileFee: 0, + mobileFeePart: null, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -196,11 +201,11 @@ describe("service-location.vue", () => { streetAddress: "", apartmentNumberOrBusinessName: "", city: "", - state: "", - zipCode: "", + state: "IL", + zipCode: "61606", }, isVehicleProtected: null, - serviceZipCode: "43081", + mobileFeePart: null }; const serviceZipCodeComponent = wrapper.findComponent({ @@ -208,7 +213,7 @@ describe("service-location.vue", () => { }); // Act - serviceZipCodeComponent.vm.$emit("updated-service-zip-code", "43081"); + serviceZipCodeComponent.vm.$emit("update:modelValue", newServiceZipCodeQuestion); // Assert expect(wrapper.vm.mobileLocationQuestions).toStrictEqual(newMobileLocationQuestions); @@ -230,7 +235,7 @@ describe("service-location.vue", () => { zipCode: "", }, isVehicleProtected: null, - serviceZipCode: "43081", + mobileFeePart: null, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -243,8 +248,7 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - serviceZipCode: "43054", - mobileFee: 0, + mobileFeePart: null, }; const mobileLocationComponent = wrapper.findComponent({ @@ -264,29 +268,50 @@ describe("service-location.vue", () => { wrapper.vm.$refs.mobileLocationModalQuestions.resetComponent = jest.fn(); wrapper.vm.$refs.serviceZipCodeQuestion.resetMobileFeePart = jest.fn(); - const serviceZipCodeInfo = { - state: "OH", - zipCode: "43054", - isServiceable: true, + const mobileLocationQuestions = { + addressQuestions: { + streetAddress: "", + apartmentNumberOrBusinessName: "", + city: "", + state: "", + zipCode: "", + }, + isVehicleProtected: null, + mobileFeePart: null, }; + wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; - const newServiceZipCodeInfo = { - state: "OH", - zipCode: "43081", - isServiceable: true, + const newMobileLocationQuestions = { + addressQuestions: { + streetAddress: "5555 Rustic Dr", + apartmentNumberOrBusinessName: "Apt 1", + city: "Westerville", + state: "OH", + zipCode: "43081", + }, + isVehicleProtected: true, + mobileFeePart: null, }; - wrapper.vm.serviceZipCodeQuestion = serviceZipCodeInfo; const mobileLocationComponent = wrapper.findComponent({ ref: "mobileLocationModalQuestions", }); - // Act - mobileLocationComponent.vm.$emit("updated-zip-code", { + wrapper.vm.serviceZipCodeQuestion = { + zipCode: "61606", + state: "IL", + isServiceable: true, + }; + + const newServiceZipCodeInfo = { state: "OH", zipCode: "43081", isServiceable: true, - }); + }; + + + // Act + mobileLocationComponent.vm.$emit("update:modelValue", newMobileLocationQuestions); // Assert expect(wrapper.vm.serviceZipCodeQuestion).toStrictEqual(newServiceZipCodeInfo); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 1be600ed8..8e7e22833 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -128,12 +128,11 @@ export default { }, methods: { arePagePrerequisitesValid() { - return true; - // return ( - // store.getters.lineItems.supportingItems !== null && - // store.getters.order.serviceLocation.zipCode !== null && - // store.getters.payment.isInsurance !== null - // ); + return ( + store.getters.lineItems.supportingItems !== null && + store.getters.order.serviceLocation.zipCode !== null && + store.getters.payment.isInsurance !== null + ); }, setData(mobileFeePart) { if (mobileFeePart) { From 9023c7d215ed89099462582b0ac144a5c4b3fc42 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Mar 2023 10:31:40 -0500 Subject: [PATCH 224/261] Fixed unit tests after merge --- jest.config.js | 1 + .../service-location/service-location.spec.js | 69 +++++++++++++++++++ .../service-location/service-location.vue | 17 ----- 3 files changed, 70 insertions(+), 17 deletions(-) diff --git a/jest.config.js b/jest.config.js index bfb4bf71f..4d8fd76b1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -27,4 +27,5 @@ module.exports = { // Got the go ahead from Mark to temporarily lower this. Taking out initialize component made the year,make,model and style coverage drop a bit. Once unit tests for license plate lookup, vin lookup and address lookup are in the coverage should go back up to 90 }, }, + silent: true }; diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index d60de2603..0554f4952 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -43,6 +43,75 @@ jest.mock("@/store", () => ({ dispatch: jest.fn(), })); +const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, cmsFieldName) => { + if (widgetName === linkWidgetName) { + return mockLinkCmsContent[cmsFieldName]; + } + + if (widgetName === modalWidgetName) { + return mockModalCmsContent[cmsFieldName]; + } + + if (widgetName === mobileFeeDisclaimerWidgetName) { + return mockMobileFeeDisclaimerContent[cmsFieldName]; + } + + return null; + }), + + getZipCodeData: jest.fn((zip) => { + if (zip === "43235" || zip === "55555") { + return Promise.resolve({ + containsMilitaryBase: false, + isServiceable: true, + isValid: true, + state: "OH", + zipCodeCtu: "01820", + }); + } + + return Promise.resolve({ + containsMilitaryBase: false, + isServiceable: false, + isValid: false, + state: null, + zipCodeCtu: null, + }); + }), + + dispatchStoreAction: jest.fn((actionName) => { + if (actionName === storeActions.GET_MOBILE_FEE_PART) { + return Promise.resolve({ + data: { + partNumber: "MOBILE FEE", + description: "MOBILE FEE", + partType: "FEE", + }, + }); + } + + if (actionName === storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA) { + return Promise.resolve([ + { + partNumber: "MOBILE FEE", + description: "MOBILE FEE", + partType: "FEE", + laborAmount: 49.99, + sellingPrice: 0, + kitPrice: 0, + }, + ]); + } + }), + + getTotalLineItemPrice: jest.fn((lineItem) => { + return 49.99; + }), + }, +}; + beforeEach(() => { store.getters = { lineItems: { diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index dafe9a3dd..11cf42daa 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -137,23 +137,6 @@ export default { this.mobileFeePart = newValue.mobileFeePart; }, }, - mobileLocationLinkPromptText() { - return this.getCmsContent("MobileLocationLinkWidget", "HeaderText"); - }, - mobileFeeDisclaimerText() { - const cmsContentText = this.getCmsContent("MobileFeeDisclaimerWidget", "Text"); - return cmsContentText.replaceAll("{custom:mobileFee}", this.mobileFee); - }, - mobileFee() { - if (!this.mobileFeePart) { - return 0; - } - return ( - this.mobileFeePart.laborAmount + - this.mobileFeePart.sellingPrice + - this.mobileFeePart.kitPrice - ); - }, }, methods: { arePagePrerequisitesValid() { From 81e71a007c89acb6a1eb183d32674eb524c273cc Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Mar 2023 10:32:53 -0500 Subject: [PATCH 225/261] removed 'silent' from jest.config.js --- jest.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 4d8fd76b1..bfb4bf71f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -27,5 +27,4 @@ module.exports = { // Got the go ahead from Mark to temporarily lower this. Taking out initialize component made the year,make,model and style coverage drop a bit. Once unit tests for license plate lookup, vin lookup and address lookup are in the coverage should go back up to 90 }, }, - silent: true }; From 3c73f54c74a84a9839357b2f9bb62febafdfa8d0 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Mon, 6 Mar 2023 11:20:54 -0500 Subject: [PATCH 226/261] formatting --- .../mobile-location-modal-questions.vue | 2 +- src/layouts/service-location/service-location.spec.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 9cc05c4c5..225d97e29 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -114,7 +114,7 @@ export default { this.modelValue.mobileFeePart.sellingPrice + this.modelValue.mobileFeePart.kitPrice ); - }, + }, modalFooterText() { return this.getCmsContent(this.modalWidgetName, "FooterText"); }, diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 0554f4952..8f4572c95 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -274,7 +274,7 @@ describe("service-location.vue", () => { zipCode: "61606", }, isVehicleProtected: null, - mobileFeePart: null + mobileFeePart: null, }; const serviceZipCodeComponent = wrapper.findComponent({ @@ -371,14 +371,13 @@ describe("service-location.vue", () => { state: "IL", isServiceable: true, }; - + const newServiceZipCodeInfo = { state: "OH", zipCode: "43081", isServiceable: true, }; - // Act mobileLocationComponent.vm.$emit("update:modelValue", newMobileLocationQuestions); From 101baa2c1a83b84011fe7126671f91839c68c2c6 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Mar 2023 13:37:10 -0500 Subject: [PATCH 227/261] Fixed quote issue due to change in PriceOrderItemsAndSaveServerData --- src/layouts/quote/quote.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 9712a2a20..abd04b3dc 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -115,7 +115,9 @@ export default { const pricingResults = await baseMixin.methods.dispatchStoreAction( storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA, - availableLineItems, + { + availableLineItems: availableLineItems, + }, false ); From 58f961abc0e7bc45a9643c173c0c4cf94fa72e08 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 6 Mar 2023 14:04:52 -0500 Subject: [PATCH 228/261] Fixed oversight or merge issue that missed moving components back into mobile-location-modal-questions --- .../mobile-location-modal-questions.vue | 12 ++++++++++++ src/layouts/service-location/service-location.vue | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 225d97e29..0aa64594d 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -1,5 +1,10 @@