diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js index 0e47eb37f..4a26b3426 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.spec.js +++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js @@ -6,6 +6,7 @@ import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-question/replace-options-question"; import damageLocationQuestion from "@/layouts/vehicle-damage/damage-location-question/damage-location-question"; +import windshieldOptions from "@/layouts/vehicle-damage/windshield-options/windshield-options"; // Supporting Files import { settleAllPromises } from "@/helpers/layout-helper.js"; @@ -177,7 +178,7 @@ function setupMocks({ availableReplacementOptions: ["Front", "Back", "Side"], }, windshieldOptions: { - availableReplacementOptions: ["Front", "Back", "Side"], + availableReplacementOptions: ["Single", "Driver", "Passenger"], }, }); }); @@ -198,8 +199,8 @@ function setupMocks({ availableReplacementOptions: ["Front", "Back", "Side"], }, windshieldOptions: { - availableReplacementOptions: ["Front", "Back", "Side"], - } + availableReplacementOptions: ["Single", "Driver", "Passenger"], + }, }, }; @@ -226,12 +227,11 @@ function setupMocks({ initializeComponent: jest.fn(), }; - const windshieldOptions = replaceOptionsQuestion - windshieldOptions.methods = { + damageLocationQuestion.methods = { initializeComponent: jest.fn(), }; - damageLocationQuestion.methods = { + windshieldOptions.methods = { initializeComponent: jest.fn(), }; @@ -262,11 +262,13 @@ function setupMocks({ driverSideOptionsWrapper.vm.initializeComponent = replaceOptionsQuestion.methods.initializeComponent; - const windshieldOptionsWrapper = wrapper.findAllComponents({ - name: "replaceOptionsQuestion", - }).at(1); + const windshieldOptionsWrapper = wrapper.findComponent({ + name: "windshieldOptions", + }); + windshieldOptionsWrapper.vm.initializeComponent = - replaceOptionsQuestion.methods.initializeComponent; + windshieldOptions.methods.initializeComponent; + const damageLocationQuestionWrapper = wrapper.findComponent({ name: "damageLocationQuestion", diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index b1ebfc6c8..998a43892 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -34,9 +34,6 @@ import baseMixin from "@/mixins/base-mixin"; export default { name: "vehicle-damage", - updated() { - console.log(this.selectedWindshieldOptions.selectedWindshieldReplaceOptions); - }, async beforeRouteEnter(to, from, next) { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue index 78c72800c..80656e0a4 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue +++ b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue @@ -8,8 +8,6 @@ :groupName="groupName" buttonType="listCard" v-model="selectedValues" - validationRules="windshield-damage-required|checkForRepairAndReplace:@DamageLocationQuestion" - :suppressError="suppressError" /> @@ -17,21 +15,24 @@