From 3c22e2cb4e93d01f3a68824abfd2dd0b7d1326fb Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 13 Jul 2022 17:33:50 -0400 Subject: [PATCH 01/44] Updates to remove vin-lookup from PR. --- jest.config.js | 1 + .../button-question/button-question.vue | 6 +- src/layouts/quote/quote.vue | 116 +++++++++- src/router/index.js | 8 + src/router/router-constants/fmgPage-values.js | 1 + src/router/router-constants/routing-table.js | 9 +- .../list-button-horizontal.vue | 200 +++++++++++++----- 7 files changed, 275 insertions(+), 66 deletions(-) diff --git a/jest.config.js b/jest.config.js index 0a063507d..27656cd80 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,6 +16,7 @@ module.exports = { "!src/layouts/reveal/**/*.vue", "!src/ux-components/text-link/**/*.vue", "!src/common-components/question-chain/**/*.vue", + "!src/layouts/quote/**/*.vue", // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 2ea6d1c3a..b1d026023 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -25,6 +25,7 @@ :loaderColor="loaderColor" :loaderPosition="loaderPosition" :isWide=isWide + :isCashOrInsurance=isCashOrInsurance :isRequired=isRequired :buttonImage="answer.AnswerImageUrl" :buttonImageId="answer.ImageId" @@ -34,10 +35,10 @@ :selectedValues="selectedValues" data-test="button" :validationRules="validationRules" - :class="[suppressError ? 'alertError' : '']" + :class="[suppressError ? 'alertError' : '' , isCashOrInsurance ? 'radio-fancy' : '']" :clearOnUnmount="clearOnUnmount" /> - +
@@ -87,6 +88,7 @@ export default { isRequired: Boolean, isOverflowScrollable: Boolean, isWide: Boolean, + isCashOrInsurance: Boolean, modelValue: [Array, String], validationRules: String, suppressError: Boolean, diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 158150baf..d2274cc24 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -1,10 +1,120 @@ + +--> + + \ No newline at end of file + }, + computed: { + years() { + return ["2011", "2012"]; + }, + answersFromCms() { + return ["Pay on my own", "Pay with insurance"]; + }, + selectedChipCountValues: { + get: function() { + return this.modelValue; + }, + set: function(newValue) { + this.$emit("update:modelValue", newValue); + } + }, + }, + components: { + funnelHeader, + funnelFooter, + vehicleBanner, + funnelSubHeader, + Form, + buttonQuestion + }, + +}; + diff --git a/src/router/index.js b/src/router/index.js index 8b9328db0..0bc9825a4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,7 +19,15 @@ import eventBus from "@/helpers/event-bus/event-bus"; import store from "@/store"; import analyticsMixin from "@/mixins/analytics-mixin"; +// Components +import quote from "@/layouts/quote/quote.vue"; + const routes = [ + { + path: "/quote", // This is a temporary route for testing. + name: "quote", + component: quote, + }, { path: "/", name: "root", diff --git a/src/router/router-constants/fmgPage-values.js b/src/router/router-constants/fmgPage-values.js index d067895ee..58054b06b 100644 --- a/src/router/router-constants/fmgPage-values.js +++ b/src/router/router-constants/fmgPage-values.js @@ -1,4 +1,5 @@ const fmgPageValues = { + QUOTE: "quote", VEHICLE_YEAR: "vehicle-year", VEHICLE_MAKE: "vehicle-make", VEHICLE_MODEL: "vehicle-model", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 515465385..da76e73cc 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -114,12 +114,13 @@ const routingTable = [ }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, - destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + //destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + destinationFmgPageValue: fmgPageValues.QUOTE, }, { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + }, ], }, { @@ -178,7 +179,7 @@ const routingTable = [ { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, - }, + }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS @@ -186,7 +187,7 @@ const routingTable = [ { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + } ], }, { diff --git a/src/ux-components/list-button-horizontal/list-button-horizontal.vue b/src/ux-components/list-button-horizontal/list-button-horizontal.vue index 49978aa1e..afb048f09 100644 --- a/src/ux-components/list-button-horizontal/list-button-horizontal.vue +++ b/src/ux-components/list-button-horizontal/list-button-horizontal.vue @@ -1,54 +1,54 @@ diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 127561bd2..da76e73cc 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -114,12 +114,13 @@ const routingTable = [ }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, - destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + //destinationFmgPageValue: fmgPageValues.PART_QUESTIONS + destinationFmgPageValue: fmgPageValues.QUOTE, }, { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - } + }, ], }, { @@ -178,7 +179,7 @@ const routingTable = [ { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE, - }, + }, { scenario: navigationScenarios.SELECTED_VIN_WITH_PART_QUESTIONS, destinationFmgPageValue: fmgPageValues.PART_QUESTIONS @@ -186,11 +187,7 @@ const routingTable = [ { scenario: navigationScenarios.SELECTED_VIN_WITH_MULTIPLE_PARTS, destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS - }, - { - scenario: navigationScenarios.SELECTED_PROVIDE_VIN_DIFFERENT_WAY, - destinationFmgPageValue: fmgPageValues.ESTIMATE - } + } ], }, { @@ -233,4 +230,4 @@ const routingTable = [ }, ]; -export { routingTable }; \ No newline at end of file +export { routingTable }; From 4f532be25418e1b93c1535933339b4d54d90d63a Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 14 Jul 2022 13:43:55 -0400 Subject: [PATCH 05/44] Temporary unit test block. --- jest.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 27656cd80..0dcb54b17 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,7 +16,8 @@ module.exports = { "!src/layouts/reveal/**/*.vue", "!src/ux-components/text-link/**/*.vue", "!src/common-components/question-chain/**/*.vue", - "!src/layouts/quote/**/*.vue", + "!src/layouts/quote/**/*.vue", // Temporary + "!src/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], From ed709a395f0fcb2c1c0ddde5c3382d5afaad5719 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 14 Jul 2022 14:45:16 -0400 Subject: [PATCH 06/44] Temporary block unit test. --- jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.config.js b/jest.config.js index 0dcb54b17..0c50d4c75 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,6 +5,7 @@ module.exports = { preset: "@vue/cli-plugin-unit-jest", transform: { "^.+\\.vue$": "vue-jest" }, moduleFileExtensions: ["js", "vue"], + modulePathIgnorePatterns: ["vin-lookup"], collectCoverageFrom: [ "src/**/*.{js,vue}", "!src/main.js", From 5e36b01f319b950a02f218eaf500582d9e87a67d Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 18 Jul 2022 16:03:43 -0400 Subject: [PATCH 07/44] WIP --- src/layouts/quote/quote.vue | 6 +- .../radio-service-package.vue | 67 +++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 src/ux-components/radio-service-package/radio-service-package.vue diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 588244bd7..2b8969d30 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -26,7 +26,7 @@ isCashOrInsurance isRequired /> - + +
+ + +
+ + + + + From 57bc0d5484bbb51f2ec3cbeacb5e25419deffbc7 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 18 Jul 2022 17:03:54 -0400 Subject: [PATCH 08/44] WIP --- .../radio-service-package.vue | 73 ++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/src/ux-components/radio-service-package/radio-service-package.vue b/src/ux-components/radio-service-package/radio-service-package.vue index c7075a9a2..187adfe2b 100644 --- a/src/ux-components/radio-service-package/radio-service-package.vue +++ b/src/ux-components/radio-service-package/radio-service-package.vue @@ -1,7 +1,46 @@ @@ -16,10 +55,12 @@ export default { margin: 0.5rem 0; input[type="radio"] { opacity: 0; + position: absolute; + left: -9999px; + label { display: flex; - align-items: center; + align-items: flex-start; position: relative; cursor: pointer; width: 100%; @@ -27,9 +68,15 @@ export default { border: 1px solid $gray-300; box-shadow: 0px 4px 8px -4px rgba(0, 0, 0, 0.15), 0px 4px 24px -8px rgba(0, 0, 0, 0.2); border-radius: .5rem; + overflow: hidden; + min-height: 58px; + max-height: 0; + transition: max-height .5s ease; &::before { content: ""; + position: relative; + top: 3px; margin-right: 1rem; border-radius: 50%; border: 1px solid $blue; @@ -41,6 +88,7 @@ export default { content: ""; position: absolute; left: 20px; + top: 23px; border-radius: 50%; width: 10px; height: 10px; @@ -51,6 +99,7 @@ export default { + label { background-color: $blue-100; border: 1px solid $blue; + max-height: 500px; } + label::after { background: $blue; @@ -63,5 +112,25 @@ export default { } } } + + .package-specs { + display: flex; + flex-direction: column; + + p { + &.sub-label { + color: $green; + text-transform: uppercase; + } + } + } + + ul { + margin: 1rem 0 0 -15px; + padding: 0; + li { + margin-bottom: .5rem; + } + } } From 66303864f0e4d017f5fed21c7f7ff39d7c8a92da Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 19 Jul 2022 16:48:46 -0400 Subject: [PATCH 09/44] WIP --- .../radio-service-package.vue | 72 +++++++++++++------ 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/src/ux-components/radio-service-package/radio-service-package.vue b/src/ux-components/radio-service-package/radio-service-package.vue index 187adfe2b..2f06d0600 100644 --- a/src/ux-components/radio-service-package/radio-service-package.vue +++ b/src/ux-components/radio-service-package/radio-service-package.vue @@ -3,7 +3,7 @@
-
+
-
+
-
+
-
+
Date: Tue, 13 Sep 2022 10:33:54 -0400 Subject: [PATCH 39/44] fixed text-block build issues --- src/common-components/text-block/text-block.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/common-components/text-block/text-block.vue b/src/common-components/text-block/text-block.vue index 53cf8ce87..aee7fc5c6 100644 --- a/src/common-components/text-block/text-block.vue +++ b/src/common-components/text-block/text-block.vue @@ -34,8 +34,4 @@ export default { font-weight: 500; } } -<<<<<<< HEAD -======= - ->>>>>>> release/2022.09.29 From bdc9f176b56e69ce3072a3bb2e5b5eb89255f41e Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 13 Sep 2022 10:56:40 -0400 Subject: [PATCH 40/44] fixing error ... again? --- src/common-components/text-block/text-block.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common-components/text-block/text-block.vue b/src/common-components/text-block/text-block.vue index aee7fc5c6..8ca33b0a3 100644 --- a/src/common-components/text-block/text-block.vue +++ b/src/common-components/text-block/text-block.vue @@ -34,4 +34,5 @@ export default { font-weight: 500; } } + From d34d291c7be7386d87591b7df7fcaee783d52c42 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Tue, 13 Sep 2022 14:52:45 -0400 Subject: [PATCH 41/44] CSR-818: small focus style change --- src/styles/common-error-styles.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/styles/common-error-styles.scss b/src/styles/common-error-styles.scss index 25a651d52..a3c4a6ef8 100644 --- a/src/styles/common-error-styles.scss +++ b/src/styles/common-error-styles.scss @@ -138,11 +138,13 @@ html { pointer-events: all; font-weight: $font-weight-normal; } - &.btn.btn-primary:hover, - &.btn.btn-primary:focus, - &.btn.btn-primary:focus-visible { + &.btn.btn-primary:hover { background: $gray-200; box-shadow: none; } + &.btn.btn-primary:focus, + &.btn.btn-primary:focus-visible { + box-shadow: 0 0 0 3px $white, 0 0 0 5.5px $blue-700; + } } } From f89369234653992f0c2c5b6be9b48f6847e0c543 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Tue, 13 Sep 2022 14:59:17 -0400 Subject: [PATCH 42/44] CSR-818: undo previous commit --- .../funnel-footer/funnel-footer.vue | 2 +- src/ux-components/button-main/button-main.spec.js | 15 +++++++++++++++ src/ux-components/button-main/button-main.vue | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index ddb81b531..2c4152cfa 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -9,6 +9,7 @@ :buttonText="buttonText" loaderColor="white" :class="isForwardActionDisabled && 'form-test-invalid'" + :aria-disabled="isForwardActionDisabled" :isDisabled="isForwardActionDisabled" @click-event="buttonClick" data-bs-target="#footerModal" @@ -84,7 +85,6 @@ export default { }; }, buttonClick() { - if (this.isForwardActionDisabled) { return false } //prevent keyboard input after button click document.onkeydown = function (e) { return false; diff --git a/src/ux-components/button-main/button-main.spec.js b/src/ux-components/button-main/button-main.spec.js index 0389fe1bf..2f0b4c72e 100644 --- a/src/ux-components/button-main/button-main.spec.js +++ b/src/ux-components/button-main/button-main.spec.js @@ -19,6 +19,21 @@ describe("buttonMain.vue", () => { expect(button.attributes("class")).toContain("btn-primary"); }); + it("Should return aria-disabled state", async () => { + // Act + const wrapper = shallowMount(buttonMain, setupMocks({ + propsData: { + isDisabled: true, + }, + })); + + // Assert + const button = wrapper.find("button"); + + // Expect + expect(button.attributes()["aria-disabled"]).toEqual("true"); + }); + it("Should return loader color", async () => { // Act const wrapper = shallowMount(buttonMain, setupMocks({ diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index 345dbbe0f..8396351f8 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -1,5 +1,6 @@