From a1335a56d351500da2317449847c2bbaba5226eb Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 27 Aug 2024 16:18:22 -0400 Subject: [PATCH] Rectify prettier change --- .prettierrc | 3 +- src/constants/tint-mapper.js | 2 +- .../base-input-button.spec.js | 14 +- .../base-input-button/base-input-button.vue | 4 +- .../button-question/button-question.spec.js | 88 ++++----- .../button-question/button-question.vue | 2 +- .../date-picker/date-picker.spec.js | 16 +- .../date-picker/date-picker.vue | 20 +- .../dropdown-question/dropdown-question.vue | 2 +- .../modal-button-main.spec.js | 18 +- .../modal-button-main/modal-button-main.vue | 2 +- .../phone-number-question.spec.js | 2 +- .../phone-number-question.vue | 2 +- .../question-chain/question-chain.spec.js | 2 +- .../textbox-question/textbox-question.spec.js | 6 +- .../textbox-question/textbox-question.vue | 2 +- .../address-questions.spec.js | 2 +- .../address-questions/address-questions.vue | 20 +- src/fmg-components/cart/cart.spec.js | 14 +- src/fmg-components/cart/cart.vue | 56 +++--- .../funnel-header/funnel-header.vue | 4 +- .../loading-modal/loading-modal.spec.js | 2 +- .../promo-modal-question.spec.js | 8 +- .../promo-modal-question.vue | 26 +-- .../vehicle-banner/vehicle-banner.spec.js | 4 +- src/global-methods.js | 12 +- src/helpers/add-to-calendar-helper.js | 2 +- src/helpers/add-to-calendar-helper.spec.js | 2 +- src/helpers/cms-content-helper.js | 12 +- src/helpers/damage-helper.js | 4 +- src/helpers/event-bus/event-bus.spec.js | 14 +- .../heritage-integration/cookie-helper.js | 12 +- .../cookie-helper.spec.js | 4 +- .../heritage-integration/navigation-helper.js | 2 +- .../navigation-helper.spec.js | 8 +- .../heritage-integration/order-helper.js | 16 +- .../heritage-integration/order-helper.spec.js | 24 +-- src/helpers/layout-helper.js | 2 +- src/helpers/logger.js | 8 +- src/helpers/object-helper.js | 2 +- src/helpers/promotions-helper.js | 54 +++--- src/helpers/promotions-helper.spec.js | 146 +++++++-------- src/helpers/service-package-helper.js | 32 ++-- src/helpers/service-package-helper.spec.js | 84 ++++----- src/helpers/unit-test-helper.js | 2 +- .../address-lookup/address-lookup.spec.js | 26 ++- src/layouts/address-lookup/address-lookup.vue | 34 ++-- .../customer-questions/customer-questions.vue | 4 +- .../address-vehicles-question.vue | 2 +- .../address-vehicles/address-vehicles.vue | 14 +- .../capability-questions.spec.js | 6 +- .../capability-questions.vue | 18 +- .../add-to-calendar/add-to-calendar.vue | 34 ++-- .../calendar-modal-question.vue | 4 +- src/layouts/confirmation/confirmation.vue | 18 +- .../customer-details/customer-details.spec.js | 2 +- .../customer-details/customer-details.vue | 8 +- src/layouts/estimate/estimate.spec.js | 4 +- src/layouts/estimate/estimate.vue | 18 +- .../insurance-company/insurance-company.vue | 4 +- .../license-plate-lookup.spec.js | 32 ++-- .../license-plate-lookup.vue | 34 ++-- .../molding-questions.spec.js | 4 +- .../molding-questions/molding-questions.vue | 12 +- .../part-questions/part-questions.spec.js | 4 +- src/layouts/part-questions/part-questions.vue | 12 +- .../payment-method-question.vue | 2 +- src/layouts/payment-method/payment-method.vue | 54 +++--- .../damage-review/damage-review.vue | 6 +- .../service-package-review.spec.js | 8 +- .../service-package-review.vue | 12 +- .../payment-pia-return/payment-pia-return.vue | 22 +-- .../payment-switch-button.vue | 2 +- src/layouts/payment/payment.spec.js | 2 +- src/layouts/payment/payment.vue | 24 +-- .../afterpay-modal-banner.vue | 4 +- .../cash-or-insurance-question.vue | 2 +- src/layouts/quote/quote.spec.js | 26 +-- src/layouts/quote/quote.vue | 54 +++--- .../recal-disclaimer/recal-disclaimer.vue | 2 +- .../service-package-question.spec.js | 60 +++--- .../service-package-question.vue | 48 ++--- .../service-package-radio.vue | 2 +- .../schedule/helpers/schedule-helper.js | 2 +- src/layouts/schedule/schedule.spec.js | 22 +-- src/layouts/schedule/schedule.vue | 38 ++-- .../time-slot-modal-question.spec.js | 28 +-- .../time-slot-modal-question.vue | 44 ++--- .../classes/provider-address.js | 2 +- .../service-location-helper.js | 12 +- .../service-location-helper.spec.js | 8 +- .../mobile-location-modal-questions.spec.js | 4 +- .../mobile-location-modal-questions.vue | 8 +- .../service-location/service-location.spec.js | 66 +++---- .../service-location/service-location.vue | 28 +-- .../service-zip-modal-question.spec.js | 2 +- .../service-zip-modal-question.vue | 6 +- .../shop-list-button/shop-list-button.vue | 2 +- .../shop-question/shop-question.spec.js | 2 +- .../shop-question/shop-question.vue | 4 +- src/layouts/service-zip/service-zip.spec.js | 10 +- src/layouts/service-zip/service-zip.vue | 18 +- .../damage-location-question.spec.js | 4 +- .../replace-options-question.spec.js | 6 +- .../side-door-options.spec.js | 4 +- .../side-door-options/side-door-options.vue | 10 +- .../vehicle-damage/vehicle-damage.spec.js | 52 +++--- src/layouts/vehicle-damage/vehicle-damage.vue | 46 ++--- .../windshield-chip-count-question.spec.js | 2 +- .../windshield-damage-type-question.spec.js | 2 +- .../windshield-options/windshield-options.vue | 18 +- .../glass-part-question.spec.js | 8 +- .../glass-part-question.vue | 6 +- .../vehicle-parts/vehicle-parts.spec.js | 22 +-- src/layouts/vehicle-parts/vehicle-parts.vue | 6 +- .../vehicle-question/vehicle-question.spec.js | 2 +- src/layouts/vehicle/vehicle.spec.js | 2 +- src/layouts/vehicle/vehicle.vue | 36 ++-- src/layouts/vin-lookup/vin-lookup.spec.js | 2 +- src/layouts/vin-lookup/vin-lookup.vue | 36 ++-- src/main.js | 2 +- src/mixins/analytics-mixin.js | 6 +- src/mixins/analytics-mixin.spec.js | 16 +- src/mixins/base-mixin.js | 12 +- src/mixins/input-button-wrapper-mixin.spec.js | 10 +- src/mixins/vehicle-questions-mixin.js | 18 +- src/mixins/vehicle-questions-mixin.spec.js | 56 +++--- src/router/index.js | 42 ++--- src/store/index.js | 176 +++++++++--------- src/store/store.spec.js | 146 +++++++-------- .../strategies/broadcastChannel.spec.js | 4 +- .../strategies/localStorage.js | 6 +- .../strategies/localStorage.spec.js | 2 +- .../vuexSharedMutations.js | 4 +- src/ux-components/alert/alert.spec.js | 12 +- .../button-main/button-main.spec.js | 18 +- src/ux-components/button-main/button-main.vue | 2 +- src/ux-components/text-link/text-link.vue | 2 +- 138 files changed, 1244 insertions(+), 1247 deletions(-) diff --git a/.prettierrc b/.prettierrc index 548cc94c4..192cad794 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { "tabWidth": 4, "bracketSameLine": true, - "printWidth": 100 + "printWidth": 100, + "trailingComma" : "es5" } \ No newline at end of file diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js index bf8dbbf96..c290dd1db 100644 --- a/src/constants/tint-mapper.js +++ b/src/constants/tint-mapper.js @@ -89,7 +89,7 @@ export function getTintImage(glassLocation, colorString) { } const tintImageSource = tintMap[glassLocation.toLowerCase()].find( - (item) => item.name.toLowerCase() == colorString.toLowerCase(), + (item) => item.name.toLowerCase() == colorString.toLowerCase() ); return tintImageSource; diff --git a/src/digital-components/base-input-button/base-input-button.spec.js b/src/digital-components/base-input-button/base-input-button.spec.js index 464c79797..507c1ec59 100644 --- a/src/digital-components/base-input-button/base-input-button.spec.js +++ b/src/digital-components/base-input-button/base-input-button.spec.js @@ -524,7 +524,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.handleChange).toHaveBeenCalledWith(resultingValueToEmit); - }, + } ); describe("checkbox", () => { @@ -644,7 +644,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.valueToEmit).toEqual(["Hello", "Mello"]); expect(wrapper.vm.handleChange).toHaveBeenCalledWith(["Hello", "Mello"]); - }, + } ); }); @@ -672,7 +672,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.vm.valueToEmit).toEqual("Bello"); expect(wrapper.vm.handleChange).toHaveBeenCalledWith("Bello"); - }, + } ); }); }); @@ -721,7 +721,7 @@ describe("baseInputButton.vue", () => { // Assert expect(wrapper.emitted()["update:modelValue"][0][0]).toEqual("HELLO WORLD"); - }, + } ); }); @@ -957,7 +957,7 @@ describe("baseInputButton.vue", () => { "Clicked", "Bello", true, - undefined, + undefined ); expect(wrapper.vm.setLastValuePushedToGa).toHaveBeenCalledWith("Bello"); }); @@ -1020,7 +1020,7 @@ describe("baseInputButton.vue", () => { const inputElement = wrapper.find("input"); expect(wrapper.vm.isChecked).toEqual(false); expect(inputElement.element.checked).toBe(false); - }, + } ); test("modelValue doesn't contain this button's value => checkbox isn't checked", async () => { @@ -1082,7 +1082,7 @@ describe("baseInputButton.vue", () => { const inputElement = wrapper.find("input"); expect(wrapper.vm.isChecked).toEqual(false); expect(inputElement.element.checked).toBe(false); - }, + } ); test("modelValue equals this button's value => radio button is checked", () => { diff --git a/src/digital-components/base-input-button/base-input-button.vue b/src/digital-components/base-input-button/base-input-button.vue index 4e4632884..e9b5e6411 100644 --- a/src/digital-components/base-input-button/base-input-button.vue +++ b/src/digital-components/base-input-button/base-input-button.vue @@ -134,7 +134,7 @@ export default { this.GaActions.CLICKED, value?.toString() ?? this.value?.toString(), true, - this.valueToLogType, + this.valueToLogType ); this.setLastValuePushedToGa(value ?? this.value); @@ -182,7 +182,7 @@ export default { const { handleChange, meta, errors } = useField( toRef(props, "groupName"), toRef(props, "validationRules"), - fieldOptions, + fieldOptions ); return { diff --git a/src/digital-components/button-question/button-question.spec.js b/src/digital-components/button-question/button-question.spec.js index c63a9fa02..3b7a4e80e 100644 --- a/src/digital-components/button-question/button-question.spec.js +++ b/src/digital-components/button-question/button-question.spec.js @@ -69,7 +69,7 @@ describe("buttonQuestion.vue", () => { // Arrange const wrapper = shallowMount( buttonQuestion, - setupMocks({ propsData: { groupName: "group-name" } }), + setupMocks({ propsData: { groupName: "group-name" } }) ); await wrapper.setProps({ answers: ["2022", "2021", "2020"], @@ -87,7 +87,7 @@ describe("buttonQuestion.vue", () => { test("is checkbox => should emit captured value", async () => { const wrapper = shallowMount( buttonQuestion, - setupMocks({ propsData: { groupName: "group-name" } }), + setupMocks({ propsData: { groupName: "group-name" } }) ); await wrapper.setProps({ answers: ["2022", "2021", "2020"], @@ -125,7 +125,7 @@ describe("buttonQuestion.vue", () => { buttonTypeString: "mockComponent", buttonTypeObject: mockComponent, }, - }), + }) ); // Act @@ -158,7 +158,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -184,7 +184,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -212,7 +212,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -231,7 +231,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -259,7 +259,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -285,7 +285,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -313,7 +313,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -332,7 +332,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -360,7 +360,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -386,7 +386,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -414,7 +414,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -433,7 +433,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -461,7 +461,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -487,7 +487,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -515,7 +515,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -534,7 +534,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -562,7 +562,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -588,7 +588,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -616,7 +616,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -635,7 +635,7 @@ describe("buttonQuestion.vue", () => { propsData: { answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -660,7 +660,7 @@ describe("buttonQuestion.vue", () => { answers: answerGroup, groupName: "this is my group name", }, - }), + }) ); // Act @@ -669,7 +669,7 @@ describe("buttonQuestion.vue", () => { // Assert expect(buttonsInfo[0].groupName).toEqual("this-is-my-group-name"); expect(buttonsInfo[1].groupName).toEqual("this-is-my-group-name"); - }, + } ); test.each(answers)( @@ -683,7 +683,7 @@ describe("buttonQuestion.vue", () => { answers: answerGroup, groupName: "this-is-my-group-name", }, - }), + }) ); // Act @@ -692,7 +692,7 @@ describe("buttonQuestion.vue", () => { // Assert expect(buttonsInfo[0].groupName).toEqual("this-is-my-group-name"); expect(buttonsInfo[1].groupName).toEqual("this-is-my-group-name"); - }, + } ); }); @@ -714,7 +714,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -741,7 +741,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -768,7 +768,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -797,7 +797,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -826,7 +826,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -855,7 +855,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -886,7 +886,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -906,7 +906,7 @@ describe("buttonQuestion.vue", () => { useTextForValue: true, answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -935,7 +935,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -962,7 +962,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -989,7 +989,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1018,7 +1018,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1047,7 +1047,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1076,7 +1076,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1107,7 +1107,7 @@ describe("buttonQuestion.vue", () => { }, ], }, - }), + }) ); // Act @@ -1127,7 +1127,7 @@ describe("buttonQuestion.vue", () => { useTextForValue: false, answers: ["answer 1", "answer 2"], }, - }), + }) ); // Act @@ -1145,7 +1145,7 @@ describe("buttonQuestion.vue", () => { function setupMocks(mountOptionsMockData = {}) { const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 8bcb349af..b060167cb 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -309,7 +309,7 @@ export default { this.$route.query[queryStrings.FMG_PAGE], this.GaActions.DISPLAYED, eventLabel, - true, + true ); } }, diff --git a/src/digital-components/date-picker/date-picker.spec.js b/src/digital-components/date-picker/date-picker.spec.js index c9c19b0a6..e4416d37a 100644 --- a/src/digital-components/date-picker/date-picker.spec.js +++ b/src/digital-components/date-picker/date-picker.spec.js @@ -442,7 +442,7 @@ describe("date-picker.vue", () => { "2023-07-24", "2023-08-19", "Inshop", - "006747", + "006747" ); // Assert @@ -903,7 +903,7 @@ describe("date-picker.vue", () => { // Assert expect( testResult[0].weekStartDate <= todayString && - todayString <= testResult[0].weekEndDate, + todayString <= testResult[0].weekEndDate ).toBe(true); wrapper.unmount(); @@ -938,7 +938,7 @@ describe("date-picker.vue", () => { const testResult = wrapper.vm.getInitialViewWeeks( "2023-07-31", 5, - mockPreSelectedDate, + mockPreSelectedDate ); // Assert @@ -956,7 +956,7 @@ describe("date-picker.vue", () => { const testResult = wrapper.vm.getInitialViewWeeks( "2023-07-31", 5, - mockPreSelectedDate, + mockPreSelectedDate ); // Assert @@ -1028,7 +1028,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2023-12-31", - "2023-12-31", + "2023-12-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("December-2023"); @@ -1054,7 +1054,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2024-01-01", - "2024-01-31", + "2024-01-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("January-2024"); @@ -1083,7 +1083,7 @@ describe("date-picker.vue", () => { // Assert expect(wrapper.vm.updateSelectableDates).toHaveBeenCalledWith( "2024-01-01", - "2024-01-31", + "2024-01-31" ); expect(wrapper.vm.scrollToElement).toHaveBeenCalledWith("January-2024"); @@ -1339,7 +1339,7 @@ function setupMocks(mountOptionsMockData = {}) { }, }; const mountOptions = getMountOptions( - Object.assign(initialMountOptionsMockData, mountOptionsMockData), + Object.assign(initialMountOptionsMockData, mountOptionsMockData) ); const wrapper = shallowMount(datePicker, mountOptions); diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index bb95dfc8c..c345a1ce3 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -288,7 +288,7 @@ export default { for (let j = 0; j < 7; j++) { const newDate = convertDateStringToDate( - weeks[splitWeekIndex].weekStartDate, + weeks[splitWeekIndex].weekStartDate ); newDate.setDate(newDate.getDate() + j); if (newDate.getDate() === 1) switchToWeek2 = true; @@ -349,7 +349,7 @@ export default { const initialViewWeeks = this.getInitialViewWeeks( todayDateString, config.initialViewRowsToShow, - config.preSelectedDate, + config.preSelectedDate ); const initialViewStartDate = todayDateString; const initialViewEndDate = initialViewWeeks[initialViewWeeks.length - 1].weekEndDate; @@ -379,7 +379,7 @@ export default { initialViewStartDate, initialViewEndDate, store.getters.order.serviceLocation.appointmentType, - store.getters.order.serviceLocation.provider.providerNumber, + store.getters.order.serviceLocation.provider.providerNumber ); resolve(response); }); @@ -442,7 +442,7 @@ export default { this.$nextTick(() => { //Advance to month const monthToShow = this.months.find((month) => - month.monthClass.includes("month-preselected"), + month.monthClass.includes("month-preselected") ); if ( monthToShow.monthClass.includes("month-preselected") && @@ -604,7 +604,7 @@ export default { if (this.hideSomeDaysForInitialView) { monthToShow = this.months.find( ({ isMonthThatHidesSomeDaysForInitialView }) => - isMonthThatHidesSomeDaysForInitialView, + isMonthThatHidesSomeDaysForInitialView ); // find the first day-hidden to become the next api call start date monthStartDateNum = @@ -613,13 +613,13 @@ export default { } else { if (this.calendarViewDirection === "future") { monthToShow = this.months.find((month) => - month.monthClass.includes("month-hidden"), + month.monthClass.includes("month-hidden") ); } if (this.calendarViewDirection === "past") { // TODO: UPDATE THIS WITH CORRECT PAST LOOKING LOGIC monthToShow = this.months.find((month) => - month.monthClass.includes("month-hidden"), + month.monthClass.includes("month-hidden") ); } } @@ -627,7 +627,7 @@ export default { // make new API call with this month's start and end dates await this.updateSelectableDates( monthToShow.dates[monthStartDateNum].inputValue, - monthToShow.dates[monthToShow.dates.length - 1].inputValue, + monthToShow.dates[monthToShow.dates.length - 1].inputValue ); this.isLoading = false; this.hideSomeDaysForInitialView = false; // if hid days on initial partial view, this will reveal those days @@ -643,12 +643,12 @@ export default { monthStart, monthEnd, this.$store.getters.order.serviceLocation.appointmentType, - this.$store.getters.order.serviceLocation.provider.providerNumber, + this.$store.getters.order.serviceLocation.provider.providerNumber ); moreSelectableDates.days.forEach((selectableDate) => { const index = this.selectableDatesData.findIndex( - (dateObj) => dateObj.date === selectableDate.date, + (dateObj) => dateObj.date === selectableDate.date ); if (index === -1) this.selectableDatesData.push(selectableDate); this.months.forEach((month) => { diff --git a/src/digital-components/dropdown-question/dropdown-question.vue b/src/digital-components/dropdown-question/dropdown-question.vue index bc7ea832e..70bf6c90c 100644 --- a/src/digital-components/dropdown-question/dropdown-question.vue +++ b/src/digital-components/dropdown-question/dropdown-question.vue @@ -88,7 +88,7 @@ export default { const { errorMessage, handleBlur, handleChange, meta, errors } = useField( dropdownId, props.validationRules, - fieldOptions, + fieldOptions ); return { diff --git a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js index fcc089f28..f212d8ec3 100644 --- a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js +++ b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.spec.js @@ -12,7 +12,7 @@ describe("modal-button-main.vue", () => { propsData: { isPrimary: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -28,7 +28,7 @@ describe("modal-button-main.vue", () => { propsData: { isDisabled: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -45,7 +45,7 @@ describe("modal-button-main.vue", () => { loaderColor: "blue", loaderEnabled: true, }, - }), + }) ); // Act @@ -66,7 +66,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); // Act @@ -87,7 +87,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -112,7 +112,7 @@ describe("modal-button-main.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -137,7 +137,7 @@ describe("modal-button-main.vue", () => { loaderEnabled: true, isDisabled: false, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -161,7 +161,7 @@ describe("modal-button-main.vue", () => { loaderEnabled: true, isDisabled: true, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -179,7 +179,7 @@ describe("modal-button-main.vue", () => { function setupMocks(mountOptionsMockData = {}) { const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); diff --git a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue index 72ee0b5a4..687ae6858 100644 --- a/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue +++ b/src/digital-components/modal/ux-components/modal-button-main/modal-button-main.vue @@ -45,7 +45,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.buttonText, - true, + true ); if (!this.isDisabled) { this.isLoaderDisplayed = true; diff --git a/src/digital-components/phone-number-question/phone-number-question.spec.js b/src/digital-components/phone-number-question/phone-number-question.spec.js index 5671f80ff..78ff60bf7 100644 --- a/src/digital-components/phone-number-question/phone-number-question.spec.js +++ b/src/digital-components/phone-number-question/phone-number-question.spec.js @@ -58,7 +58,7 @@ describe("phone-number-question.vue", () => { // Assert expect(wrapper.vm.validationRulesForTextBoxQuestion).toEqual( - "outsideValidation|phone-number-format", + "outsideValidation|phone-number-format" ); }); }); diff --git a/src/digital-components/phone-number-question/phone-number-question.vue b/src/digital-components/phone-number-question/phone-number-question.vue index 8c8c61d50..86dfc3f04 100644 --- a/src/digital-components/phone-number-question/phone-number-question.vue +++ b/src/digital-components/phone-number-question/phone-number-question.vue @@ -23,7 +23,7 @@ import { defineRule } from "vee-validate"; // Validation defineRule( "phone-number-format", - regex(/^(?=(?:.*\d){10})(?=(?:.*-){2})[\d-]{12}$/, errorMessages.PHONE_FORMAT), + regex(/^(?=(?:.*\d){10})(?=(?:.*-){2})[\d-]{12}$/, errorMessages.PHONE_FORMAT) ); export default { diff --git a/src/digital-components/question-chain/question-chain.spec.js b/src/digital-components/question-chain/question-chain.spec.js index 2048cb813..d516afc03 100644 --- a/src/digital-components/question-chain/question-chain.spec.js +++ b/src/digital-components/question-chain/question-chain.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("Question Chain component", () => { diff --git a/src/digital-components/textbox-question/textbox-question.spec.js b/src/digital-components/textbox-question/textbox-question.spec.js index 3ca0901ec..be33230c2 100644 --- a/src/digital-components/textbox-question/textbox-question.spec.js +++ b/src/digital-components/textbox-question/textbox-question.spec.js @@ -200,7 +200,7 @@ describe("textboxQuestion.vue", () => { resolve({ data: [responseValue], }); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { @@ -248,7 +248,7 @@ describe("textboxQuestion.vue", () => { resolve({ data: [responseValue], }); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { @@ -292,7 +292,7 @@ describe("textboxQuestion.vue", () => { () => new Promise((resolve, reject) => { reject({}); - }), + }) ); const wrapper = shallowMount(textboxQuestion, { diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index fe89e8ae3..15fb89a8b 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -160,7 +160,7 @@ export default { const { errorMessage, handleBlur, handleChange, meta, validate, errors } = useField( inputId, props.validationRules, - fieldOptions, + fieldOptions ); return { diff --git a/src/fmg-components/address-questions/address-questions.spec.js b/src/fmg-components/address-questions/address-questions.spec.js index 6f2e5b0b8..5267bb89c 100644 --- a/src/fmg-components/address-questions/address-questions.spec.js +++ b/src/fmg-components/address-questions/address-questions.spec.js @@ -283,7 +283,7 @@ describe("address-questions.vue", () => { // Act autocompleteElement.dispatchEvent( - new CustomEvent("place_changed", { detail: selectedPlace }), + new CustomEvent("place_changed", { detail: selectedPlace }) ); // Assert diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 95f77d5d5..7acd0f4f0 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -221,7 +221,7 @@ export default { // Load the Google Places Autocomplete script const apiKey = applicationConfig.GOOGLE_PLACES_API_KEY; this.$loadScript( - `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=Function.prototype`, + `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places&callback=Function.prototype` ).then(() => { // When loaded, trigger the setup this.initializeAutocomplete(); @@ -240,7 +240,7 @@ export default { this.autocompleteListener = window.google.maps.event.addListener( this.autocomplete, "place_changed", - this.fillInAddress, + this.fillInAddress ); // When the Street Address textbox receives input for the first time, @@ -258,7 +258,7 @@ export default { streetAddressField.appendChild(autocompleteResultsContainer); } }, - { once: true }, + { once: true } ); this.addressField1.addEventListener("keydown", (e) => { @@ -274,7 +274,7 @@ export default { }); const addressFields = document.querySelectorAll( - ".address-questions input, .address-questions select", + ".address-questions input, .address-questions select" ); for (let addressField of addressFields) { @@ -303,7 +303,7 @@ export default { }, findAddressComponentByType(place, componentName, componentLength) { const component = place.address_components.find((component) => - component.types.find((type) => type == componentName), + component.types.find((type) => type == componentName) ); if (component) { return component[componentLength] ?? ""; @@ -332,7 +332,7 @@ export default { const streetNumber = this.findAddressComponentByType( place, "street_number", - "long_name", + "long_name" ); const route = this.findAddressComponentByType(place, "route", "short_name"); const city = this.findAddressComponentByType(place, "locality", "long_name"); @@ -345,7 +345,7 @@ export default { state = this.findAddressComponentByType( place, "administrative_area_level_1", - "short_name", + "short_name" ); } @@ -354,7 +354,7 @@ export default { zipCode = this.findAddressComponentByType( place, "postal_code", - "long_name", + "long_name" ); } @@ -399,7 +399,7 @@ export default { self.displayVerificationWarning = true; self.fillInAddress(results[0]); } - }, + } ); } else { this.matchFound = false; @@ -475,7 +475,7 @@ export default { this.matchFound = null; this.$nextTick(); }, - { deep: true, flush: "post" }, + { deep: true, flush: "post" } ); } }, diff --git a/src/fmg-components/cart/cart.spec.js b/src/fmg-components/cart/cart.spec.js index 3f30746ef..10207c8bb 100644 --- a/src/fmg-components/cart/cart.spec.js +++ b/src/fmg-components/cart/cart.spec.js @@ -61,7 +61,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.frontWipersCartItem, + (cartItem) => cartItem == wrapper.vm.frontWipersCartItem ) >= 0; expect(found).toBe(true); }); @@ -113,7 +113,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.rearWipersCartItem, + (cartItem) => cartItem == wrapper.vm.rearWipersCartItem ) >= 0; expect(found).toBe(true); }); @@ -156,7 +156,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.rainDefenseCartItem, + (cartItem) => cartItem == wrapper.vm.rainDefenseCartItem ) >= 0; expect(found).toBe(true); }); @@ -258,7 +258,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.recycleFeeCartItem, + (cartItem) => cartItem == wrapper.vm.recycleFeeCartItem ) >= 0; expect(found).toBe(true); }); @@ -301,7 +301,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem, + (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem ) >= 0; expect(found).toBe(true); }); @@ -344,7 +344,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.servicePackageDiscountCartItem, + (cartItem) => cartItem == wrapper.vm.servicePackageDiscountCartItem ) >= 0; expect(found).toBe(true); }); @@ -389,7 +389,7 @@ describe("cart.vue", () => { const found = wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.otherSupportingItemsCartItem, + (cartItem) => cartItem == wrapper.vm.otherSupportingItemsCartItem ) >= 0; expect(found).toBe(true); }); diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index bfc0d346b..a1ef90c50 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -25,7 +25,7 @@ {{ getLineItemAmount( deductibleLineItem.subTotal, - showCoverageAsPending, + showCoverageAsPending ) }} @@ -238,7 +238,7 @@ export default { this.glassToReplace, this.availableLineItems, this.isRepair, - packageName, + packageName ); let vapsCartItemsForSelectedPackage = []; @@ -280,7 +280,7 @@ export default { removeItem(cartItemType, category) { this.lineItems[category] = this.lineItems[category].filter( - (lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType, + (lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType ); }, getPromoCodeList() { @@ -401,7 +401,7 @@ export default { servicePackageTitleWidget() { const servicePackageNames = this.getCmsContent( this.servicePackageOptionsCmsName, - "Answers", + "Answers" ); if (!servicePackageNames) { @@ -409,7 +409,7 @@ export default { } const currentPackage = servicePackageNames.find( - (entry) => entry.Name === this.packageLevel, + (entry) => entry.Name === this.packageLevel ); return currentPackage.SubWidgetName; @@ -419,7 +419,7 @@ export default { this.glassToReplace, this.availableLineItems, this.isRepair, - this.vaps, + this.vaps ); return tier; @@ -429,7 +429,7 @@ export default { if (!this.showCoverageAsVerified && !this.showCoverageAsPending) { packagePrice = baseMixin.methods.getTierOnePackagePrice( - baseMixin.methods.filterOutFees(this.availableLineItems), + baseMixin.methods.filterOutFees(this.availableLineItems) ); } @@ -518,7 +518,7 @@ export default { let cartItem = null; const frontWiperLineItems = this.vaps.filter( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.FRONT_WIPER, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.FRONT_WIPER ); if (frontWiperLineItems.length > 0) { @@ -532,7 +532,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.FRONT_WIPERS, + cartItemTypes.FRONT_WIPERS ), }; @@ -558,7 +558,7 @@ export default { let cartItem = null; const rearWiperLineItems = this.vaps.filter( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.REAR_WIPER, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.REAR_WIPER ); if (rearWiperLineItems.length > 0) { @@ -572,7 +572,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.REAR_WIPERS, + cartItemTypes.REAR_WIPERS ), }; @@ -598,7 +598,7 @@ export default { let cartItem = null; const rainDefenseLineItem = this.vaps.find( - (vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE, + (vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE ); if (rainDefenseLineItem) { @@ -612,7 +612,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.RAIN_DEFENSE, + cartItemTypes.RAIN_DEFENSE ), }; @@ -647,7 +647,7 @@ export default { salesTax: lineItem.salesTax ?? 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.GLASS_PARTS, + cartItemTypes.GLASS_PARTS ), }; @@ -678,7 +678,7 @@ export default { let cartItem = null; let recycleFeeLineItem = this.supportingItems.find( - (supportingItem) => supportingItem.partType == partTypeStrings.REPLACE_FEE, + (supportingItem) => supportingItem.partType == partTypeStrings.REPLACE_FEE ); if (!recycleFeeLineItem && this.requiresRecycleFeeCartItem) { @@ -703,7 +703,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.REPLACE_FEE, + cartItemTypes.REPLACE_FEE ), }; @@ -729,7 +729,7 @@ export default { const suppliesRepairLineItem = this.supportingItems.find( (supportingItem) => supportingItem.partType == partTypeStrings.REPAIR_FEE && - supportingItem.partNumber != "WSREPAIR", + supportingItem.partNumber != "WSREPAIR" ); if (suppliesRepairLineItem) { @@ -743,7 +743,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.SUPPLIES_REPAIR, + cartItemTypes.SUPPLIES_REPAIR ), }; @@ -766,7 +766,7 @@ export default { mobileFeeCartItem() { let cartItem = null; const mobileFeeLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.MOBILE_FEE, + (lineItem) => lineItem.partType == partTypeStrings.MOBILE_FEE ); if (mobileFeeLineItem) { @@ -780,7 +780,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.MOBILE_FEE, + cartItemTypes.MOBILE_FEE ), }; mobileFeeLineItem.cartItemType = cartItem.cartItemType; @@ -800,7 +800,7 @@ export default { let cartItem = null; const servicePackageDiscountLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.SERVICE_PACKAGE_DISCOUNT, + (lineItem) => lineItem.partType == partTypeStrings.SERVICE_PACKAGE_DISCOUNT ); if (servicePackageDiscountLineItem) { @@ -808,7 +808,7 @@ export default { name: this.servicePackageDiscountCartItemName + Math.abs( - baseMixin.methods.getTotalLineItemPrice(servicePackageDiscountLineItem), + baseMixin.methods.getTotalLineItemPrice(servicePackageDiscountLineItem) ), category: cartItemCategories.SERVICE_PACKAGE_DISCOUNT, cartItemType: cartItemTypes.SERVICE_PACKAGE_DISCOUNT, @@ -854,7 +854,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.SUPPORTING_ITEMS, + cartItemTypes.SUPPORTING_ITEMS ), }; @@ -880,7 +880,7 @@ export default { let cartItem = null; const premiumAppointmentDiscountLineItem = this.supportingItems.find( - (lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD, + (lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD ); if (premiumAppointmentDiscountLineItem) { @@ -894,7 +894,7 @@ export default { salesTax: 0, lineItems: [], isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.EARLY_BIRD, + cartItemTypes.EARLY_BIRD ), }; @@ -919,16 +919,14 @@ export default { // get unique promo codes const uniquePromoCodes = [ ...new Set( - this.promos.map((promo) => - getPromoCodeWithoutBundleIdentifier(promo.promoCode), - ), + this.promos.map((promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode)) ), ]; uniquePromoCodes.forEach((promoCode) => { // get the codes with the prefix from the promo array const promoLineItems = this.promos.filter( - (promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode) == promoCode, + (promo) => getPromoCodeWithoutBundleIdentifier(promo.promoCode) == promoCode ); // Create a cart item for each promo diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue index c2bf64e08..8de05c3c1 100644 --- a/src/fmg-components/funnel-header/funnel-header.vue +++ b/src/fmg-components/funnel-header/funnel-header.vue @@ -65,7 +65,7 @@ export default { // Check if alert event is on the bus const alertEvent = eventBus.readAndPopEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, + globalEvents.SubCategories.PAGE_NOT_FOUND ); // If alert event is on the bus, then display the alert if (alertEvent !== undefined) { @@ -76,7 +76,7 @@ export default { //Uknown alerts most likely were added by a failed api call in global-methods const unknownAlertEvent = eventBus.readAndPopEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.UNKNOWN_ERROR, + globalEvents.SubCategories.UNKNOWN_ERROR ); if (unknownAlertEvent !== undefined) { diff --git a/src/fmg-components/loading-modal/loading-modal.spec.js b/src/fmg-components/loading-modal/loading-modal.spec.js index 1fd76d731..36a6d6e33 100644 --- a/src/fmg-components/loading-modal/loading-modal.spec.js +++ b/src/fmg-components/loading-modal/loading-modal.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); jest.mock("@/assets/img/loader.gif", () => "loader.gif"); diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.spec.js b/src/fmg-components/promo-modal-question/promo-modal-question.spec.js index ad3719629..435a53277 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.spec.js +++ b/src/fmg-components/promo-modal-question/promo-modal-question.spec.js @@ -17,7 +17,7 @@ jest.mock("@/mixins/base-mixin", () => ({ dispatchStoreActionWithLogging: jest.fn( (action, { promoCode, addableVaps }, pageNameToLog, someBool) => { return mockReturnsForStoreActions[action]; - }, + } ), }, })); @@ -171,7 +171,7 @@ describe("promo-modal-question.vue", () => { addableVaps, }, pageNameToLog, - false, + false ); // Assert @@ -221,7 +221,7 @@ describe("promo-modal-question.vue", () => { "payment-method", - false, + false ); // Assert @@ -284,7 +284,7 @@ describe("promo-modal-question.vue", () => { cartItemCategories.PROMOS ].filter( (lineItemsToKeep) => - getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo, + getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo )); //Assert diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 4cb5504e5..cf5e52f21 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -156,7 +156,7 @@ export default { }, getPromoCodeList() { const promosToDisplay = getPromoCodesFromPromoObjectsWithoutDuplicates( - this.lineItems.promos, + this.lineItems.promos ); return promosToDisplay; }, @@ -198,7 +198,7 @@ export default { lineItems, addableVaps, useDefaultCashParentAccount, - pageNameToLog = null, + pageNameToLog = null ) { const pageName = pageNameToLog ?? this.$options?.name; const promoValidationResponse = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -210,7 +210,7 @@ export default { useDefaultCashParentAccount: useDefaultCashParentAccount, }, pageName, - false, + false ); return { @@ -225,7 +225,7 @@ export default { cartItemCategories.PROMOS ].filter( (lineItemsToKeep) => - getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo, + getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo ); }, getErrorMessage(error, additionalInfo) { @@ -240,27 +240,27 @@ export default { (match, group) => group === "NEW" ? this.promoCode.toUpperCase() - : this.getConflictingPromoCode(additionalInfo), + : this.getConflictingPromoCode(additionalInfo) )), (this.displayStackingPromoAlert = true)); case promoErrorCodes.INVALID_PROMO_ON_ORDER: if (additionalInfo.some((x) => x.toUpperCase() === "APPOINTMENT_TYPE")) { this.errorMessage = this.InShopPromoText?.replaceAll( "{custom:INSHOPPROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInShopPromoAlert = true); } else { this.errorMessage = this.PromoText?.replaceAll( "{custom:PROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInvalidPromoAlert = true); } default: this.errorMessage = this.PromoText?.replaceAll( "{custom:PROMOCODE}", - this.promoCode.toUpperCase(), + this.promoCode.toUpperCase() ); return (this.displayInvalidPromoAlert = true); } @@ -274,7 +274,7 @@ export default { this.lineItems, this.addableVaps, this.useDefaultCashParentAccount, - this.pageName, + this.pageName ); if (promoCodeData.isValid) { if (this.taxPromos) { @@ -297,24 +297,24 @@ export default { pricedLineItems: pricedLineItemsToTax, }, "payment-method", - false, + false ); // Match all line items to the line items as they are in the store // and rebuild the original structure. this.lineItems = mapTaxedLineItemsToStoreFormat( taxedLineItems, - this.lineItems, + this.lineItems ); const taxedVaps = mapTaxedLineItemsToStoreFormat( taxedLineItems, - this.addableVaps, + this.addableVaps ); const getVaps = getVapsThatNeedToBeAddedToSatisfyPromos( promoCodeData.promoCode, taxedVaps, - this.lineItems, + this.lineItems ); this.lineItems.vaps?.push(...getVaps); diff --git a/src/fmg-components/vehicle-banner/vehicle-banner.spec.js b/src/fmg-components/vehicle-banner/vehicle-banner.spec.js index b2688c41c..1a9222299 100644 --- a/src/fmg-components/vehicle-banner/vehicle-banner.spec.js +++ b/src/fmg-components/vehicle-banner/vehicle-banner.spec.js @@ -9,7 +9,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("vehicleBanner", () => { @@ -84,7 +84,7 @@ describe("vehicleBanner", () => { expect(store.getters.vehicle.category).toEqual(category); expect(wrapper.find("img").attributes("class")).toContain("vehicle-image"); wrapper.unmount(); - }, + } ); }); diff --git a/src/global-methods.js b/src/global-methods.js index e56f1ffbf..9426acede 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -43,7 +43,7 @@ axios.interceptors.response.use( } return Promise.reject(rejectionError); - }, + } ); export default { @@ -82,7 +82,7 @@ export default { GaCategories.API_RESPONSE, `${pageNameToLog}_${endpointWithoutParams}`, `${GaLabels.SUCCESS}${additionalEventData}`, - true, + true ); } @@ -94,7 +94,7 @@ export default { GaCategories.API_RESPONSE, GaActions.RESULT, `${GaLabels.ERROR}_${endpoint}`, - true, + true ); } @@ -106,12 +106,12 @@ export default { // when a service doesn't return an object global.$logger.logError( `${method}: ${endpoint}: ${error.message}`, - error.response, + error.response ); } return reject(error.response); - }, + } ); }); }, @@ -138,7 +138,7 @@ export default { }, (error) => { return reject(error.response); - }, + } ); }); }, diff --git a/src/helpers/add-to-calendar-helper.js b/src/helpers/add-to-calendar-helper.js index 4c43cb8a8..93a5e7c18 100644 --- a/src/helpers/add-to-calendar-helper.js +++ b/src/helpers/add-to-calendar-helper.js @@ -47,7 +47,7 @@ export function getCalendarFile(calFile) { '

' + "" + ToCalendarFileString(calFile.Body) + - "", + "" ); } else { calEvent.push("DESCRIPTION:" + ToCalendarFileString(calFile.Body)); diff --git a/src/helpers/add-to-calendar-helper.spec.js b/src/helpers/add-to-calendar-helper.spec.js index b53ac896a..1cb40d499 100644 --- a/src/helpers/add-to-calendar-helper.spec.js +++ b/src/helpers/add-to-calendar-helper.spec.js @@ -33,7 +33,7 @@ test("download function", () => { expect(mockElement.setAttribute).toHaveBeenCalledTimes(2); expect(mockElement.setAttribute).toHaveBeenCalledWith( "href", - "data:text/plain;charset=utf-8," + encodeURIComponent("Hello world"), + "data:text/plain;charset=utf-8," + encodeURIComponent("Hello world") ); expect(mockElement.setAttribute).toHaveBeenCalledWith("download", "test.txt"); expect(mockElement.style.display).toBe("none"); diff --git a/src/helpers/cms-content-helper.js b/src/helpers/cms-content-helper.js index adc72deae..c1d28097a 100644 --- a/src/helpers/cms-content-helper.js +++ b/src/helpers/cms-content-helper.js @@ -83,7 +83,7 @@ function processWidgetItemForReplacement(widgetModel, key) { widgetModel[key] = processIfStatements( widgetModel[key], dynamicStrings.GLOBAL_STATE, - getStoreValueFromString, + getStoreValueFromString ); if (widgetModel[key].includes(dynamicStrings.GLOBAL_STATE)) { widgetModel[key] = mapStringToState(widgetModel[key]); @@ -129,7 +129,7 @@ function getStoreValueFromString(str) { */ export function processIfStatements(str, ifConditionKeyword, replacePlaceholderCallback) { const containsRelevantIfStatement = new RegExp("{if:" + ifConditionKeyword + ":.+?}", "g").test( - str, + str ); if (!containsRelevantIfStatement) { return str; @@ -138,17 +138,17 @@ export function processIfStatements(str, ifConditionKeyword, replacePlaceholderC const ifStatementRegexMatches = [...str.matchAll(ifStatementRegexExpression)]; const completeIfStatementArray = getAndFlagFirstNonNestedIfStatementWithKeyword( ifStatementRegexMatches, - ifConditionKeyword, + ifConditionKeyword ); executeIfStatementAndSetProcessedStrings( completeIfStatementArray, - replacePlaceholderCallback, + replacePlaceholderCallback ); const reconstructedPostProcessedString = joinProcessedRegexArray(ifStatementRegexMatches); return processIfStatements( reconstructedPostProcessedString, ifConditionKeyword, - replacePlaceholderCallback, + replacePlaceholderCallback ); } } @@ -275,7 +275,7 @@ function getIfStatementRegexExpression() { matchElseOperator + "|" + matchEndOperator, - "g", + "g" ); } diff --git a/src/helpers/damage-helper.js b/src/helpers/damage-helper.js index 4ac8c002a..13defa5df 100644 --- a/src/helpers/damage-helper.js +++ b/src/helpers/damage-helper.js @@ -49,7 +49,7 @@ export function getIsWindshieldOnly() { export function includesWindshieldReplacement() { const windshieldMatches = store.getters.order.damage.glassToReplace?.filter( - (glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD, + (glassToReplace) => glassToReplace.glassLocation === glassLocations.WINDSHIELD ) ?? []; return windshieldMatches.length > 0; } @@ -58,7 +58,7 @@ export async function isGlassAvailableForCarId(carId, pageNameToLog) { const newGlassOptions = await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_DAMAGE_OPTIONS, { carId: carId }, - pageNameToLog, + pageNameToLog ); const currentGlassOptions = store.getters.damage.glassToReplace; diff --git a/src/helpers/event-bus/event-bus.spec.js b/src/helpers/event-bus/event-bus.spec.js index a92bc78a6..e21212adc 100644 --- a/src/helpers/event-bus/event-bus.spec.js +++ b/src/helpers/event-bus/event-bus.spec.js @@ -15,15 +15,15 @@ describe("event-bus.js", () => { eventBus.addEventToBus( globalEvents.Categories.GLOBAL_ALERT, globalEvents.SubCategories.PAGE_NOT_FOUND, - event, + event ); // Assert expect( store.getters.eventBusItem( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, - ), + globalEvents.SubCategories.PAGE_NOT_FOUND + ) ).toEqual(event); expect(store.state.applicationUser.eventBus.length).toEqual(1); @@ -31,7 +31,7 @@ describe("event-bus.js", () => { // Arrange / Act const eventValue = eventBus.readAndPopEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, + globalEvents.SubCategories.PAGE_NOT_FOUND ); // Assert @@ -45,15 +45,15 @@ describe("event-bus.js", () => { eventBus.addEventToBus( globalEvents.Categories.GLOBAL_ALERT, globalEvents.SubCategories.PAGE_NOT_FOUND, - event, + event ); // Assert expect( eventBus.readEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, - ), + globalEvents.SubCategories.PAGE_NOT_FOUND + ) ).toEqual(event); }); }); diff --git a/src/helpers/heritage-integration/cookie-helper.js b/src/helpers/heritage-integration/cookie-helper.js index 75fb5216a..1b7b551ca 100644 --- a/src/helpers/heritage-integration/cookie-helper.js +++ b/src/helpers/heritage-integration/cookie-helper.js @@ -84,7 +84,7 @@ export function regenerateDeviceId() { { [cookieNames.DXDEV]: `did=${crypto.randomUUID()}`, }, - { maxAge: cookieExpirations.DXDEV }, + { maxAge: cookieExpirations.DXDEV } ); } } @@ -105,7 +105,7 @@ export function regenerateUserId() { { [cookieNames.FUNNEL_USER_ID]: crypto.randomUUID(), }, - { maxAge: cookieExpirations.FUNNEL_USER_ID }, + { maxAge: cookieExpirations.FUNNEL_USER_ID } ); } } @@ -129,7 +129,7 @@ export function setSessionKeyIfUnset(value) { { [cookieNames.FUNNEL_SESSION_KEY]: value, }, - { maxAge: cookieExpirations.FUNNEL_SESSION_KEY }, + { maxAge: cookieExpirations.FUNNEL_SESSION_KEY } ); } } @@ -153,7 +153,7 @@ export function setSessionIdIfUnset(value) { { [cookieNames.SESSION_ID]: value, }, - { maxAge: cookieExpirations.SESSION_ID }, + { maxAge: cookieExpirations.SESSION_ID } ); } } @@ -169,7 +169,7 @@ export function updateSessionIdCookie() { export function setCookieProperties( properties, - { useDefaultFunnelCookieAttributes = true, maxAge, isSecure }, + { useDefaultFunnelCookieAttributes = true, maxAge, isSecure } ) { if (typeof properties == "object") { Object.keys(properties).forEach((key) => { @@ -253,7 +253,7 @@ function setFunnelCookieProperties(properties) { function createOrUpdateCookie( key, value = "", - { useDefaultFunnelCookieAttributes = true, maxAge, isSecure = true }, + { useDefaultFunnelCookieAttributes = true, maxAge, isSecure = true } ) { let cookieToAdd = `${key}=${value}; `; diff --git a/src/helpers/heritage-integration/cookie-helper.spec.js b/src/helpers/heritage-integration/cookie-helper.spec.js index 779e44f29..a18906381 100644 --- a/src/helpers/heritage-integration/cookie-helper.spec.js +++ b/src/helpers/heritage-integration/cookie-helper.spec.js @@ -185,7 +185,7 @@ describe("cookies", () => { [cookieNames.DXDEV]: "did=f4a1a9e8-b3f3-4936-8c30-2f06a98644af&tz=-300&tzd=1", }, - {}, + {} ); //Act @@ -403,7 +403,7 @@ describe("cookies", () => { { [cookieNames.SESSION_ID]: "test", }, - { maxAge: 0 }, + { maxAge: 0 } ); const result = isCookieSet(cookieNames.SESSION_ID); diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index a82cb19de..30ae38058 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -69,7 +69,7 @@ export async function getImplicitNavigation(toRoute) { const vehiclePartsComponent = await getLazyLoadedComponent(fmgPageValues.VEHICLE_PARTS); const moldingQuestionsComponent = await getLazyLoadedComponent(fmgPageValues.MOLDING_QUESTIONS); const capabilityQuestionsComponent = await getLazyLoadedComponent( - fmgPageValues.CAPABILITY_QUESTIONS, + fmgPageValues.CAPABILITY_QUESTIONS ); const quoteComponent = await getLazyLoadedComponent(fmgPageValues.QUOTE); diff --git a/src/helpers/heritage-integration/navigation-helper.spec.js b/src/helpers/heritage-integration/navigation-helper.spec.js index c863c65ac..2af724828 100644 --- a/src/helpers/heritage-integration/navigation-helper.spec.js +++ b/src/helpers/heritage-integration/navigation-helper.spec.js @@ -545,7 +545,7 @@ describe("navigateToHeritageFunnel", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { @@ -590,7 +590,7 @@ describe("navigateToHeritageFunnel", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { @@ -617,7 +617,7 @@ describe("navigateToHeritageFunnel", () => { externalUrls.HERITAGE_FUNNEL, expect.objectContaining({ corid: mockCorrelationId, - }), + }) ); }); @@ -630,7 +630,7 @@ describe("navigateToHeritageFunnel", () => { const mockOrderInfo = getMockOrderInfo( mockReferralNumber, mockCorrelationId, - mockReferralDate, + mockReferralDate ); const mockData = { diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js index 8e95b33d4..07c469ae8 100644 --- a/src/helpers/heritage-integration/order-helper.js +++ b/src/helpers/heritage-integration/order-helper.js @@ -43,7 +43,7 @@ export async function loadSessionIfPresent(isConceptInsurance, pageNameToLog) { funnelCookie.ReferralParentAccountNumber, funnelCookie.ReferralCorrelationId, isConceptInsurance, - pageNameToLog, + pageNameToLog ) )?.data; } @@ -67,7 +67,7 @@ export async function saveSession({ return saveSessionHelper( pageNameToLog, submitAfterSave, - createDeleteStatusWorkOrderForPia, + createDeleteStatusWorkOrderForPia ); }); } else { @@ -75,7 +75,7 @@ export async function saveSession({ saveSessionPromise = saveSessionHelper( pageNameToLog, submitAfterSave, - createDeleteStatusWorkOrderForPia, + createDeleteStatusWorkOrderForPia ); } store.commit(storeMutations.UPDATE_SAVE_SESSION_PROMISE, saveSessionPromise); @@ -111,7 +111,7 @@ async function loadSession( parentAccountNumber, referralCorrelationId, isConceptInsurance, - pageNameToLog, + pageNameToLog ) { // await the saveSessionPromise in the store to make sure we're loading up to date information await store.getters.applicationUser.saveSessionPromise; @@ -127,7 +127,7 @@ async function loadSession( isConceptInsurance, }, pageNameToLog, - false, + false ); return response; @@ -139,7 +139,7 @@ async function loadSession( async function saveSessionHelper( pageNameToLog, submitAfterSave = false, - createDeleteStatusWorkOrderForPia = false, + createDeleteStatusWorkOrderForPia = false ) { const savedSessionInfo = await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.SAVE_SESSION, @@ -147,7 +147,7 @@ async function saveSessionHelper( submitAfterSave: submitAfterSave, createDeleteStatusWorkOrderForPia: createDeleteStatusWorkOrderForPia, }, - pageNameToLog, + pageNameToLog ); // Update the store with information received from the saveSession response await baseMixin.methods.dispatchStoreAction( @@ -168,7 +168,7 @@ async function saveSessionHelper( settledTenderAmount: savedSessionInfo.data.settledTenderAmount, billToAccountNumber: savedSessionInfo.data.billToAccountNumber, }, - false, + false ); // Update the cookie with the referral information when saved. diff --git a/src/helpers/heritage-integration/order-helper.spec.js b/src/helpers/heritage-integration/order-helper.spec.js index 1bb776710..daf9af6bb 100644 --- a/src/helpers/heritage-integration/order-helper.spec.js +++ b/src/helpers/heritage-integration/order-helper.spec.js @@ -32,7 +32,7 @@ describe("loadSessionIfPresent", () => { }; document.cookie = `${cookieNames.FUNNEL_SESSION_INFO}=${JSON.stringify( - testCookieValue, + testCookieValue )}; path=/; ${cookieHelper.getCookieDomainValue()}`; // Act @@ -70,7 +70,7 @@ describe("loadSessionIfPresent", () => { // Assert expect(cookieHelper.getFunnelCookie).toHaveBeenCalled(); expect(mocks.baseMixin.methods.dispatchStoreAction).toHaveBeenCalledWith( - storeActions.RESET_STATE, + storeActions.RESET_STATE ); }); @@ -96,7 +96,7 @@ describe("loadSessionIfPresent", () => { // Assert expect(cookieHelper.getFunnelCookie).toHaveBeenCalled(); expect(mocks.baseMixin.methods.dispatchStoreAction).not.toHaveBeenCalledWith( - storeActions.RESET_STATE, + storeActions.RESET_STATE ); }); @@ -129,7 +129,7 @@ describe("loadSessionIfPresent", () => { // Assert expect(cookieHelper.getFunnelCookie).toHaveBeenCalled(); expect(mocks.baseMixin.methods.dispatchStoreAction).not.toHaveBeenCalledWith( - storeActions.LOAD_SESSION, + storeActions.LOAD_SESSION ); expect(result.ReferralNumber).toBe(123456); expect(result.vehicle.year).toBe(2010); @@ -156,7 +156,7 @@ describe("saveSession", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { @@ -180,7 +180,7 @@ describe("saveSession", () => { expect(mocks.baseMixin.methods.dispatchStoreActionWithLogging).toHaveBeenCalledWith( storeActions.SAVE_SESSION, { createDeleteStatusWorkOrderForPia: false, submitAfterSave: false }, - "test", + "test" ); expect(mocks.baseMixin.methods.dispatchStoreAction).toHaveBeenCalledWith( storeActions.UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE, @@ -192,7 +192,7 @@ describe("saveSession", () => { savedSessionId: mockSavedSessionId, crmCustomerId: mockCrmCustomerId, }, - false, + false ); }); @@ -211,7 +211,7 @@ describe("saveSession", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { @@ -264,7 +264,7 @@ describe("submitWorkOrder", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { @@ -288,7 +288,7 @@ describe("submitWorkOrder", () => { expect(mocks.baseMixin.methods.dispatchStoreActionWithLogging).toHaveBeenCalledWith( storeActions.SAVE_SESSION, { createDeleteStatusWorkOrderForPia: false, submitAfterSave: true }, - "test", + "test" ); expect(mocks.baseMixin.methods.dispatchStoreAction).toHaveBeenCalledWith( storeActions.UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE, @@ -300,7 +300,7 @@ describe("submitWorkOrder", () => { savedSessionId: mockSavedSessionId, crmCustomerId: mockCrmCustomerId, }, - false, + false ); }); @@ -319,7 +319,7 @@ describe("submitWorkOrder", () => { mockReferralDate, mockParentAccountNumber, mockSavedSessionId, - mockCrmCustomerId, + mockCrmCustomerId ); const mockData = { diff --git a/src/helpers/layout-helper.js b/src/helpers/layout-helper.js index 75431adeb..a07da4ff6 100644 --- a/src/helpers/layout-helper.js +++ b/src/helpers/layout-helper.js @@ -22,6 +22,6 @@ export function settleAllPromises(promiseResultMap) { } return resultMap; - }, + } ); } diff --git a/src/helpers/logger.js b/src/helpers/logger.js index ca7083f11..53c2cb808 100644 --- a/src/helpers/logger.js +++ b/src/helpers/logger.js @@ -9,14 +9,14 @@ export class Logger { logInformation(message, details) { this.writeLogEntry( loggingEndpointMethods.LOG_INFORMATION, - this.formatLogEntry(message, details), + this.formatLogEntry(message, details) ); } logWarning(message, details) { this.writeLogEntry( loggingEndpointMethods.LOG_WARNING, - this.formatLogEntry(message, details), + this.formatLogEntry(message, details) ); } @@ -27,7 +27,7 @@ export class Logger { logCritical(message, details) { this.writeLogEntry( loggingEndpointMethods.LOG_CRITICAL, - this.formatLogEntry(message, details), + this.formatLogEntry(message, details) ); } @@ -82,7 +82,7 @@ export class Logger { }, (error) => { return reject(error); - }, + } ); }); } diff --git a/src/helpers/object-helper.js b/src/helpers/object-helper.js index 779a94c6d..b42230be1 100644 --- a/src/helpers/object-helper.js +++ b/src/helpers/object-helper.js @@ -15,7 +15,7 @@ export function deepClone(object) { let clone = Object.assign({}, object); Object.keys(clone).forEach( (key) => - (clone[key] = typeof object[key] === "object" ? deepClone(object[key]) : object[key]), + (clone[key] = typeof object[key] === "object" ? deepClone(object[key]) : object[key]) ); if (Array.isArray(object)) { diff --git a/src/helpers/promotions-helper.js b/src/helpers/promotions-helper.js index 7e372cf24..9155c2f61 100644 --- a/src/helpers/promotions-helper.js +++ b/src/helpers/promotions-helper.js @@ -63,7 +63,7 @@ export function getLineItemsThatMatchPromos(promos, availableLineItems) { } promo.discountedLineItemIds.forEach((discountedLineItemId) => { matchingLineItems.push( - ...availableLineItems.filter((lineItem) => lineItem.id === discountedLineItemId), + ...availableLineItems.filter((lineItem) => lineItem.id === discountedLineItemId) ); }); }); @@ -76,7 +76,7 @@ export function getAddableVapsFromAvailableLineItems(availableLineItems) { const addableVaps = []; addableVaps.push(...findLineItemsWithPartType(partTypeStrings.FRONT_WIPER, availableLineItems)); addableVaps.push( - ...findLineItemsWithPartType(partTypeStrings.RAIN_DEFENSE, availableLineItems), + ...findLineItemsWithPartType(partTypeStrings.RAIN_DEFENSE, availableLineItems) ); return addableVaps; } @@ -99,7 +99,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, pageNameToLog, - useDefaultCashParentAccount = false, + useDefaultCashParentAccount = false ) { const hasActivePromos = store.getters.order.lineItems.promos; const hasInactivePromos = store.getters.payment.inactivePromos; @@ -117,7 +117,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( storeActions.REVALIDATE_ORDER_PROMOS_AND_SAVE_SERVER_DATA, { useDefaultCashParentAccount }, pageNameToLog, - false, + false ); const revalidationErrorPromoCodes = revalidatePromoResponse.errors.map((x) => x.promoCode); @@ -127,7 +127,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( activePromos: revalidatePromoResponse.promoLineItems, inactivePromos: revalidationErrorPromoCodes, }, - false, + false ); } @@ -139,7 +139,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( addableVaps: addableVaps, }, pageNameToLog, - false, + false ); if (validatePromoResponse.errorCode == null) { @@ -151,7 +151,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( { activePromos: activePromos, }, - false, + false ); } else if (!excludeFromInactivePromoErrorCodes.includes(validatePromoResponse.errorCode)) { // Save any valid query string promoCode (not applied) to inactivePromos @@ -161,7 +161,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( return promoObject.promoCode.toUpperCase(); }) ?? []; const isErrorPromoAlreadyOnOrder = activePromoCodes.includes( - validatePromoResponse.promoCode.toUpperCase(), + validatePromoResponse.promoCode.toUpperCase() ); // Do not save an inactivePromo if it is already active on the order if (!isErrorPromoAlreadyOnOrder) { @@ -173,7 +173,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( { inactivePromos: inactivePromoCodes, }, - false, + false ); } } @@ -185,7 +185,7 @@ export async function revalidatePromosAndValidateQueryStringPromo( export function buildToastMessagesFromRevalidateOrValidatePromoResponse( promoResponse, oldActivePromos = [], - oldInactivePromos = [], + oldInactivePromos = [] ) { if (promoResponse == null) { return []; @@ -194,13 +194,13 @@ export function buildToastMessagesFromRevalidateOrValidatePromoResponse( // Revalidate always has an "errors" array if (promoResponse.errors) { const oldPromoCodes = oldActivePromos.map((promo) => - getPromoCodeWithoutBundleIdentifier(promo.promoCode), + getPromoCodeWithoutBundleIdentifier(promo.promoCode) ); const activePromoCodesFromResponse = getPromoCodesFromPromoObjectsWithoutDuplicates( - promoResponse.promoLineItems, + promoResponse.promoLineItems ); const newlyActivatedPromoCodes = activePromoCodesFromResponse.filter( - (newPromoCode) => !oldPromoCodes.includes(newPromoCode), + (newPromoCode) => !oldPromoCodes.includes(newPromoCode) ); newlyActivatedPromoCodes.forEach((newlyActivatedPromoCode) => { @@ -209,7 +209,7 @@ export function buildToastMessagesFromRevalidateOrValidatePromoResponse( const newlyInactivatedPromos = getNewlyInactivatedPromos( oldInactivePromos, - promoResponse.errors, + promoResponse.errors ); newlyInactivatedPromos.forEach((newlyInactivatedPromo) => { alerts.push(createPromoErrorAlert(newlyInactivatedPromo)); @@ -219,7 +219,7 @@ export function buildToastMessagesFromRevalidateOrValidatePromoResponse( else { if (promoResponse.orderPromos) { const promoCodeToDisplay = getPromoCodeWithoutBundleIdentifier( - promoResponse.orderPromos[0].promoCode, + promoResponse.orderPromos[0].promoCode ); alerts.push(createPromoSuccessAlert(promoCodeToDisplay)); } else { @@ -228,8 +228,8 @@ export function buildToastMessagesFromRevalidateOrValidatePromoResponse( createPromoErrorAlert( promoResponse.promoCode, promoResponse.errorCode, - promoResponse.additionalInfo, - ), + promoResponse.additionalInfo + ) ); } } @@ -279,19 +279,19 @@ export function getPromosThatMatchLineItemsOnOrder(promos, lineItemsOnOrder) { export function getVapsThatNeedToBeAddedToSatisfyPromos( promos, availableLineItems, - lineItemsOnOrder, + lineItemsOnOrder ) { const clonedVaps = deepClone(lineItemsOnOrder?.vaps ?? []); const promosWithAddableVaps = getPromosWithAddableVaps(promos); if (promosWithAddableVaps.length) { const matchingLineItems = getLineItemsThatMatchPromos( promosWithAddableVaps, - availableLineItems, + availableLineItems ); // Check if matching items are already in the order const idsOfVapsAlreadyInOrder = clonedVaps.map((lineItem) => lineItem.id); const vapsToAddToCart = matchingLineItems.filter( - (lineItem) => !idsOfVapsAlreadyInOrder.includes(lineItem.id), + (lineItem) => !idsOfVapsAlreadyInOrder.includes(lineItem.id) ); return vapsToAddToCart; } else { @@ -301,12 +301,12 @@ export function getVapsThatNeedToBeAddedToSatisfyPromos( export function removeCurrentlyActivePromoCodesFromInactivePromos( activePromoObjects, - inactivePromos, + inactivePromos ) { activePromoObjects = activePromoObjects ?? []; inactivePromos = inactivePromos ?? []; const activePromoCodes = activePromoObjects.map((promoObject) => - getPromoCodeWithoutBundleIdentifier(promoObject.promoCode).toUpperCase(), + getPromoCodeWithoutBundleIdentifier(promoObject.promoCode).toUpperCase() ); return inactivePromos.filter((inactivePromo) => { return !activePromoCodes.includes(inactivePromo.toUpperCase()); @@ -326,7 +326,7 @@ export function getNewlyInactivatedPromos(oldInactivePromos, newInactivePromos) const inactivePromoCodesFromResponse = getPromoCodesFromPromoObjectsWithoutDuplicates(newInactivePromos); return inactivePromoCodesFromResponse.filter( - (errorPromoCode) => !oldInactivePromos?.includes(errorPromoCode), + (errorPromoCode) => !oldInactivePromos?.includes(errorPromoCode) ); } @@ -334,7 +334,7 @@ export function createPromoSuccessAlert(promoCode) { return { messageHeadline: "Promo code applied!", messageCopy: `Promo code ${getPromoCodeWithoutBundleIdentifier( - promoCode.toUpperCase(), + promoCode.toUpperCase() )} was successfully applied to your cart.`, type: "alert-success", isDismissible: true, @@ -351,11 +351,11 @@ export function createPromoErrorAlert(promoCode, errorCode = null, additionalInf }; if (stackingPromoErrorCodes.includes(errorCode)) { alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier( - promoCode.toUpperCase(), + promoCode.toUpperCase() )} cannot be combined with ${additionalInfo[0].toUpperCase()}`; } else { alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier( - promoCode.toUpperCase(), + promoCode.toUpperCase() )} is not valid`; } return alert; @@ -382,7 +382,7 @@ export function getPromoCodesFromPromoObjectsWithoutDuplicates(promos) { function findLineItemsWithPartType(typeToFind, itemsToSearch) { const partTypeMatches = itemsToSearch?.filter( - (lineItem) => lineItem.partType.toUpperCase() === typeToFind.toUpperCase(), + (lineItem) => lineItem.partType.toUpperCase() === typeToFind.toUpperCase() ) ?? []; return partTypeMatches; } diff --git a/src/helpers/promotions-helper.spec.js b/src/helpers/promotions-helper.spec.js index 169f6dfe8..3e8a1d9aa 100644 --- a/src/helpers/promotions-helper.spec.js +++ b/src/helpers/promotions-helper.spec.js @@ -13,7 +13,7 @@ jest.mock("@/mixins/base-mixin", () => ({ dispatchStoreActionWithLogging: jest.fn( (action, { promoCode, addableVaps }, pageNameToLog, someBool) => { return mockReturnsForStoreActions[action]; - }, + } ), }, })); @@ -76,7 +76,7 @@ describe("promotions-helper.js", () => { // Assert expect(promoListWithAddableVapsPromoReturn[0].promoIdentifier).toEqual( - promoIdentifier, + promoIdentifier ); }); }); @@ -101,29 +101,29 @@ describe("promotions-helper.js", () => { // Null or Empty scenarios const nullPromosReturn = promotionsHelper.getLineItemsThatMatchPromos( nullPromos, - validAvailableLineItemsWithOneItem, + validAvailableLineItemsWithOneItem ); const emptyPromosReturn = promotionsHelper.getLineItemsThatMatchPromos( emptyPromos, - validAvailableLineItemsWithOneItem, + validAvailableLineItemsWithOneItem ); const nullDiscountedLineItemsReturn = promotionsHelper.getLineItemsThatMatchPromos( promosWithNullDiscountedLineItemIds, - validAvailableLineItemsWithOneItem, + validAvailableLineItemsWithOneItem ); const emptyDiscountedLineItemsReturn = promotionsHelper.getLineItemsThatMatchPromos( promosWithEmptyDiscountedLineItemIds, - validAvailableLineItemsWithOneItem, + validAvailableLineItemsWithOneItem ); // Null or Empty scenarios const nullAvailableLineItemsReturn = promotionsHelper.getLineItemsThatMatchPromos( validPromosWithOnePromo, - nullAvailableLineItems, + nullAvailableLineItems ); const emptyAvailableLineItemsReturn = promotionsHelper.getLineItemsThatMatchPromos( validPromosWithOnePromo, - emptyAvailableLineItems, + emptyAvailableLineItems ); // Assert @@ -168,7 +168,7 @@ describe("promotions-helper.js", () => { }, ]; expect( - promotionsHelper.getLineItemsThatMatchPromos(promos, availableLineItems), + promotionsHelper.getLineItemsThatMatchPromos(promos, availableLineItems) ).toEqual(expected); }); }); @@ -202,15 +202,15 @@ describe("promotions-helper.js", () => { // Act const addableVapsFromAvailableLineItems = promotionsHelper.getAddableVapsFromAvailableLineItems( - availableLineItemsWithFrontWipersAndRainDefense, + availableLineItemsWithFrontWipersAndRainDefense ); // Assert const frontWiperParts = addableVapsFromAvailableLineItems.filter( - (lineItem) => lineItem.partType == partTypeStrings.FRONT_WIPER, + (lineItem) => lineItem.partType == partTypeStrings.FRONT_WIPER ); const rainDefenseParts = addableVapsFromAvailableLineItems.filter( - (lineItem) => lineItem.partType == partTypeStrings.RAIN_DEFENSE, + (lineItem) => lineItem.partType == partTypeStrings.RAIN_DEFENSE ); expect(addableVapsFromAvailableLineItems.length).toEqual(2); expect(frontWiperParts.length).toEqual(1); @@ -264,7 +264,7 @@ describe("promotions-helper.js", () => { const glassPromoArray = promosWithoutVapsPromos.filter( (promo) => promo.partNumber == - promotionsHelper.promoPartNumberStrings.GLASS_DISCOUNT_PART_NUMBER, + promotionsHelper.promoPartNumberStrings.GLASS_DISCOUNT_PART_NUMBER ); expect(promosWithoutVapsPromos.length).toEqual(1); expect(glassPromoArray.length).toEqual(1); @@ -284,7 +284,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -304,7 +304,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -328,7 +328,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -352,7 +352,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -373,7 +373,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -400,7 +400,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert @@ -417,11 +417,11 @@ describe("promotions-helper.js", () => { // Act const nullPromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - nullPromoResponse, + nullPromoResponse ); const unexpectedPromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - unexpectedPromoResponse, + unexpectedPromoResponse ); // Assert @@ -437,11 +437,11 @@ describe("promotions-helper.js", () => { // Act const successPromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - successPromoResponse, + successPromoResponse ); const errorPromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - errorPromoResponse, + errorPromoResponse ); // Assert @@ -461,7 +461,7 @@ describe("promotions-helper.js", () => { // Act const bundlePromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - bundlePromoResponse, + bundlePromoResponse ); // Assert @@ -481,18 +481,18 @@ describe("promotions-helper.js", () => { // Act const successAndErrorPromoResponseReturn = promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( - successAndErrorPromoResponse, + successAndErrorPromoResponse ); // Assert // This depends on "createPromoSuccessAlert" implementation, which is bad practice // but jest has trouble mocking same file dependencies const successAlert = successAndErrorPromoResponseReturn.filter((alert) => - alert.messageCopy.toLowerCase().includes("successpromo"), + alert.messageCopy.toLowerCase().includes("successpromo") ); expect(successAlert[0]).toHaveProperty("type", "alert-success"); const errorAlert = successAndErrorPromoResponseReturn.filter((alert) => - alert.messageCopy.toLowerCase().includes("errorpromo"), + alert.messageCopy.toLowerCase().includes("errorpromo") ); expect(errorAlert[0]).toHaveProperty("type", "alert-danger"); }); @@ -515,18 +515,18 @@ describe("promotions-helper.js", () => { promotionsHelper.buildToastMessagesFromRevalidateOrValidatePromoResponse( successAndErrorPromoResponse, oldActivePromos, - oldInactivePromos, + oldInactivePromos ); // Assert // This depends on "createPromoSuccessAlert" implementation, which is bad practice // but jest has trouble mocking same file dependencies const successAlert = successAndErrorPromoResponseReturn.filter((alert) => - alert.messageCopy.toLowerCase().includes("successpromo"), + alert.messageCopy.toLowerCase().includes("successpromo") ); expect(successAlert[0]).toHaveProperty("type", "alert-success"); const errorAlert = successAndErrorPromoResponseReturn.filter((alert) => - alert.messageCopy.toLowerCase().includes("errorpromo"), + alert.messageCopy.toLowerCase().includes("errorpromo") ); expect(errorAlert[0]).toHaveProperty("type", "alert-danger"); }); @@ -547,33 +547,33 @@ describe("promotions-helper.js", () => { // Bad promos const nullPromosReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( nullPromos, - validLineItemsOnOrder, + validLineItemsOnOrder ); const emptyPromosReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( emptyPromos, - validLineItemsOnOrder, + validLineItemsOnOrder ); // Bad lineItemsOnOrder const nullLineItemsOnOrderReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( validPromos, - nullLineItemsOnOrder, + nullLineItemsOnOrder ); const emptyLineItemsOnOrderReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( validPromos, - emptyLineItemsOnOrder, + emptyLineItemsOnOrder ); // Bad both const nullBothReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( nullPromos, - nullLineItemsOnOrder, + nullLineItemsOnOrder ); const emptyBothReturn = promotionsHelper.getPromosThatMatchLineItemsOnOrder( emptyPromos, - emptyLineItemsOnOrder, + emptyLineItemsOnOrder ); // Assert @@ -599,7 +599,7 @@ describe("promotions-helper.js", () => { // Act const returnedItems = promotionsHelper.getPromosThatMatchLineItemsOnOrder( promos, - lineItemsOnOrder, + lineItemsOnOrder ); // Assert @@ -632,7 +632,7 @@ describe("promotions-helper.js", () => { // Act const returnedItems = promotionsHelper.getPromosThatMatchLineItemsOnOrder( promos, - lineItemsOnOrder, + lineItemsOnOrder ); // Assert @@ -665,12 +665,12 @@ describe("promotions-helper.js", () => { const nullPromosReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( nullPromos, validAvailableLineItems, - validLineItemsOnOrder, + validLineItemsOnOrder ); const emptyPromosReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( emptyPromos, validAvailableLineItems, - validLineItemsOnOrder, + validLineItemsOnOrder ); // Bad availableLineItems @@ -678,25 +678,25 @@ describe("promotions-helper.js", () => { promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( validPromos, nullAvailableLineItems, - validLineItemsOnOrder, + validLineItemsOnOrder ); const emptyAvailableLineItemsReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( validPromos, emptyAvailableLineItems, - validLineItemsOnOrder, + validLineItemsOnOrder ); // Bad all const nullAllReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( nullPromos, nullAvailableLineItems, - nullLineItemsOnOrder, + nullLineItemsOnOrder ); const emptyAllReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( emptyPromos, emptyAvailableLineItems, - emptyLineItemsOnOrder, + emptyLineItemsOnOrder ); // Assert @@ -730,7 +730,7 @@ describe("promotions-helper.js", () => { const actualReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( promos, availableLineItems, - lineItemsOnOrder, + lineItemsOnOrder ); // Assert @@ -759,7 +759,7 @@ describe("promotions-helper.js", () => { const actualReturn = promotionsHelper.getVapsThatNeedToBeAddedToSatisfyPromos( promos, availableLineItems, - lineItemsOnOrder, + lineItemsOnOrder ); // Assert @@ -779,23 +779,23 @@ describe("promotions-helper.js", () => { const nullInactivePromosReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( validActivePromoObjects, - nullInactivePromos, + nullInactivePromos ); const emptyInactivePromosReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( validActivePromoObjects, - emptyInactivePromos, + emptyInactivePromos ); const allNullReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( nullActivePromoObjects, - nullInactivePromos, + nullInactivePromos ); const allEmptyReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( emptyActivePromoObjects, - emptyInactivePromos, + emptyInactivePromos ); // Assert @@ -815,7 +815,7 @@ describe("promotions-helper.js", () => { const actualReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( activePromoObjects, - inactivePromos, + inactivePromos ); // Assert @@ -835,7 +835,7 @@ describe("promotions-helper.js", () => { const actualReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( activePromoObjects, - inactivePromos, + inactivePromos ); // Assert @@ -850,7 +850,7 @@ describe("promotions-helper.js", () => { const actualReturn = promotionsHelper.removeCurrentlyActivePromoCodesFromInactivePromos( activePromoObjects, - inactivePromos, + inactivePromos ); // Assert @@ -894,21 +894,21 @@ describe("promotions-helper.js", () => { // Act const nullNewInactivePromosReturn = promotionsHelper.getNewlyInactivatedPromos( validOldInactivePromos, - nullNewInactivePromos, + nullNewInactivePromos ); const emptyNewInactivePromosReturn = promotionsHelper.getNewlyInactivatedPromos( validOldInactivePromos, - emptyNewInactivePromos, + emptyNewInactivePromos ); const nullOldInactivePromosReturn = promotionsHelper.getNewlyInactivatedPromos( nullOldInactivePromos, - validNewInactivePromos, + validNewInactivePromos ); const allNullReturn = promotionsHelper.getNewlyInactivatedPromos( nullOldInactivePromos, - nullNewInactivePromos, + nullNewInactivePromos ); // Assert @@ -931,7 +931,7 @@ describe("promotions-helper.js", () => { // Act const actualReturn = promotionsHelper.getNewlyInactivatedPromos( oldInactivePromos, - newInactivePromos, + newInactivePromos ); // Assert @@ -950,7 +950,7 @@ describe("promotions-helper.js", () => { // Act const actualReturn = promotionsHelper.getNewlyInactivatedPromos( oldInactivePromos, - newInactivePromos, + newInactivePromos ); // Assert @@ -971,12 +971,12 @@ describe("promotions-helper.js", () => { const stackingReturn = promotionsHelper.createPromoErrorAlert( promoCode, stackingErrorCode, - additionalInfo, + additionalInfo ); const nonStackingReturn = promotionsHelper.createPromoErrorAlert( promoCode, nonStackingErrorCode, - additionalInfo, + additionalInfo ); // Assert @@ -1040,14 +1040,14 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert expect(baseMixin.methods.dispatchStoreAction).toBeCalledWith( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, expect.anything(), - expect.anything(), + expect.anything() ); expect(baseMixin.methods.dispatchStoreAction).toBeCalledTimes(2); }); @@ -1072,14 +1072,14 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert expect(baseMixin.methods.dispatchStoreAction).toBeCalledWith( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, { inactivePromos: ["testPromo"] }, - expect.anything(), + expect.anything() ); }); it("should not save an inactive promo if the promo is already an active promo (read comment below)", async () => { @@ -1109,14 +1109,14 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert expect(baseMixin.methods.dispatchStoreAction).not.toBeCalledWith( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, { inactivePromos: ["testPromo"] }, - expect.anything(), + expect.anything() ); }); it("should not save an inactive promo if the promo is on the 'excludeFromInactivePromoErrorCodes' list", async () => { @@ -1139,14 +1139,14 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert expect(baseMixin.methods.dispatchStoreAction).not.toBeCalledWith( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, expect.anything(), - expect.anything(), + expect.anything() ); }); it("should not save an inactive promo if the promo is already in the store as inactive", async () => { @@ -1168,14 +1168,14 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( newPromo, pricedLineItems, - pageNameToLog, + pageNameToLog ); // Assert expect(baseMixin.methods.dispatchStoreAction).not.toBeCalledWith( storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS, { inactivePromos: [newPromo] }, - expect.anything(), + expect.anything() ); }); it("should call SAVE_INACTIVE_AND_OR_ACTIVE_PROMOS with a list of strings for the inactivePromos parameter", async () => { @@ -1197,7 +1197,7 @@ describe("promotions-helper.js", () => { await promotionsHelper.revalidatePromosAndValidateQueryStringPromo( null, null, - null, + null ); // Assert @@ -1207,7 +1207,7 @@ describe("promotions-helper.js", () => { activePromos: expect.anything(), inactivePromos: ["testPromo1", "testPromo2"], }, - false, + false ); }); }); diff --git a/src/helpers/service-package-helper.js b/src/helpers/service-package-helper.js index fdf05b8ec..310a87e0e 100644 --- a/src/helpers/service-package-helper.js +++ b/src/helpers/service-package-helper.js @@ -9,7 +9,7 @@ export function containsLineItemWithPartType(typeToFind, itemsToSearch) { export function findLineItemsWithPartType(typeToFind, itemsToSearch) { const partTypeMatches = itemsToSearch?.filter( - (lineItem) => lineItem.partType.toUpperCase() === typeToFind.toUpperCase(), + (lineItem) => lineItem.partType.toUpperCase() === typeToFind.toUpperCase() ); return partTypeMatches; } @@ -26,7 +26,7 @@ export function getVapsLineItems(availableLineItems, vapTypes) { export function containsGlassPieceWithLocation(locationToFind, glassPiecesToSearch) { const glassLocationMatches = glassPiecesToSearch?.filter( - (glassPiece) => glassPiece.glassLocation.toUpperCase() === locationToFind.toUpperCase(), + (glassPiece) => glassPiece.glassLocation.toUpperCase() === locationToFind.toUpperCase() ); return !!glassLocationMatches?.length; @@ -37,21 +37,21 @@ export function getAvailablePackages(glassToReplace, availableLineItems, isRepai glassToReplace, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); let tierTwoVaps = getPackageContents( glassToReplace, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); let tierThreeVaps = getPackageContents( glassToReplace, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); if (tierTwoVaps.length === 0) { @@ -105,11 +105,11 @@ export function shouldFrontWipersBeAvailable( glassToReplace, availableLineItems, isRepair, - targetTier, + targetTier ) { const frontWiperIsAvailable = containsLineItemWithPartType( partTypeStrings.FRONT_WIPER, - availableLineItems, + availableLineItems ); const isFrontWindshieldTask = @@ -129,19 +129,19 @@ export function shouldRearWipersBeAvailable( glassToReplace, availableLineItems, isRepair, - targetTier, + targetTier ) { const rearWiperIsAvailable = containsLineItemWithPartType( partTypeStrings.REAR_WIPER, - availableLineItems, + availableLineItems ); const frontWiperIsAvailable = containsLineItemWithPartType( partTypeStrings.FRONT_WIPER, - availableLineItems, + availableLineItems ); const isRearWindshieldTask = containsGlassPieceWithLocation( glassLocations.REAR, - glassToReplace, + glassToReplace ); switch (targetTier) { @@ -158,26 +158,26 @@ export function shouldRainDefenseBeAvailable( glassToReplace, availableLineItems, isRepair, - targetTier, + targetTier ) { const isTierThree = targetTier === packageNames.TIER_THREE; const frontWipersInTierTwo = shouldFrontWipersBeAvailable( glassToReplace, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const frontWipersInTierThree = shouldFrontWipersBeAvailable( glassToReplace, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); const rearWipersInTierTwo = shouldRearWipersBeAvailable( glassToReplace, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); return isTierThree && !(rearWipersInTierTwo && !frontWipersInTierTwo && frontWipersInTierThree); @@ -203,7 +203,7 @@ export function getHighestRequiredTier(glassToReplace, availableLineItems, isRep glassToReplace, availableLineItems, isRepair, - vaps[i].partType, + vaps[i].partType ); currentHighestTier = maxTier(currentHighestTier, lowestTierForItem); diff --git a/src/helpers/service-package-helper.spec.js b/src/helpers/service-package-helper.spec.js index 9e5a4fc21..abcafd82c 100644 --- a/src/helpers/service-package-helper.spec.js +++ b/src/helpers/service-package-helper.spec.js @@ -223,7 +223,7 @@ describe("service-package-helper.js", () => { // Act const result = servicePackageHelper.containsGlassPieceWithLocation( locationName, - locations, + locations ); // Assert @@ -239,7 +239,7 @@ describe("service-package-helper.js", () => { // Act const result = servicePackageHelper.containsGlassPieceWithLocation( locationName, - locations, + locations ); // Assert @@ -255,7 +255,7 @@ describe("service-package-helper.js", () => { // Act const result = servicePackageHelper.containsGlassPieceWithLocation( locationName, - locations, + locations ); // Assert @@ -271,7 +271,7 @@ describe("service-package-helper.js", () => { // Act const result = servicePackageHelper.containsGlassPieceWithLocation( locationName, - locations, + locations ); // Assert @@ -287,7 +287,7 @@ describe("service-package-helper.js", () => { // Act const result = servicePackageHelper.containsGlassPieceWithLocation( locationName, - locations, + locations ); // Assert @@ -306,7 +306,7 @@ describe("service-package-helper.js", () => { const results = servicePackageHelper.getAvailablePackages( damageLocations, availableLineItems, - false, + false ); // Assert @@ -329,7 +329,7 @@ describe("service-package-helper.js", () => { const results = servicePackageHelper.getAvailablePackages( damageLocations, availableLineItems, - true, + true ); // Assert @@ -358,13 +358,13 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldFrontWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -383,13 +383,13 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldFrontWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -408,7 +408,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); // Assert @@ -426,7 +426,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -444,19 +444,19 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); const resultTwo = servicePackageHelper.shouldFrontWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldFrontWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -476,7 +476,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); // Assert @@ -496,13 +496,13 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldRearWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -521,7 +521,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); // Assert @@ -539,7 +539,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -561,7 +561,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -579,19 +579,19 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); const resultTwo = servicePackageHelper.shouldRearWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldRearWipersBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -611,7 +611,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); // Assert @@ -636,19 +636,19 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_ONE, + packageNames.TIER_ONE ); const resultTwo = servicePackageHelper.shouldRainDefenseBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); const resultThree = servicePackageHelper.shouldRainDefenseBeAvailable( damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -675,7 +675,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); // Assert @@ -702,7 +702,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - partTypeStrings.RAIN_DEFENSE, + partTypeStrings.RAIN_DEFENSE ); // Assert @@ -727,13 +727,13 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - partTypeStrings.FRONT_WIPER, + partTypeStrings.FRONT_WIPER ); const resultRear = servicePackageHelper.getLowestTierForType( damageLocations, availableLineItems, isRepair, - partTypeStrings.REAR_WIPER, + partTypeStrings.REAR_WIPER ); // Assert @@ -758,7 +758,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - partTypeStrings.RAIN_DEFENSE, + partTypeStrings.RAIN_DEFENSE ); // Assert @@ -788,7 +788,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -812,7 +812,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -836,7 +836,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -860,7 +860,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -891,7 +891,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -915,7 +915,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -939,7 +939,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert @@ -963,7 +963,7 @@ describe("service-package-helper.js", () => { damageLocations, availableLineItems, isRepair, - vaps, + vaps ); // Assert diff --git a/src/helpers/unit-test-helper.js b/src/helpers/unit-test-helper.js index ae65389f3..7c3c9ed4e 100644 --- a/src/helpers/unit-test-helper.js +++ b/src/helpers/unit-test-helper.js @@ -118,7 +118,7 @@ export function getMockOrderInfo( mockReferralDate, parentAccountNumber = "0", savedSessionId, - crmCustomerId, + crmCustomerId ) { return { referralNumber: mockReferralNumber, diff --git a/src/layouts/address-lookup/address-lookup.spec.js b/src/layouts/address-lookup/address-lookup.spec.js index 535a0c99a..677c14069 100644 --- a/src/layouts/address-lookup/address-lookup.spec.js +++ b/src/layouts/address-lookup/address-lookup.spec.js @@ -97,7 +97,7 @@ describe("address-lookup.vue", () => { // Assert expect(wrapper.findComponent({ ref: "alertMatchedDifferentVehicle" }).isVisible()).toBe( - true, + true ); }); @@ -145,9 +145,7 @@ describe("address-lookup.vue", () => { // Assert expect( - wrapper - .findComponent({ ref: "alertVinLookupsByHomeAddressNotAllowed" }) - .isVisible(), + wrapper.findComponent({ ref: "alertVinLookupsByHomeAddressNotAllowed" }).isVisible() ).toBe(true); }); @@ -298,7 +296,7 @@ describe("address-lookup.vue", () => { undefined, {}, {}, - carsFound, + carsFound ); }); @@ -386,7 +384,7 @@ describe("address-lookup.vue", () => { navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, undefined, {}, - { displayVehicleChangeAlert: true }, + { displayVehicleChangeAlert: true } ); }); @@ -482,7 +480,7 @@ describe("address-lookup.vue", () => { licenseZip: "43215", }, "address-lookup", - false, + false ); expect(wrapper.vm.dispatchStoreActionWithLogging).toHaveBeenCalledWith( @@ -490,7 +488,7 @@ describe("address-lookup.vue", () => { { zip: "43215", }, - "address-lookup", + "address-lookup" ); }); }); @@ -527,7 +525,7 @@ describe("address-lookup.vue", () => { }); expect(wrapper.findComponent({ ref: "alertNonServiceableZip" }).exists()).toBe( - false, + false ); // Act @@ -536,10 +534,10 @@ describe("address-lookup.vue", () => { // Assert expect(wrapper.vm.displayNonServiceableZipAlert).toBe(true); expect(wrapper.findComponent({ ref: "alertNonServiceableZip" }).exists()).toBe( - true, + true ); expect(wrapper.findComponent({ ref: "alertNonServiceableZip" }).isVisible()).toBe( - true, + true ); }); @@ -570,7 +568,7 @@ describe("address-lookup.vue", () => { //FIX THIS // Assert expect(wrapper.vm.dispatchStoreAction).not.toHaveBeenCalledWith( - storeActions.UPDATE_SERVICE_LOCATION_WITH_VEHICLE_REGISTRATION, + storeActions.UPDATE_SERVICE_LOCATION_WITH_VEHICLE_REGISTRATION ); }); @@ -634,7 +632,7 @@ describe("address-lookup.vue", () => { // // Assert expect(wrapper.vm.$store.getters.order.serviceLocation.zipCode).not.toEqual( - wrapper.vm.$store.getters.vehicle.registration.zipCode, + wrapper.vm.$store.getters.vehicle.registration.zipCode ); expect(wrapper.vm.$store.getters.vehicle.registration.zipCode).toEqual("12345"); expect(wrapper.vm.$store.getters.order.serviceLocation.zipCode).toEqual("11111"); @@ -723,7 +721,7 @@ function setupMocks({ }, }, mixins: [mockMixin], - }), + }) ); const apiResponses = { diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 2405ada81..4612348f2 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -127,7 +127,7 @@ import vinPagesMixin from "@/mixins/vin-pages-mixin"; defineRule("service-zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); defineRule( "service-zip-format", - regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT), + regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT) ); export default { @@ -196,7 +196,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.SUBMITTED, this.GaLabels.ADDRESS_LOOKUP, - true, + true ); }); }, @@ -239,7 +239,7 @@ export default { licenseState: this.customerQuestions.addressQuestions.state, }, "address-lookup", - false, + false ); // Settle promises and get results @@ -256,14 +256,14 @@ export default { { zip: this.serviceZipCode, }, - "address-lookup", + "address-lookup" ) : this.dispatchStoreActionWithLogging( storeActions.VALIDATE_ZIP, { zip: this.customerQuestions.addressQuestions.zipCode, }, - "address-lookup", + "address-lookup" ), }, ]; @@ -300,12 +300,12 @@ export default { this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId( carFound.carId, - "address-lookup", + "address-lookup" ); // Update button "Continue with..." this.$refs.navbar.updateButtonText( - `Continue with ${carFound.year} ${carFound.make} ${carFound.model}`, + `Continue with ${carFound.year} ${carFound.make} ${carFound.model}` ); return this.$refs.navbar.removeLoader(); } @@ -316,7 +316,7 @@ export default { // If multiple cars were found and one and only one of them matches the carId entered, save the vehicle info // so we can go to the Heritage Funnel directly const matchingCars = carsFound.filter( - (vin) => vin.vehicle.carId === this.$store.getters.vehicle.carId, + (vin) => vin.vehicle.carId === this.$store.getters.vehicle.carId ); if (matchingCars.length === 1) { @@ -358,13 +358,13 @@ export default { lastName: this.customerQuestions.lastName, }, }, - false, + false ); await this.dispatchStoreAction( storeActions.SAVE_EMAIL, this.customerQuestions.emailAddress, - false, + false ); await this.dispatchStoreAction( storeActions.SAVE_SERVICE_ZIP_CODE_INFO, @@ -373,7 +373,7 @@ export default { zipCode: this.serviceZipCode, zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu, }, - false, + false ); return await this.navigateForward(carsFound); @@ -381,7 +381,7 @@ export default { async navigateForward(carsFound) { // Match vehicles found to vehicles in state. const matchingCars = carsFound.filter( - (car) => car.vehicle.carId === this.$store.getters.vehicle.carId, + (car) => car.vehicle.carId === this.$store.getters.vehicle.carId ); // If a different vehicle is found than the one entered and the selected glass is not available for that vehicle then navigate back to "vehicle-damage" @@ -395,7 +395,7 @@ export default { this.navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, this.$route, {}, - { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }, + { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else if (matchingCars.length === 1) { await this.navigateForwardWithSingleCarMatch(); @@ -405,7 +405,7 @@ export default { this.$route, {}, {}, - carsFound, + carsFound ); } }, @@ -426,7 +426,7 @@ export default { : this.customerQuestions.addressQuestions.zipCode; const text = this.getCmsContent( "AlertNonServiceableZipWidget", - "HeadlineText", + "HeadlineText" ).replaceAll("{custom:serviceZip}", zipCode); return text; }, @@ -436,7 +436,7 @@ export default { AlertMatchedDifferentVehicleHeader() { return this.getCmsContent( "AlertMatchedDifferentVehicleWidget", - "HeadlineText", + "HeadlineText" ).replaceAll("{custom:glassText}", getDamageString()); }, AlertMatchedDifferentVehicleBody() { @@ -454,7 +454,7 @@ export default { handler(newValue) { // if they modify one of the lookup fields (address, city, state, zipCode, or lastName), then modify the button text back to "Get my personalized quote" this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); this.showServiceZipField = false; this.resetWarningsAndErrors(); diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 426117f59..b5c947472 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -61,8 +61,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); export default { diff --git a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue index 4fad3101f..0eb7db6ba 100644 --- a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue +++ b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue @@ -40,7 +40,7 @@ export default { differentVehicleAlertHeader() { return this.getCmsContent("FoundWindshield", "HeadlineText").replaceAll( "{custom:damage}", - getDamageString(), + getDamageString() ); }, differentVehicleAlertBody() { diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue index 64f6b082f..7b5fc72b2 100644 --- a/src/layouts/address-vehicles/address-vehicles.vue +++ b/src/layouts/address-vehicles/address-vehicles.vue @@ -121,7 +121,7 @@ export default { AlertFoundMultipleVehiclesHeader() { return this.getCmsContent("FoundMultipleVehicles", "HeadlineText").replaceAll( "{custom:vehicleCount}", - this.vehicleCount, + this.vehicleCount ); }, AlertProvideVinBody() { @@ -179,7 +179,7 @@ export default { { vin: this.selectedVehicle.vin, }, - "address-vehicles", + "address-vehicles" ).catch(() => { this.$refs.navbar.removeLoader(); }); @@ -190,7 +190,7 @@ export default { this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId( vinLookup.data.carId, - "address-vehicles", + "address-vehicles" ); await this.dispatchStoreAction( @@ -201,7 +201,7 @@ export default { }), isSelectedGlassAvailableForVehicle: this.isSelectedGlassAvailableForVehicle, }, - false, + false ); return await this.navigateForward(); @@ -212,7 +212,7 @@ export default { this.navigationScenarios.CLICKED_FORWARD, this.$route, {}, - { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }, + { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else { await this.navigateForwardWithSingleCarMatch(); @@ -228,11 +228,11 @@ export default { this.selectedVehicle?.vehicle.carId !== store.getters.vehicle.carId; if (this.isCarIdDifferent) { this.$refs.navbar.updateButtonText( - `Continue with ${this.selectedVehicle.vehicle.year} ${this.selectedVehicle.vehicle.make} ${this.selectedVehicle.vehicle.model}`, + `Continue with ${this.selectedVehicle.vehicle.year} ${this.selectedVehicle.vehicle.make} ${this.selectedVehicle.vehicle.model}` ); } else { this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); } }, diff --git a/src/layouts/capability-questions/capability-questions.spec.js b/src/layouts/capability-questions/capability-questions.spec.js index 289397487..fb4515f50 100644 --- a/src/layouts/capability-questions/capability-questions.spec.js +++ b/src/layouts/capability-questions/capability-questions.spec.js @@ -24,7 +24,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); jest.mock("@/helpers/heritage-integration/navigation-helper", () => ({ @@ -305,7 +305,7 @@ describe("capabilityQuestions.vue", () => { result2: undefined, }, ], - false, + false ); wrapper.unmount(); @@ -354,7 +354,7 @@ describe("capabilityQuestions.vue", () => { "getPartFromCapabilityQuestionAnswer", "Windshield", "capability-questions", - false, + false ); wrapper.unmount(); diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index 7f33f7fc9..7d1cb6c5b 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -84,13 +84,13 @@ export default { methods: { arePagePrerequisitesValid() { const capabilityQuestionsPageData = store.getters.pageData( - fmgPageValues.CAPABILITY_QUESTIONS, + fmgPageValues.CAPABILITY_QUESTIONS ); return ( // has capabilityQuestions array and has glassName not null capabilityQuestionsPageData?.partsOrQuestions?.some((part) => part?.glassName) && capabilityQuestionsPageData?.partsOrQuestions?.some( - (part) => part?.capabilityQuestions?.length > 0, + (part) => part?.capabilityQuestions?.length > 0 ) ); }, @@ -110,7 +110,7 @@ export default { const updatedGlass = this.setupInitialData( glass, index, - alreadyAnsweredQuestions, + alreadyAnsweredQuestions ); // Set up watch for each set of glass questions @@ -121,7 +121,7 @@ export default { this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey); } }, - { deep: true }, + { deep: true } ); return updatedGlass; @@ -130,7 +130,7 @@ export default { // if no preanswered questions then make sure index starts with the correct value this.currentGlassIndex = this.calculateQuestionIndex( this.currentGlassIndex, - this.questionsData, + this.questionsData ); }, async forwardButtonAction() { @@ -139,7 +139,7 @@ export default { let selectedAnswerResult2; glass.questions.forEach((q) => { const idx = q.answers.findIndex( - (a) => a.answerResult === glass.answerData.answerResult, + (a) => a.answerResult === glass.answerData.answerResult ); if (idx !== -1) { selectedAnswerResult2 = q.answers[idx].answerResult2; @@ -167,7 +167,7 @@ export default { await this.dispatchStoreAction( this.storeActions.SAVE_CAPABILITY_QUESTION_ANSWERS, questionAnswersArray, - false, + false ); // get parts from the capabilityQuestionAnswers @@ -178,12 +178,12 @@ export default { this.storeActions.GET_PART_FROM_CAPABILITY_QUESTION_ANSWER, answer.glassLocation, "capability-questions", - false, + false ) ).data; partsOrQuestions.find( - (partOrQuestion) => partOrQuestion.glassLocation === answer.glassLocation, + (partOrQuestion) => partOrQuestion.glassLocation === answer.glassLocation ).parts = partFromCapabilityQuestionAnswer; } diff --git a/src/layouts/confirmation/add-to-calendar/add-to-calendar.vue b/src/layouts/confirmation/add-to-calendar/add-to-calendar.vue index b69a2a583..4cbe0d748 100644 --- a/src/layouts/confirmation/add-to-calendar/add-to-calendar.vue +++ b/src/layouts/confirmation/add-to-calendar/add-to-calendar.vue @@ -140,7 +140,7 @@ export default { location = this.serviceLocationFullAddress?.replace("
", ""); subject = this.AddToCalendar_Mobile_Subject?.replace( "{custom:SERVICETYPE}", - this.ServiceType, + this.ServiceType ); body = this.AddToCalendar_Mobile_Body; } else { @@ -158,28 +158,28 @@ export default { endDateTime = addMinutes(startDateTime, 120); subject = this.AddToCalendar_AllDayDropOff_Subject?.replace( "{custom:STARTDATETIME}", - shortTimeString(startDateTime), + shortTimeString(startDateTime) ).replace("{custom:ENDDATETIME}", shortTimeString(endDateTime)); body = this.AddToCalendar_AllDayDropOff_Body?.replace( "{custom:ENDDATETIME}", - shortTimeString(endDateTime), + shortTimeString(endDateTime) ); } } //normal time slot else { subject = this.AddToCalendar_DropOff_Subject?.replace( "{custom:SERVICETYPE}", - this.ServiceType, + this.ServiceType ); body = this.AddToCalendar_DropOff_Body?.replace( "{custom:ADDRESS}", - location, + location ); } } else { subject = this.AddToCalendar_InShop_Subject?.replace( "{custom:SERVICETYPE}", - this.ServiceType, + this.ServiceType ); body = this.AddToCalendar_InShop_Body?.replace("{custom:ADDRESS}", location); } @@ -229,33 +229,33 @@ export default { const outlookComTimeSpanFormat = "yyyy-MM-ddTHH:mm:ss"; if (type == calendarOptions.OUTLOOKCOM) { URL = `${applicationConfig.OUTLOOK_CALENDAR}&startdt=${encodeURIComponent( - getDateFormat(this.Appointment.StartDate, outlookComTimeSpanFormat), + getDateFormat(this.Appointment.StartDate, outlookComTimeSpanFormat) )}&enddt=${encodeURIComponent( - getDateFormat(this.Appointment.EndDate, outlookComTimeSpanFormat), + getDateFormat(this.Appointment.EndDate, outlookComTimeSpanFormat) )}&subject=${encodeURIComponent( - this.Appointment.Subject, + this.Appointment.Subject )}&body=${encodeURIComponent(this.Appointment.Body)}&location=${encodeURIComponent( - this.Appointment.Location, + this.Appointment.Location )}`; } if (type == calendarOptions.GOOGLE) { URL = `${applicationConfig.GOOGLE_CALENDAR}&text=${encodeURIComponent( - this.Appointment.Subject, + this.Appointment.Subject )}&dates=${encodeURIComponent( - getDateFormat(this.Appointment.StartDate, dateFormat), + getDateFormat(this.Appointment.StartDate, dateFormat) )}/${encodeURIComponent( - getDateFormat(this.Appointment.EndDate, dateFormat), + getDateFormat(this.Appointment.EndDate, dateFormat) )}&details=${encodeURIComponent( - this.Appointment.Body, + this.Appointment.Body )}&location=${encodeURIComponent(this.Appointment.Location)}&sf=true&output=xml`; } if (type == calendarOptions.YAHOO) { URL = `${applicationConfig.YAHOO_CALENDAR}&TITLE=${encodeURIComponent( - this.Appointment.Subject, + this.Appointment.Subject )}&DESC=${encodeURIComponent(this.Appointment.Body)}&ST=${encodeURIComponent( - getDateFormat(this.Appointment.StartDate, dateFormat), + getDateFormat(this.Appointment.StartDate, dateFormat) )}&DUR=${this.Appointment.Duration}&in_loc=${encodeURIComponent( - this.Appointment.Location, + this.Appointment.Location )}`; } return { diff --git a/src/layouts/confirmation/add-to-calendar/calendar-modal-question/calendar-modal-question.vue b/src/layouts/confirmation/add-to-calendar/calendar-modal-question/calendar-modal-question.vue index d0e63648d..dacda07f2 100644 --- a/src/layouts/confirmation/add-to-calendar/calendar-modal-question/calendar-modal-question.vue +++ b/src/layouts/confirmation/add-to-calendar/calendar-modal-question/calendar-modal-question.vue @@ -75,7 +75,7 @@ export default { const { errorMessage, handleChange, meta, validate, errors } = useField( componentId, props.validationRules, - fieldOptions, + fieldOptions ); return { @@ -146,7 +146,7 @@ export default { getSelectedCalendarObject(calendarOptionId) { const calendarOption = this.calendarOptionsData?.find( - (calendarOption) => calendarOption.name == calendarOptionId, + (calendarOption) => calendarOption.name == calendarOptionId ); if (calendarOption) { diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index b22f3dacf..b46154756 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -120,13 +120,13 @@ export default { serviceZipCode: store.getters.submittedOrder.serviceLocation.zipCode, carId: store.getters.submittedOrder.vehicle.carId, }, - "confirmation", + "confirmation" ); const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_RAIN_DEFENSE, null, - "confirmation", + "confirmation" ); // Settle promises and get results @@ -240,17 +240,17 @@ export default { if (this.AppointmentType == AppointmentTypeStrings.MOBILE) { return this.MobileWordingText?.replaceAll( "{custom:ADDRESS}", - this.ServiceLocationFullAddress, + this.ServiceLocationFullAddress ); } else if (this.AppointmentType == AppointmentTypeStrings.DROP_OFF) { return this.DropOffWordingText?.replaceAll( "{custom:ADDRESS}", - this.ProviderFullAddress, + this.ProviderFullAddress ); } else { return this.InShopWordingText?.replaceAll( "{custom:ADDRESS}", - this.ProviderFullAddress, + this.ProviderFullAddress ); } }, @@ -277,7 +277,7 @@ export default { ScheduleTimeFormatted() { if (this.AppointmentType == AppointmentTypeStrings.MOBILE) { return `Between ${get12HourTimeMobileFormat( - this.ScheduleStartTime, + this.ScheduleStartTime )} - ${get12HourTimeMobileFormat(this.ScheduleEndTime)}`; } else if (this.AppointmentType == AppointmentTypeStrings.DROP_OFF) { return `Drop off before 9:30 AM`; @@ -329,19 +329,19 @@ export default { const durationLengthString = "Duration: "; if ( store.getters.submittedOrder?.schedule?.routeCode.includes( - RouteCodeFlags.ALL_DAY_DROP_OFF, + RouteCodeFlags.ALL_DAY_DROP_OFF ) ) { return durationLengthString.concat("All Day"); } else if ( store.getters.submittedOrder?.schedule?.routeCode.includes( - RouteCodeFlags.OVERNIGHT_DROP_OFF, + RouteCodeFlags.OVERNIGHT_DROP_OFF ) ) { return durationLengthString.concat("Overnight"); } else { return durationLengthString.concat( - getDisplayTextForDurationLength(durationMinimum, durationMaximum), + getDisplayTextForDurationLength(durationMinimum, durationMaximum) ); } }, diff --git a/src/layouts/customer-details/customer-details.spec.js b/src/layouts/customer-details/customer-details.spec.js index 140e1395e..14fb45233 100644 --- a/src/layouts/customer-details/customer-details.spec.js +++ b/src/layouts/customer-details/customer-details.spec.js @@ -46,7 +46,7 @@ function setupMocks() { navigateWithSaving: jest.fn(), navigateWithoutSaving: jest.fn(), }, - }), + }) ); return { wrapper }; diff --git a/src/layouts/customer-details/customer-details.vue b/src/layouts/customer-details/customer-details.vue index 2dd9deb04..ccb77c184 100644 --- a/src/layouts/customer-details/customer-details.vue +++ b/src/layouts/customer-details/customer-details.vue @@ -97,8 +97,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); export default { @@ -172,13 +172,13 @@ export default { phoneNumber: this.phoneNumber, isSmsOptIn: this.isSmsOptIn, }, - false, + false ); this.dispatchStoreAction( this.storeActions.SAVE_SERVICE_LOCATION_TECH_NOTES, this.techNotes, - false, + false ); this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index 99c4d02d2..7a66a197c 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -114,7 +114,7 @@ describe("estimate.vue", () => { wrapper.vm, { query: { fmgPage: "estimate" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.backButtonAction(); @@ -232,7 +232,7 @@ describe("estimate.vue", () => { wrapper.vm, { query: { fmgPage: "estimate" } }, undefined, - nextFunction, + nextFunction ); await wrapper.vm.$nextTick(); diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 5329a4227..89d29c744 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -73,8 +73,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); @@ -110,7 +110,7 @@ export default { storeActions.IS_VIN_BY_ADDRESS_PERMISSIBLE, { zip: zip }, "estimate", - false, + false ); } @@ -138,7 +138,7 @@ export default { if (!zip || resultMap.vinByAddress === false) { var indexToRemove = resultMap.cmsContent.VinLookupMethod.Answers.findIndex( - (answer) => answer.Name === "HomeAddress", + (answer) => answer.Name === "HomeAddress" ); if (indexToRemove) { resultMap.cmsContent.VinLookupMethod.Answers.splice(indexToRemove, 1); @@ -149,7 +149,7 @@ export default { if (store.getters.isExternalParameter) { if (store.getters.externalParameterEstimate.vinSelection) { vm.selectedVinLookupMethod = vinPagesMixin.methods.getVinlookupMethod( - store.getters.externalParameterEstimate.vinSelection, + store.getters.externalParameterEstimate.vinSelection ); await nextTick(); const isValid = await baseMixin.methods.isFormValid(vm.$refs.theForm); @@ -179,25 +179,25 @@ export default { await this.dispatchStoreAction(storeActions.CLEAR_VIN); return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_MANUAL_VIN, - this.$route, + this.$route ); } if (this.selectedVinLookupMethod === vinLookupMethodSelections.LICENSEPLATE) { return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_LICENSE_PLATE, - this.$route, + this.$route ); } if (this.selectedVinLookupMethod === vinLookupMethodSelections.HOMEADDRESS) { return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_HOME_ADDRESS, - this.$route, + this.$route ); } if (this.selectedVinLookupMethod === vinLookupMethodSelections.DECLINE) { return this.$router.navigateWithSaving( this.navigationScenarios.SELECTED_NO_VIN, - this.$route, + this.$route ); } }, diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue index de358a9d7..f675055a5 100644 --- a/src/layouts/insurance-company/insurance-company.vue +++ b/src/layouts/insurance-company/insurance-company.vue @@ -55,7 +55,7 @@ export default { const insuranceCompanyListPromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_INSURANCE_COMPANY_LIST, {}, - "insurance-company", + "insurance-company" ); // Settle promises and get results @@ -119,7 +119,7 @@ export default { await this.dispatchStoreAction( this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER, this.parentAccountNumber.toString(), - false, + false ); navigateToHeritageFunnel({ shouldSaveSession: true, diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js index 953d5c359..93aee887a 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js +++ b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js @@ -96,7 +96,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.backButtonAction(); @@ -128,7 +128,7 @@ describe("license-plate-lookup.vue", () => { carId: mockCarId, }, }, - }), + }) ); //Act @@ -136,7 +136,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); @@ -165,7 +165,7 @@ describe("license-plate-lookup.vue", () => { carId: "C00000", // Make sure carId returned from call does not match carId in state. }, }, - }), + }) ); //Act @@ -173,7 +173,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); @@ -209,7 +209,7 @@ describe("license-plate-lookup.vue", () => { carId: "C00000", // Make sure carId returned from call does not match carId in state. }, }, - }), + }) ); //Act @@ -217,7 +217,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); @@ -387,7 +387,7 @@ describe("license-plate-lookup.vue", () => { carId: "C00000", }, }, - }), + }) ); // Act @@ -395,7 +395,7 @@ describe("license-plate-lookup.vue", () => { // Assert expect(wrapper.vm.$store.getters.order.serviceLocation.zipCode).toEqual( - wrapper.vm.$store.getters.vehicle.registration.zipCode, + wrapper.vm.$store.getters.vehicle.registration.zipCode ); expect(wrapper.vm.$store.getters.vehicle.registration.zipCode).toEqual("12345"); @@ -425,7 +425,7 @@ describe("license-plate-lookup.vue", () => { carId: "C00000", }, }, - }), + }) ); //TODO FIX - test succeeds even if comment out the Act section @@ -434,7 +434,7 @@ describe("license-plate-lookup.vue", () => { // Assert const serviceZipField = wrapper.findComponent( - "[cmsWidgetName='ServiceZipQuestionWidget']", + "[cmsWidgetName='ServiceZipQuestionWidget']" ); expect(serviceZipField.exists()).toBe(true); expect(serviceZipField.isVisible()).toBe(true); @@ -457,7 +457,7 @@ describe("license-plate-lookup.vue", () => { carId: "C00000", }, }, - }), + }) ); await wrapper.vm.forwardButtonAction(); @@ -470,7 +470,7 @@ describe("license-plate-lookup.vue", () => { // Assert const serviceZipField = wrapper.findComponent( - "[cmsWidgetName='ServiceZipQuestionWidget']", + "[cmsWidgetName='ServiceZipQuestionWidget']" ); expect(serviceZipField.exists()).toBe(true); expect(serviceZipField.isVisible()).toBe(true); @@ -507,7 +507,7 @@ describe("license-plate-lookup.vue", () => { // Assert const serviceZipField = wrapper.findComponent( - "[cmsWidgetName='ServiceZipQuestionWidget']", + "[cmsWidgetName='ServiceZipQuestionWidget']" ); expect(serviceZipField.exists()).toBe(true); expect(serviceZipField.isVisible()).toBe(true); @@ -582,7 +582,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -601,7 +601,7 @@ describe("license-plate-lookup.vue", () => { wrapper.vm, { query: { fmgPage: "license-plate-lookup" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 24e91b983..94b85a881 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -125,8 +125,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); export default { @@ -188,7 +188,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.SUBMITTED, this.GaLabels.LICENSE_PLATE_LOOKUP, - true, + true ); }); }, @@ -210,7 +210,7 @@ export default { const registrationZipValidationResponse = this.dispatchStoreActionWithLogging( storeActions.VALIDATE_ZIP, { zip: this.registrationZipCode }, - "license-plate-lookup", + "license-plate-lookup" ); // Settle promises and get results @@ -228,7 +228,7 @@ export default { { zip: this.serviceZipCode, }, - "license-plate-lookup", + "license-plate-lookup" ) : registrationZipValidationResponse, }, @@ -239,7 +239,7 @@ export default { // Lookup vin const vinLookup = await this.lookupVin( this.licensePlate, - resultMap.registrationZipValidationResponse.state, + resultMap.registrationZipValidationResponse.state ).catch(() => { // No VIN found. this.displayVinNotFoundAlert = true; @@ -274,12 +274,12 @@ export default { this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId( vinLookup.data.vehicle.carId, - "license-plate-lookup", + "license-plate-lookup" ); // Update button "Continue with..." this.$refs.navbar.updateButtonText( - `Continue with ${vinLookup.data.vehicle.year} ${vinLookup.data.vehicle.make} ${vinLookup.data.vehicle.model}`, + `Continue with ${vinLookup.data.vehicle.year} ${vinLookup.data.vehicle.make} ${vinLookup.data.vehicle.model}` ); return this.$refs.navbar.removeLoader(); } @@ -308,7 +308,7 @@ export default { licensePlate: this.licensePlate, }, }, - false, + false ); await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.email, false); @@ -320,7 +320,7 @@ export default { zipCode: this.serviceZipCode, zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu, }, - false, + false ); return await this.navigateForward(); @@ -330,7 +330,7 @@ export default { storeActions.LOOKUP_VIN_BY_PLATE, { licensePlate: plate, licenseState: state }, "license-plate-lookup", - false, + false ); }, async navigateForward() { @@ -339,7 +339,7 @@ export default { this.navigationScenarios.CLICKED_FORWARD, this.$route, {}, - { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }, + { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else { await this.navigateForwardWithSingleCarMatch(); @@ -360,7 +360,7 @@ export default { const zipCode = this.serviceZipCode ? this.serviceZipCode : this.registrationZipCode; return this.getCmsContent("AlertNonServiceableZipWidget", "HeadlineText").replaceAll( "{custom:serviceZip}", - zipCode, + zipCode ); }, AlertNonServiceableZipBody() { @@ -369,7 +369,7 @@ export default { AlertMatchedDifferentVehicleHeader() { return this.getCmsContent( "AlertMatchedDifferentVehicleWidget", - "HeadlineText", + "HeadlineText" ).replaceAll("{custom:damage}", getDamageString()); }, AlertMatchedDifferentVehicleBody() { @@ -383,19 +383,19 @@ export default { watch: { licensePlate() { this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); }, registrationZipCode() { this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); }, serviceZipCode() { // If they modify the service zip code, then hide the error message. this.displayNonServiceableZipAlert = false; this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); }, }, diff --git a/src/layouts/molding-questions/molding-questions.spec.js b/src/layouts/molding-questions/molding-questions.spec.js index 3b0b3c09a..681741c2c 100644 --- a/src/layouts/molding-questions/molding-questions.spec.js +++ b/src/layouts/molding-questions/molding-questions.spec.js @@ -24,7 +24,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); jest.mock("@/helpers/heritage-integration/navigation-helper", () => ({ @@ -290,7 +290,7 @@ describe("moldingQuestions.vue", () => { partNum: "FW04848", }, ], - false, + false ); wrapper.unmount(); diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index b33e568c5..379eb5eb1 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -83,13 +83,13 @@ export default { methods: { arePagePrerequisitesValid() { const moldingQuestionsFromPageData = store.getters.pageData( - fmgPageValues.MOLDING_QUESTIONS, + fmgPageValues.MOLDING_QUESTIONS ); return ( // has childPartQuestions array and has glassName not null moldingQuestionsFromPageData?.partsOrQuestions?.some((part) => part?.glassName) && moldingQuestionsFromPageData.partsOrQuestions.some((glass) => - glass.parts?.some((part) => part?.childPartQuestions?.length > 0), + glass.parts?.some((part) => part?.childPartQuestions?.length > 0) ) ); }, @@ -109,7 +109,7 @@ export default { const updatedGlass = this.setupInitialData( glass, index, - alreadyAnsweredQuestions, + alreadyAnsweredQuestions ); // Set up watch for each set of glass questions @@ -120,7 +120,7 @@ export default { this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey); } }, - { deep: true }, + { deep: true } ); return updatedGlass; @@ -129,7 +129,7 @@ export default { // if no preanswered questions then make sure index starts with the correct value this.currentGlassIndex = this.calculateQuestionIndex( this.currentGlassIndex, - this.questionsData, + this.questionsData ); }, async forwardButtonAction() { @@ -152,7 +152,7 @@ export default { await this.dispatchStoreAction( this.storeActions.SAVE_MOLDING_QUESTION_ANSWERS, questionAnswersArray, - false, + false ); // get parts from the questionAnswers diff --git a/src/layouts/part-questions/part-questions.spec.js b/src/layouts/part-questions/part-questions.spec.js index b77895841..268f1febd 100644 --- a/src/layouts/part-questions/part-questions.spec.js +++ b/src/layouts/part-questions/part-questions.spec.js @@ -28,7 +28,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); jest.mock("@/helpers/heritage-integration/navigation-helper", () => ({ @@ -316,7 +316,7 @@ describe("partQuestions.vue...", () => { result: "FW04848", }, ], - false, + false ); wrapper.unmount(); diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 03baf6cb4..5b225e758 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -87,7 +87,7 @@ export default { // has .partQuestions array and has glassName not null partQuestionsFromPageData?.partsOrQuestions?.some((part) => part?.glassName) && partQuestionsFromPageData?.partsOrQuestions?.some( - (part) => part?.partQuestions?.length > 0, + (part) => part?.partQuestions?.length > 0 ) ); }, @@ -107,7 +107,7 @@ export default { const updatedGlass = this.setupInitialData( glass, index, - alreadyAnsweredQuestions, + alreadyAnsweredQuestions ); // Set up watch for each set of glass questions @@ -118,7 +118,7 @@ export default { this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey); } }, - { deep: true }, + { deep: true } ); return updatedGlass; @@ -127,7 +127,7 @@ export default { // if no preanswered questions then make sure index starts with the correct value this.currentGlassIndex = this.calculateQuestionIndex( this.currentGlassIndex, - this.questionsData, + this.questionsData ); }, async forwardButtonAction() { @@ -153,14 +153,14 @@ export default { await this.dispatchStoreAction( this.storeActions.SAVE_PART_QUESTION_ANSWERS, questionAnswersArray, - false, + false ); // call API parts method const partsLookup = await this.dispatchStoreActionWithLogging( this.storeActions.GET_PARTS, null, - "part-questions", + "part-questions" ); const glassPartsForStore = partsLookup.data.glassPieceParts; diff --git a/src/layouts/payment-method/payment-method-question/payment-method-question.vue b/src/layouts/payment-method/payment-method-question/payment-method-question.vue index e9a44b63c..a2974d7ef 100644 --- a/src/layouts/payment-method/payment-method-question/payment-method-question.vue +++ b/src/layouts/payment-method/payment-method-question/payment-method-question.vue @@ -77,7 +77,7 @@ export default { if (this.isInsurance) { tempItems.splice( tempItems.findIndex((a) => a.value === "Insurance"), - 1, + 1 ); } diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 7d0baee75..a5a778cc8 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -164,12 +164,12 @@ export default { const frontWipersOnOrder = lineItemsFromStore.vaps.filter( - (wiper) => wiper.partType == partTypeStrings.FRONT_WIPER, + (wiper) => wiper.partType == partTypeStrings.FRONT_WIPER ) ?? []; const rearWipersOnOrder = lineItemsFromStore.vaps.filter( - (wiper) => wiper.partType == partTypeStrings.REAR_WIPER, + (wiper) => wiper.partType == partTypeStrings.REAR_WIPER ) ?? []; const orderHasFrontWipers = frontWipersOnOrder.length > 0; @@ -183,14 +183,14 @@ export default { serviceZipCode: store.getters.order.serviceLocation.zipCode, carId: store.getters.vehicle.carId, }, - "payment-method", + "payment-method" ) : Promise.resolve([]); const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_RAIN_DEFENSE, null, - "payment-method", + "payment-method" ); const reviewDropdownPromise = reviewDropdown.methods.loadInitialData(); @@ -252,7 +252,7 @@ export default { availableLineItems: lineItemsToTax, }, "payment-method", - false, + false ); // Promo logic @@ -265,13 +265,13 @@ export default { await revalidatePromosAndValidateQueryStringPromo( promoCodeFromQueryString, pricedLineItemsToTax, - "payment-method", + "payment-method" ); // Add newly validated promos to the array to get taxed const newValidatedPromos = validatePromoResponse?.orderPromos ?? []; newValidatedPromos.push( - ...(revalidatePromoResponse ? revalidatePromoResponse.promoLineItems : []), + ...(revalidatePromoResponse ? revalidatePromoResponse.promoLineItems : []) ); pricedLineItemsToTax.push(...newValidatedPromos); // End of promo logic @@ -288,7 +288,7 @@ export default { pricedLineItems: pricedLineItemsToTax, }, "payment-method", - false, + false ); // Match all line items to the line items as they are in the store @@ -300,7 +300,7 @@ export default { const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos( newValidatedPromos, taxedVaps, - lineItems, + lineItems ); lineItems.vaps = lineItems.vaps ?? []; lineItems.vaps.push(...vapsToAddToCart); @@ -312,7 +312,7 @@ export default { vm.lineItems = lineItems; vm.inactivePromos = removeCurrentlyActivePromoCodesFromInactivePromos( vm.lineItems.promos, - vm.inactivePromos, + vm.inactivePromos ); vm.updateFooterButtonText(vm.customCtaCopy); @@ -322,7 +322,7 @@ export default { const revalidateAlerts = buildToastMessagesFromRevalidateOrValidatePromoResponse( revalidatePromoResponse, oldActivePromos, - oldInactivePromos, + oldInactivePromos ); revalidateAlerts.forEach((alert) => { @@ -334,7 +334,7 @@ export default { buildToastMessagesFromRevalidateOrValidatePromoResponse(validatePromoResponse); vm.$refs.funnelHeader.pushGlobalAlert( validateAlerts[0], - validateAlerts[0].shouldAutoFade, + validateAlerts[0].shouldAutoFade ); } }); @@ -438,14 +438,14 @@ export default { lineItemsToUse: this.lineItems, }, "payment-method", - false, + false ); // Handle error alerts here, success alerts are handled in the watcher if (revalidatePromoResponse.errors.length) { getNewlyInactivatedPromos( this.inactivePromos, - revalidatePromoResponse.errors, + revalidatePromoResponse.errors ).forEach((promoCode) => { const errorAlert = createPromoErrorAlert(promoCode); this.$refs.funnelHeader.pushGlobalAlert(errorAlert, errorAlert.shouldAutoFade); @@ -466,21 +466,21 @@ export default { pricedLineItems: revalidatePromoResponse.promoLineItems, }, "payment-method", - false, + false ); } const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos( revalidatePromoResponse.promoLineItems, this.availableVaps, - this.lineItems, + this.lineItems ); this.lineItems.vaps.push(...vapsToAddToCart); this.lineItems.promos = revalidatePromoResponse.promoLineItems; this.inactivePromos = revalidatePromoResponse.errors.map((x) => - getPromoCodeWithoutBundleIdentifier(x.promoCode), + getPromoCodeWithoutBundleIdentifier(x.promoCode) ); this.$refs.loadingModal.hideModal(); @@ -497,18 +497,18 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_PAYMENT_METHOD_CHOICE, this.paymentMethod, - false, + false ); // save lineitems as they now have salestax added await this.dispatchStoreAction( storeActions.SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING, this.lineItems.glassParts, - false, + false ); await this.dispatchStoreAction( storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, this.lineItems.supportingItems, - false, + false ); await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false); this.dispatchStoreAction( @@ -517,7 +517,7 @@ export default { activePromos: this.lineItems.promos, inactivePromos: this.inactivePromos, }, - false, + false ); this.dispatchStoreAction(storeActions.SAVE_IS_RECAL_ACK_OPT_IN, this.isRecalAckOptIn); if (this.paymentMethod == paymentMethods.LATER) { @@ -525,14 +525,14 @@ export default { await submitWorkOrder({ pageNameToLog: "payment-method", submitAfterSave: true }); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_FORWARD, - this.$route, + this.$route ); } else { if (this.paymentMethod == paymentMethods.INSURANCE) { this.dispatchStoreAction(this.storeActions.SAVE_PAYMENT_TYPE, true, false); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_INSURANCE, - this.$route, + this.$route ); } else { this.setupPia(); @@ -561,7 +561,7 @@ export default { this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_PAY_NOW, - this.$route, + this.$route ); }, hasSubmittedOrder() { @@ -574,7 +574,7 @@ export default { computed: { hasRecal() { const recalLineItem = this.$store.getters.order.lineItems?.supportingItems?.find( - (lineItem) => lineItem.partType.indexOf(partTypeStrings.RECALIBRATION) !== -1, + (lineItem) => lineItem.partType.indexOf(partTypeStrings.RECALIBRATION) !== -1 ); if (recalLineItem) { @@ -711,11 +711,11 @@ export default { if (oldValue.promos.length < newValue.promos.length) { const oldPromoCodes = oldValue.promos.map( - (promoObject) => promoObject.promoCode, + (promoObject) => promoObject.promoCode ); const newlyActivatedPromoCodes = newValue.promos.filter( - (newPromo) => !oldPromoCodes.includes(newPromo.promoCode), + (newPromo) => !oldPromoCodes.includes(newPromo.promoCode) ); const alert = createPromoSuccessAlert(newlyActivatedPromoCodes[0].promoCode); diff --git a/src/layouts/payment-method/review-dropdown/review-sections/damage-review/damage-review.vue b/src/layouts/payment-method/review-dropdown/review-sections/damage-review/damage-review.vue index 7d8956b5b..ad755b53a 100644 --- a/src/layouts/payment-method/review-dropdown/review-sections/damage-review/damage-review.vue +++ b/src/layouts/payment-method/review-dropdown/review-sections/damage-review/damage-review.vue @@ -33,7 +33,7 @@ export default { }, getGlassPieces(damageLocation) { return this.damage?.glassToReplace?.filter( - (item) => item.glassLocation === damageLocation, + (item) => item.glassLocation === damageLocation ); }, generateBulletedListFromAnswers(answers) { @@ -91,7 +91,7 @@ export default { const damageAnswers = this.getAnswersNullSafe(answerContent?.SubWidgetName); const driverSideItems = this.getGlassPieces(damageLocationsSelected.DRIVER); const damageAnswersOnOrder = damageAnswers?.filter((answer) => - driverSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName), + driverSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName) ); if (this.hasDriverSideDamage) { @@ -108,7 +108,7 @@ export default { const damageAnswers = this.getAnswersNullSafe(answerContent?.SubWidgetName); const passengerSideItems = this.getGlassPieces(damageLocationsSelected.PASSENGER); const damageAnswersOnOrder = damageAnswers?.filter((answer) => - passengerSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName), + passengerSideItems?.some((glassPiece) => answer.Name === glassPiece.glassName) ); if (this.hasPassengerSideDamage) { diff --git a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js index ee11d2e4b..00fff34ee 100644 --- a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js +++ b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.spec.js @@ -811,7 +811,7 @@ describe("Service Package Review Block", () => { expect(wrapper.vm.packageNameWidget).toEqual(testConstants.widgetNames.tierOneTitle); let containsRainDefenseCopy = wrapper.vm.displayContent.includes( - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainDefenseCopy ); expect(containsRainDefenseCopy).toBe(true); }); @@ -863,10 +863,10 @@ describe("Service Package Review Block", () => { // Assert const includesFrontWiperCopy = wrapper.vm.displayContent.includes( - testConstants.vapsCopy.frontWiperCopy, + testConstants.vapsCopy.frontWiperCopy ); const includesRainDefenseCopy = wrapper.vm.displayContent.includes( - testConstants.vapsCopy.rainDefenseCopy, + testConstants.vapsCopy.rainDefenseCopy ); expect(includesFrontWiperCopy).toBe(true); expect(includesRainDefenseCopy).toBe(false); @@ -916,7 +916,7 @@ describe("Service Package Review Block", () => { // Assert expect(wrapper.vm.packageNameWidget).toEqual( - iteration.expected.packageNameWidget, + iteration.expected.packageNameWidget ); expect(wrapper.vm.displayContent).toEqual(iteration.expected.displayContent); }); diff --git a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.vue b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.vue index 921767ff6..40675dbd2 100644 --- a/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.vue +++ b/src/layouts/payment-method/review-dropdown/review-sections/service-package-review/service-package-review.vue @@ -38,12 +38,12 @@ export default { serviceZipCode: store.getters.order.serviceLocation.zipCode, carId: store.getters.vehicle.carId, }, - "review", + "review" ); const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_RAIN_DEFENSE, null, - "review", + "review" ); const promiseResultMap = [ @@ -75,7 +75,7 @@ export default { packageNameWidget() { const servicePackageNames = this.getCmsContent( this.servicePackageOptionsCmsName, - "Answers", + "Answers" ); if (!servicePackageNames) { @@ -83,7 +83,7 @@ export default { } const currentPackage = servicePackageNames.find( - (entry) => entry.Name === this.packageLevel, + (entry) => entry.Name === this.packageLevel ); return currentPackage.SubWidgetName; @@ -105,7 +105,7 @@ export default { } const vapsDescriptionsOnOrder = vapsDescriptions.filter((answer) => - containsLineItemWithPartType(answer.Name, this.vaps), + containsLineItemWithPartType(answer.Name, this.vaps) ); return vapsDescriptionsOnOrder.map((answer) => answer.Text); @@ -115,7 +115,7 @@ export default { this.glassToReplace, this.availableLineItems, this.isRepair, - this.vaps, + this.vaps ); }, glassToReplace() { diff --git a/src/layouts/payment-pia-return/payment-pia-return.vue b/src/layouts/payment-pia-return/payment-pia-return.vue index 1e0ada747..9e6e76c56 100644 --- a/src/layouts/payment-pia-return/payment-pia-return.vue +++ b/src/layouts/payment-pia-return/payment-pia-return.vue @@ -34,7 +34,7 @@ export default { this.$route, { [queryStrings.DISPLAY_PIA_ALERT]: store.getters.order.payment.piaType, - }, + } ); } else { this.$router.navigateWithoutSaving( @@ -42,7 +42,7 @@ export default { this.$route, { [queryStrings.DISPLAY_PIA_ALERT]: true, - }, + } ); } } else { @@ -63,12 +63,12 @@ export default { const lastFour = getQuerystringParameter(queryStrings.LAST_FOUR); if (lastFour) { console.log( - new Date() + ": Payment method credit card selected by default", + new Date() + ": Payment method credit card selected by default" ); this.dispatchStoreAction( storeActions.SAVE_PAYMENT_METHOD_CHOICE, paymentMethods.CREDIT_CARD, - false, + false ); await this.processCreditCardResponse(); } else { @@ -78,7 +78,7 @@ export default { this.navigationScenarios.PIA_ERROR, this.$route, {}, - { [routerParams.DISPLAY_PIA_ALERT]: true }, + { [routerParams.DISPLAY_PIA_ALERT]: true } ); } } @@ -97,7 +97,7 @@ export default { baseMixin.methods.dispatchStoreAction( storeActions.SAVE_NEXTGEN_SETTLED_AMOUNT, this.getAmountDue(), - false, + false ); await this.saveAndSubmitWorkOrder(); @@ -111,13 +111,13 @@ export default { "error: unknown ref:" + referralSeqNum + " " + - store.getters.order.referralSequenceNumber, + store.getters.order.referralSequenceNumber ); this.$router.navigateWithoutSaving( this.navigationScenarios.PIA_ERROR, this.$route, {}, - { [routerParams.DISPLAY_PIA_ALERT]: true }, + { [routerParams.DISPLAY_PIA_ALERT]: true } ); } else { const expMonth = getQuerystringParameter(queryStrings.CARD_EXPIRATION_MONTH); @@ -130,7 +130,7 @@ export default { const authCode = getQuerystringParameter(queryStrings.AUTH_CODE); const transactionId = getQuerystringParameter(queryStrings.TRANSACTION_ID); const transReferenceNumber = getQuerystringParameter( - queryStrings.TRANS_REFERENCE_NUMBER, + queryStrings.TRANS_REFERENCE_NUMBER ); const lastFour = getQuerystringParameter(queryStrings.LAST_FOUR); @@ -153,7 +153,7 @@ export default { baseMixin.methods.dispatchStoreAction( storeActions.SAVE_NEXTGEN_SETTLED_AMOUNT, this.getAmountDue(), - false, + false ); await this.saveAndSubmitWorkOrder(); } @@ -175,7 +175,7 @@ export default { this.navigationScenarios.PIA_ERROR, this.$route, {}, - { [routerParams.DISPLAY_PIA_ALERT]: true }, + { [routerParams.DISPLAY_PIA_ALERT]: true } ); this.$refs.loadingModal.isModalVisible = false; return; diff --git a/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue b/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue index c922bb740..7199e27e7 100644 --- a/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue +++ b/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue @@ -38,7 +38,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.buttonText, - true, + true ); this.$emit("click-event", clickValue); }, diff --git a/src/layouts/payment/payment.spec.js b/src/layouts/payment/payment.spec.js index 528c63ca5..4290a97d4 100644 --- a/src/layouts/payment/payment.spec.js +++ b/src/layouts/payment/payment.spec.js @@ -308,7 +308,7 @@ describe("payment.vue", () => { vmMock, { query: { fmgPage: "payment" } }, undefined, - nextF, + nextF ); // Assert diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index e4ffeee9f..987caf56d 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -280,7 +280,7 @@ export default { const signaturePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_SIGNATURE, null, - "payment", + "payment" ); const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( @@ -289,13 +289,13 @@ export default { serviceZipCode: store.getters.order.serviceLocation.zipCode, carId: store.getters.vehicle.carId, }, - "payment", + "payment" ); const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_RAIN_DEFENSE, null, - "payment", + "payment" ); const promiseResultMap = [ @@ -336,7 +336,7 @@ export default { availableLineItems: lineItemsToTax, }, "payment", - false, + false ); // Promo logic @@ -346,12 +346,12 @@ export default { await revalidatePromosAndValidateQueryStringPromo( promoCodeFromQueryString, pricedLineItemsToTax, - "payment", + "payment" ); const newValidatedPromos = validatePromoResponse?.orderPromos ?? []; newValidatedPromos.push( - ...(revalidatePromoResponse ? revalidatePromoResponse.promoLineItems : []), + ...(revalidatePromoResponse ? revalidatePromoResponse.promoLineItems : []) ); pricedLineItemsToTax.push(...newValidatedPromos); @@ -369,7 +369,7 @@ export default { pricedLineItems: pricedLineItemsToTax, }, "payment", - false, + false ); // Match all line items to the line items as they are in the store @@ -383,7 +383,7 @@ export default { const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos( newValidatedPromos, taxedVaps, - lineItems, + lineItems ); lineItems.vaps = lineItems.vaps ?? []; lineItems.vaps.push(...vapsToAddToCart); @@ -614,7 +614,7 @@ export default { await this.dispatchStoreAction( storeActions.SAVE_PAYMENT_METHOD_CHOICE, paymentMethods.LATER, - false, + false ); await this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); @@ -632,7 +632,7 @@ export default { this.navigationScenarios.PIA_ERROR, this.$route, {}, - { [routerParams.DISPLAY_PIA_ALERT]: true }, + { [routerParams.DISPLAY_PIA_ALERT]: true } ); this.$refs.loadingModal.isModalVisible = false; return; @@ -727,13 +727,13 @@ export default { this.dispatchStoreAction( storeActions.SAVE_PAYMENT_METHOD_CHOICE, paymentMethod, - false, + false ); } }, setIFrameListener() { window.addEventListener("message", (event) => - this.handleIFrameContentWindowMessage(event), + this.handleIFrameContentWindowMessage(event) ); }, setUIBlock(val) { diff --git a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue index 16c9123db..512d0f577 100644 --- a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue +++ b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue @@ -82,7 +82,7 @@ export default { } let price = baseMixin.methods.getTierOnePackagePrice( - baseMixin.methods.filterOutFees(allLineItems), + baseMixin.methods.filterOutFees(allLineItems) ); let vapsLineItemsForSelectedPackage = this.lineItems.vaps; @@ -94,7 +94,7 @@ export default { let allLineItems = getArrayOfAllLineItems(this.lineItems); const promos = getPromosThatMatchLineItemsOnOrder( this.lineItems.promos, - allLineItems, + allLineItems ); promos.forEach((promo) => { price += baseMixin.methods.getTotalLineItemPrice(promo); diff --git a/src/layouts/quote/cash-or-insurance-question/cash-or-insurance-question.vue b/src/layouts/quote/cash-or-insurance-question/cash-or-insurance-question.vue index b9443ad10..19382a19a 100644 --- a/src/layouts/quote/cash-or-insurance-question/cash-or-insurance-question.vue +++ b/src/layouts/quote/cash-or-insurance-question/cash-or-insurance-question.vue @@ -27,7 +27,7 @@ export default { const answers = this.getCmsContent(this.cmsWidgetName, "Answers"); if (answers) { answers.forEach( - (answer) => (answer.additionalButtonData = this.additionalButtonData), + (answer) => (answer.additionalButtonData = this.additionalButtonData) ); } return answers; diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index c2f233f9b..34041d3c4 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -38,7 +38,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); // START beforeRouteEnter mock arranging // @@ -265,7 +265,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -303,7 +303,7 @@ describe("quote.vue", () => { wrapper.vm.$route = { query: { isInsurance: "false" } }; const isServicePackageDiscount = mockMixin.methods.getSettingValue( - experimentSettings.SERVICE_PACKAGE_DISCOUNT, + experimentSettings.SERVICE_PACKAGE_DISCOUNT ); //Act @@ -311,7 +311,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert expect(isServicePackageDiscount).toBe(true); @@ -348,7 +348,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -386,7 +386,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -426,7 +426,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -465,7 +465,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -506,7 +506,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -548,7 +548,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert @@ -586,7 +586,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); //Assert expect(wrapper.vm.isInsuranceSelected).toBe(true); @@ -642,7 +642,7 @@ describe("quote.vue", () => { expect(wrapper.vm.dispatchStoreAction).toHaveBeenCalledWith( "saveSupportingItems", wrapper.vm.lineItems.supportingItems, - false, + false ); }); }); @@ -701,7 +701,7 @@ describe("quote.vue", () => { wrapper.vm, { query: { fmgPage: "quote" } }, undefined, - nextFunction, + nextFunction ); await nextTick(); expect(nextFunction).toHaveBeenCalled(); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index e6469f31c..c49eb3417 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -138,17 +138,17 @@ export default { serviceZipCode: store.getters.order.serviceLocation.zipCode, carId: store.getters.vehicle.carId, }, - "quote", + "quote" ); const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_RAIN_DEFENSE, null, - "quote", + "quote" ); const supportingItemsPromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_SUPPORTING_ITEMS, null, - "quote", + "quote" ); const promiseResultMap = [ @@ -175,7 +175,7 @@ export default { lineItems.vaps = lineItems.vaps ?? []; const nullSafeGlassParts = lineItems.glassParts ?? []; const servicePackageDiscountSettingValue = experimentMixin.methods.getSettingValue( - experimentSettings.SERVICE_PACKAGE_DISCOUNT, + experimentSettings.SERVICE_PACKAGE_DISCOUNT ); const isServicePackageDiscount = servicePackageDiscountSettingValue === "True"; //Service package cash discount api call when experiment is active @@ -185,7 +185,7 @@ export default { await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_SERVICE_PACKAGE_DISCOUNT_PART, null, - "quote", + "quote" ); if (servicePackageDiscountPartResponse.data) { servicePackageDiscountPart.push(servicePackageDiscountPartResponse.data); @@ -203,12 +203,12 @@ export default { baseMixin.methods.dispatchStoreAction( storeActions.SAVE_PARENT_ACCOUNT_NUMBER, applicationConfig.CASH_PARENT_ACCOUNT_NUMBER, - false, + false ); baseMixin.methods.dispatchStoreAction( storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER, applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER, - false, + false ); const pricingResults = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -217,13 +217,13 @@ export default { availableLineItems: availableLineItems, }, "quote", - false, + false ); baseMixin.methods.dispatchStoreAction( storeActions.SAVE_SUPPORTING_ITEMS, resultMap.supportingItems, - false, + false ); lineItems.supportingItems = resultMap.supportingItems; const addableVaps = [...resultMap.wipers, resultMap.rainDefense]; @@ -239,7 +239,7 @@ export default { promoCodeFromQueryString, pricingResults, "quote", - true, + true ); // Sync local promos with any new promos added by validate/revalidate lineItems.promos = store.getters.lineItems.promos ?? []; @@ -257,7 +257,7 @@ export default { const revalidateAlerts = buildToastMessagesFromRevalidateOrValidatePromoResponse( revalidatePromoResponse, oldActivePromos, - oldInactivePromos, + oldInactivePromos ); revalidateAlerts.forEach((alert) => { vm.$refs.funnelHeader.pushGlobalAlert(alert, alert.shouldAutoFade); @@ -268,7 +268,7 @@ export default { buildToastMessagesFromRevalidateOrValidatePromoResponse(validatePromoResponse); vm.$refs.funnelHeader.pushGlobalAlert( validateAlerts[0], - validateAlerts[0].shouldAutoFade, + validateAlerts[0].shouldAutoFade ); } if (store.getters.isExternalParameter) { @@ -306,7 +306,7 @@ export default { isRecalibrationOnOrder() { return containsLineItemWithPartType( partTypeStrings.RECALIBRATION, - this?.availableLineItems, + this?.availableLineItems ); }, }, @@ -343,7 +343,7 @@ export default { } else { return availableLineItems ? baseMixin.methods.getTierOnePackagePrice( - baseMixin.methods.filterOutFees(availableLineItems), + baseMixin.methods.filterOutFees(availableLineItems) ) > 300 : null; } @@ -361,19 +361,19 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_PAYMENT_TYPE, this.isInsuranceSelected, - false, + false ); if (!this.isInsuranceSelected) { this.dispatchStoreAction( this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER, applicationConfig.CASH_PARENT_ACCOUNT_NUMBER, - false, + false ); this.dispatchStoreAction( this.storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER, applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER, - false, + false ); } @@ -388,13 +388,13 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING, this.lineItems.glassParts, - false, + false ); } this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS, this.lineItems.supportingItems, - false, + false ); this.dispatchStoreAction(this.storeActions.SAVE_VAPS, this.lineItems.vaps, false); this.dispatchStoreAction( @@ -402,19 +402,19 @@ export default { { activePromos: this.lineItems.promos, }, - false, + false ); const payment = this.$store.getters.payment; if (payment.isInsurance) { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_INSURANCE, - this.$route, + this.$route ); } else { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_CASH, - this.$route, + this.$route ); } }, @@ -425,16 +425,16 @@ export default { this.lineItems.promos?.length > 0 ? this.$refs.servicePackage.getDiscountedPackagePriceString( packageNames.TIER_ONE, - false, + false ) : this.$refs.servicePackage.getPackagePriceString( - packageNames.TIER_ONE, + packageNames.TIER_ONE ); this.pushEventToGA( this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CASH_QUOTE_DISPLAYED, tierOnePrice, - true, + true ); } }); @@ -457,10 +457,10 @@ export default { } if (oldValue.promos.length < newValue.promos.length) { const oldPromoCodes = oldValue.promos.map( - (promoObject) => promoObject.promoCode, + (promoObject) => promoObject.promoCode ); const newlyActivatedPromoCodes = newValue.promos.filter( - (newPromo) => !oldPromoCodes.includes(newPromo.promoCode), + (newPromo) => !oldPromoCodes.includes(newPromo.promoCode) ); const alert = createPromoSuccessAlert(newlyActivatedPromoCodes[0].promoCode); this.$refs.funnelHeader.pushGlobalAlert(alert, alert.shouldAutoFade); diff --git a/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue b/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue index 856efeea6..c7f31db33 100644 --- a/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue +++ b/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue @@ -68,7 +68,7 @@ export default { }, recalBody() { return splitCopyOnCMSPlaceHolder( - this.getCmsContent(this.cmsWidgetName, "SubheaderText"), + this.getCmsContent(this.cmsWidgetName, "SubheaderText") ); }, }, diff --git a/src/layouts/quote/service-package-question/service-package-question.spec.js b/src/layouts/quote/service-package-question/service-package-question.spec.js index bbdc1d7f5..07d37ed19 100644 --- a/src/layouts/quote/service-package-question/service-package-question.spec.js +++ b/src/layouts/quote/service-package-question/service-package-question.spec.js @@ -119,11 +119,11 @@ describe("service-package-question.vue", () => { wrapper.vm.isServicePackageDiscountOnOrder = containsLineItemWithPartType( partType, - mockProps.lineItems.supportingItems, + mockProps.lineItems.supportingItems ); const servicePackageDiscountLineItem = findLineItemsWithPartType( partType, - mockProps.lineItems.supportingItems, + mockProps.lineItems.supportingItems ); wrapper.vm.getServicePackageDiscountPrice(); const price = baseMixin.methods.getTotalLineItemPrice(servicePackageDiscountLineItem[0]); @@ -159,7 +159,7 @@ describe("service-package-question.vue", () => { // Assert expect( - wrapper.vm.servicePackageAnswers[0].buttonAuxillaryCopy.includes("As little as"), + wrapper.vm.servicePackageAnswers[0].buttonAuxillaryCopy.includes("As little as") ).toBe(true); }); it("should return [] from nullSafeAvailableLineItems and not error out if availableLineItems is null", () => { @@ -209,14 +209,14 @@ describe("service-package-question.vue", () => { // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer should not be created expect(wrapper.vm.servicePackageAnswers.length).toBe(2); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should not select a default package if isInsurance is null", async () => { @@ -456,17 +456,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_Recal mock", () => { @@ -496,17 +496,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_RearGlass mock", () => { @@ -536,17 +536,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_RearGlass+NonWindshield mock", () => { @@ -580,17 +580,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_RearGlass+Windshield mock", () => { @@ -623,17 +623,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_RearGlassNoFrontFit mock", () => { @@ -661,17 +661,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_Windshield+SideGlass mock", () => { @@ -704,17 +704,17 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierTwo, + expectedModifiedAnswers[packageNameKey].tierTwo ); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[2], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_SideGlass mock", () => { @@ -744,14 +744,14 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer should not be created expect(wrapper.vm.servicePackageAnswers.length).toBe(2); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); it("should match the 05_01_CSR_Quote_NoWiperFit mock", () => { @@ -778,14 +778,14 @@ describe("service-package-question.vue, matching business rules for package disp // economy answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[0], - expectedModifiedAnswers[packageNameKey].tierOne, + expectedModifiedAnswers[packageNameKey].tierOne ); // standard answer should not be created expect(wrapper.vm.servicePackageAnswers.length).toBe(2); // premium answer runPackageAnswerExpectStatements( wrapper.vm.servicePackageAnswers[1], - expectedModifiedAnswers[packageNameKey].tierThree, + expectedModifiedAnswers[packageNameKey].tierThree ); }); }); 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 9b5c9d53e..93d8ff79b 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -78,11 +78,11 @@ export default { if ( containsLineItemWithPartType( partTypeStrings.SERVICE_PACKAGE_DISCOUNT, - supportingItems, + supportingItems ) ) { supportingItems = supportingItems.filter( - (item) => item.partType !== partTypeStrings.SERVICE_PACKAGE_DISCOUNT, + (item) => item.partType !== partTypeStrings.SERVICE_PACKAGE_DISCOUNT ); } if ( @@ -114,11 +114,11 @@ export default { const availablePackages = getAvailablePackages( this.glassToReplace, this.nullSafeAvailableLineItems, - this.isRepair, + this.isRepair ); cmsAnswersContent = cmsAnswersContent.filter((answer) => - availablePackages.some((tier) => answer.Name === tier.packageName), + availablePackages.some((tier) => answer.Name === tier.packageName) ); const modifiedAnswers = cmsAnswersContent.map((answer) => ({ @@ -129,7 +129,7 @@ export default { //The package supports service-package-discount if it has the text value in CMS buttonAuxillaryCopy: this.getDiscountedPackagePriceString( answer.Name, - this.isServicePackageDiscountOnOrder && answer.Text != "", + this.isServicePackageDiscountOnOrder && answer.Text != "" ), buttonFooterCopy: this.getFooterTextFromCms(answer.SubWidgetName), additionalButtonData: { @@ -144,13 +144,13 @@ export default { isRecalibrationOnOrder() { return containsLineItemWithPartType( partTypeStrings.RECALIBRATION, - this.nullSafeAvailableLineItems, + this.nullSafeAvailableLineItems ); }, isServicePackageDiscountOnOrder() { return containsLineItemWithPartType( partTypeStrings.SERVICE_PACKAGE_DISCOUNT, - this.nullSafeAvailableLineItems, + this.nullSafeAvailableLineItems ); }, frontWipersApplicableForTierTwo() { @@ -158,7 +158,7 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); }, rearWiperApplicableForTierTwo() { @@ -166,7 +166,7 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageNames.TIER_TWO, + packageNames.TIER_TWO ); }, frontWipersApplicableForTierThree() { @@ -174,7 +174,7 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); }, rearWiperApplicableForTierThree() { @@ -182,7 +182,7 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); }, rainDefenseApplicableForTierThree() { @@ -190,7 +190,7 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageNames.TIER_THREE, + packageNames.TIER_THREE ); }, glassToReplace() { @@ -202,7 +202,7 @@ export default { servicePackageDiscountParts() { return findLineItemsWithPartType( partTypeStrings.SERVICE_PACKAGE_DISCOUNT, - this.nullSafeAvailableLineItems, + this.nullSafeAvailableLineItems ); }, }, @@ -227,7 +227,7 @@ export default { this.getPackagePrice(packageName, { discountedPrice: false, servicePackageDiscount: false, - }), + }) ).toFixed(2); return "$" + formattedPriceFloat; }, @@ -236,7 +236,7 @@ export default { this.getPackagePrice(packageName, { discountedPrice: true, servicePackageDiscount, - }), + }) ).toFixed(2); return (this.isInsuranceSelected ? "As little as $" : "$") + formattedPriceFloat; }, @@ -264,7 +264,7 @@ export default { let priceFloat = this.isInsuranceSelected ? 0 : baseMixin.methods.getTierOnePackagePrice( - baseMixin.methods.filterOutFees(lineItemsToPrice), + baseMixin.methods.filterOutFees(lineItemsToPrice) ); priceFloat += this.getVapsPrice(packageName, discountedPrice); @@ -275,7 +275,7 @@ export default { if (this.isServicePackageDiscountOnOrder) { let price = 0; price += baseMixin.methods.getTotalLineItemPrice( - this.servicePackageDiscountParts[0], + this.servicePackageDiscountParts[0] ); return Math.abs(price); } @@ -291,7 +291,7 @@ export default { if (applyPromoDiscounts && this.activePromos) { const relevantPromos = getPromosThatMatchLineItemsOnOrder( this.activePromos, - vapsItems, + vapsItems ); relevantPromos.forEach((promo) => { price += baseMixin.methods.getTotalLineItemPrice(promo); @@ -308,19 +308,19 @@ export default { const promosWithAddableVaps = getPromosWithAddableVaps(this.activePromos); const vapsThatMatchPromos = getLineItemsThatMatchPromos( promosWithAddableVaps, - this.nullSafeAvailableLineItems, + this.nullSafeAvailableLineItems ); const vapsFromStore = this.$store.getters.lineItems.vaps ?? []; const vapsToUseForDefaultPackageSelection = this.combineLineItemsWithoutDuplicates( vapsThatMatchPromos, - vapsFromStore, + vapsFromStore ); this.selectedPackageName = getHighestRequiredTier( this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - vapsToUseForDefaultPackageSelection, + vapsToUseForDefaultPackageSelection ); }, getVapsLineItemsForSelectedPackage(packageName) { @@ -328,14 +328,14 @@ export default { this.glassToReplace, this.nullSafeAvailableLineItems, this.isRepair, - packageName, + packageName ); let vapsLineItemsForSelectedPackage = []; packageContentTypes.forEach((vapType) => { vapsLineItemsForSelectedPackage.push( - ...findLineItemsWithPartType(vapType, this.nullSafeAvailableLineItems), + ...findLineItemsWithPartType(vapType, this.nullSafeAvailableLineItems) ); }); @@ -343,7 +343,7 @@ export default { }, getServicePackageDiscountPartForSelectedPackage(packageName) { const selectedPackage = this.servicePackageAnswers.filter( - (item) => item.value === packageName, + (item) => item.value === packageName ); if (selectedPackage?.[0]?.additionalButtonData?.servicePackageDiscount) { return this.servicePackageDiscountParts; 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 40294794b..b0e10df95 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 @@ -111,7 +111,7 @@ export default { }, shouldDisplayStrikeThroughPrice() { const displayPrice = this.buttonAuxillaryCopy.substring( - this.buttonAuxillaryCopy.indexOf("$"), + this.buttonAuxillaryCopy.indexOf("$") ); return displayPrice != this.additionalButtonData.strikeThroughPrice; }, diff --git a/src/layouts/schedule/helpers/schedule-helper.js b/src/layouts/schedule/helpers/schedule-helper.js index 4f78520d6..633d862d2 100644 --- a/src/layouts/schedule/helpers/schedule-helper.js +++ b/src/layouts/schedule/helpers/schedule-helper.js @@ -7,7 +7,7 @@ export async function getAlertReasons(ctu) { { ctu: ctu, }, - "schedule", + "schedule" ); return Promise.resolve(alertReasons); diff --git a/src/layouts/schedule/schedule.spec.js b/src/layouts/schedule/schedule.spec.js index ad12d3184..270da75f0 100644 --- a/src/layouts/schedule/schedule.spec.js +++ b/src/layouts/schedule/schedule.spec.js @@ -245,7 +245,7 @@ describe("schedule.vue...", () => { // Act const newShopTimeSlots = await wrapper.vm.getAvailableDatesMethod( "2023-01-01", - "2023-01-31", + "2023-01-31" ); // Assert @@ -281,7 +281,7 @@ describe("schedule.vue...", () => { "2023-01-01", "2023-03-31", "Inshop", - "123", + "123" ); // Assert @@ -290,7 +290,7 @@ describe("schedule.vue...", () => { "getShopTimeSlots", expect.anything(), expect.anything(), - expect.anything(), + expect.anything() ); }); @@ -311,7 +311,7 @@ describe("schedule.vue...", () => { wrapper.vm, { query: { fmgPage: "schedule" } }, undefined, - nextFunction, + nextFunction ); // Assert @@ -320,7 +320,7 @@ describe("schedule.vue...", () => { expect(wrapper.vm.$refs.datePicker.initializeComponent).toHaveBeenCalledWith( expect.objectContaining({ calendarViewDirection: "future", - }), + }) ); expect(wrapper.vm.$refs.locationAlerts.initializeComponent).toHaveBeenCalled(); expect(wrapper.vm.selectableDatesData).toStrictEqual( @@ -328,12 +328,12 @@ describe("schedule.vue...", () => { days: expect.any(Array), estimatedServiceMinutesMaximum: expect.any(Number), estimatedServiceMinutesMinimum: expect.any(Number), - }), + }) ); expect(wrapper.vm.mobilePremiumAppointmentFee).toStrictEqual( expect.objectContaining({ partNumber: expect.any(String), - }), + }) ); expect(wrapper.vm.updateFooterButtonText).toHaveBeenCalled(); }); @@ -375,7 +375,7 @@ describe("schedule.vue...", () => { expect(testValue).toStrictEqual( expect.objectContaining({ date: "2022-11-11", - }), + }) ); }); @@ -514,7 +514,7 @@ describe("schedule.vue...", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith( "CLICKED_BACK", - "testRoute", + "testRoute" ); }); }); @@ -579,7 +579,7 @@ describe("schedule.vue...", () => { partType: "EARLY BIRD", }), ]), - expect.anything(), + expect.anything() ); }); @@ -624,7 +624,7 @@ describe("schedule.vue...", () => { partType: "EARLY BIRD", }), ]), - expect.anything(), + expect.anything() ); }); diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index cd243090c..1eb80015e 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -106,7 +106,7 @@ const getAvailableDates = async ( startDateString, endDateString, appointmentType, - providerNumber, + providerNumber ) => { const apiEndDateLimit = sumDateString(startDateString, TIME_SLOTS_CALL_DAYS_LIMIT); const difference = calcDaysBetweenDates(startDateString, endDateString); @@ -172,7 +172,7 @@ const getAvailableDates = async ( storeAction.storeAction, storeAction.payload, "schedule", - false, + false ); timeSlotsResponsesData.estimatedServiceMinutesMinimum = timeSlotsResponse.data.estimatedServiceMinutesMinimum; @@ -182,7 +182,7 @@ const getAvailableDates = async ( ...timeSlotsResponsesData.days, ...timeSlotsResponse.data.days, ]; - }), + }) ); }; @@ -222,7 +222,7 @@ export default { const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_MOBILE_PREMIUM_FEE, null, - "schedule", + "schedule" ); const premiumFeeWithPricePromise = premiumFeePromise.then((result) => { @@ -233,7 +233,7 @@ export default { availableLineItems: [result.data], }, "schedule", - false, + false ); } else { return result.data; @@ -242,7 +242,7 @@ export default { const alertReasonsPromise = locationAlerts.methods.loadInitialData( store.getters.order.serviceLocation.zipCodeCtu, - store.getters.order.serviceLocation.provider?.address?.zipCodeCtu, + store.getters.order.serviceLocation.provider?.address?.zipCodeCtu ); // Settle promises and get results @@ -296,7 +296,7 @@ export default { } return this.selectableDatesData.days?.find( - (selectableDate) => selectableDate.date === this.selectedDate, + (selectableDate) => selectableDate.date === this.selectedDate ); }, }, @@ -326,11 +326,11 @@ export default { startDate, endDate, this.appointmentType, - this.$store.getters.order.serviceLocation.provider.providerNumber, + this.$store.getters.order.serviceLocation.provider.providerNumber ); // ADD API CALL RESULTS TO EXISTING DATE DATA this.selectableDatesData.days = this.selectableDatesData.days.concat( - newShopTimeSlots.days, + newShopTimeSlots.days ); return newShopTimeSlots; }, @@ -351,7 +351,7 @@ export default { if (supportingItems) { isPremiumAppointment = !!supportingItems.filter( - (lineItem) => lineItem.partType === PREMIUM_FEE_PART_TYPE, + (lineItem) => lineItem.partType === PREMIUM_FEE_PART_TYPE ).length > 0; } @@ -377,12 +377,12 @@ export default { navbarButtonText = "Continue"; } else { navbarButtonText = `Select ${this.convertSelectedDateToShortMonthAndDay( - timeSlotInfo.timeSlot.date, + timeSlotInfo.timeSlot.date )}`; if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) { navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime( - timeSlotInfo.timeSlot.startTime, + timeSlotInfo.timeSlot.startTime )}`; } else if ( this.appointmentType === AppointmentTypeStrings.MOBILE && @@ -390,10 +390,10 @@ export default { ) { navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime( timeSlotInfo.timeSlot.startTime, - true, + true )} - ${this.getDisplayTextForMilitaryTime( timeSlotInfo.timeSlot.endTime, - true, + true )}`; } } @@ -430,7 +430,7 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SCHEDULE, this.selectedTimeSlotInfo.timeSlot, - false, + false ); this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); @@ -444,7 +444,7 @@ export default { this.selectedTimeSlotInfo?.isPremiumAppointment ) { const premiumFeeIndex = supportingItems.findIndex( - (item) => item.partType == PREMIUM_FEE_PART_TYPE, + (item) => item.partType == PREMIUM_FEE_PART_TYPE ); if (premiumFeeIndex >= 0) { @@ -461,7 +461,7 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, supportingItems, - false, + false ); } else { if (!supportingItems) { @@ -470,7 +470,7 @@ export default { // if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added const removePremiumFeeIndex = supportingItems.findIndex( - (item) => item.partType == PREMIUM_FEE_PART_TYPE, + (item) => item.partType == PREMIUM_FEE_PART_TYPE ); if (removePremiumFeeIndex >= 0) { @@ -478,7 +478,7 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, supportingItems, - false, + false ); } } diff --git a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.spec.js b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.spec.js index 6160fda13..123b93c09 100644 --- a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.spec.js +++ b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.spec.js @@ -117,7 +117,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => { //Assert expect(wrapper.vm.supplementalInformationBlock).toEqual( - mockCmsContent[mobileCmsWidgetName]["BodyText"], + mockCmsContent[mobileCmsWidgetName]["BodyText"] ); }); @@ -136,7 +136,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => { //Assert expect(wrapper.vm.supplementalInformationBlock).toEqual( - mockCmsContent[mobileCmsWidgetName]["BodyText"], + mockCmsContent[mobileCmsWidgetName]["BodyText"] ); }); @@ -199,7 +199,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => { //Assert expect(wrapper.vm.supplementalInformationBlock).toEqual( - mockCmsContent[dropOffWidgetName]["BodyText"], + mockCmsContent[dropOffWidgetName]["BodyText"] ); }); @@ -230,7 +230,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => { //Assert expect(wrapper.vm.supplementalInformationBlock).toEqual( - mockCmsContent[overnightDropOffCmsWidgetName]["BodyText"], + mockCmsContent[overnightDropOffCmsWidgetName]["BodyText"] ); }); @@ -279,7 +279,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => { //Assert expect(wrapper.vm.supplementalInformationBlock).toEqual( - mockCmsContent[sameDayDropOffCmsWidgetName]["BodyText"], + mockCmsContent[sameDayDropOffCmsWidgetName]["BodyText"] ); }); }); @@ -331,7 +331,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => { //Assert expect(wrapper.vm.disclaimerTextBlockCopy).toEqual( - mockCmsContent[sameDayDropOffCmsWidgetName]["FooterText"], + mockCmsContent[sameDayDropOffCmsWidgetName]["FooterText"] ); }); @@ -362,7 +362,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => { //Assert expect(wrapper.vm.disclaimerTextBlockCopy).toEqual( - mockCmsContent[dropOffWidgetName]["FooterText"], + mockCmsContent[dropOffWidgetName]["FooterText"] ); }); @@ -393,7 +393,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => { //Assert expect(wrapper.vm.disclaimerTextBlockCopy).toEqual( - mockCmsContent[overnightDropOffCmsWidgetName]["FooterText"], + mockCmsContent[overnightDropOffCmsWidgetName]["FooterText"] ); }); @@ -473,7 +473,7 @@ describe("time-slot-modal-question.vue Duration", () => { //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[sameDayDropOffCmsWidgetName]["SubheaderText"], + mockCmsContent[sameDayDropOffCmsWidgetName]["SubheaderText"] ); }); @@ -505,7 +505,7 @@ describe("time-slot-modal-question.vue Duration", () => { //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[overnightDropOffCmsWidgetName]["SubheaderText"], + mockCmsContent[overnightDropOffCmsWidgetName]["SubheaderText"] ); }); @@ -536,7 +536,7 @@ describe("time-slot-modal-question.vue Duration", () => { }); //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[dropoffCmsWidgetName]["SubheaderText"], + mockCmsContent[dropoffCmsWidgetName]["SubheaderText"] ); }); @@ -568,7 +568,7 @@ describe("time-slot-modal-question.vue Duration", () => { //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[cmsWidgetName]["SubheaderText"] + " 2 - 3 hours", + mockCmsContent[cmsWidgetName]["SubheaderText"] + " 2 - 3 hours" ); }); @@ -588,7 +588,7 @@ describe("time-slot-modal-question.vue Duration", () => { }); //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[cmsWidgetName]["SubheaderText"] + " 60 - 90 minutes", + mockCmsContent[cmsWidgetName]["SubheaderText"] + " 60 - 90 minutes" ); }); @@ -608,7 +608,7 @@ describe("time-slot-modal-question.vue Duration", () => { }); //Assert expect(wrapper.vm.durationTextBlockCopy).toEqual( - mockCmsContent[cmsWidgetName]["SubheaderText"] + " 4 hours", + mockCmsContent[cmsWidgetName]["SubheaderText"] + " 4 hours" ); }); diff --git a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue index b410e8456..a0b5e9f99 100644 --- a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue +++ b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue @@ -137,7 +137,7 @@ export default { const { errorMessage, handleChange, meta, validate, errors } = useField( componentId, props.validationRules, - fieldOptions, + fieldOptions ); return { @@ -162,7 +162,7 @@ export default { return null; } else if (this.appointmentType === AppointmentTypeStrings.MOBILE) { appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes( - PREMIUM_TIME_SLOT_ID_FLAG, + PREMIUM_TIME_SLOT_ID_FLAG ) ? this.mobilePremiumCmsWidgetName : this.mobileCmsWidgetName; @@ -173,44 +173,44 @@ export default { appointmentTypeCmsWidgetName = this.getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( this.selectedRouteCode, - true, + true ); } } return this.getCmsContent( appointmentTypeCmsWidgetName, - cmsWidgetFieldMappings.SUPPLEMENTAL_INFORMATION, + cmsWidgetFieldMappings.SUPPLEMENTAL_INFORMATION ); }, footerCloseButtonText() { return this.getCmsContent( this.cmsWidgetName, - cmsWidgetFieldMappings.MODAL_CLOSE_BUTTON, + cmsWidgetFieldMappings.MODAL_CLOSE_BUTTON ); }, premiumAppointmentButtonText() { return this.getCmsContent( this.mobilePremiumCmsWidgetName, - cmsWidgetFieldMappings.TIME_SLOT_BUTTON, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON ); }, dropoffButtonText() { return this.getCmsContent( this.dropoffCmsWidgetName, - cmsWidgetFieldMappings.TIME_SLOT_BUTTON, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON ); }, sameDayDropoffButtonText() { return this.getCmsContent( this.sameDayDropOffCmsWidgetName, - cmsWidgetFieldMappings.TIME_SLOT_BUTTON, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON ); }, overnightDropoffButtonText() { return this.getCmsContent( this.overnightDropOffCmsWidgetName, - cmsWidgetFieldMappings.TIME_SLOT_BUTTON, + cmsWidgetFieldMappings.TIME_SLOT_BUTTON ); }, dropoffDisclaimerText() { @@ -219,13 +219,13 @@ export default { sameDayDropOffDisclaimerText() { return this.getCmsContent( this.sameDayDropOffCmsWidgetName, - cmsWidgetFieldMappings.DISCLAIMER, + cmsWidgetFieldMappings.DISCLAIMER ); }, overnightDropOffDisclaimerText() { return this.getCmsContent( this.overnightDropOffCmsWidgetName, - cmsWidgetFieldMappings.DISCLAIMER, + cmsWidgetFieldMappings.DISCLAIMER ); }, disclaimerTextBlockCopy() { @@ -251,24 +251,24 @@ export default { sameDayDropoffDurationText() { return this.getCmsContent( this.sameDayDropOffCmsWidgetName, - cmsWidgetFieldMappings.DURATION, + cmsWidgetFieldMappings.DURATION ); }, overnightDropoffDurationText() { return this.getCmsContent( this.overnightDropOffCmsWidgetName, - cmsWidgetFieldMappings.DURATION, + cmsWidgetFieldMappings.DURATION ); }, inshopDurationText() { const inshopDurationTextWithoutTime = this.getCmsContent( this.cmsWidgetName, - cmsWidgetFieldMappings.DURATION, + cmsWidgetFieldMappings.DURATION ); const inshopDurationTime = getDisplayTextForDurationLength( this.estimatedServiceMinutesMinimum, - this.estimatedServiceMinutesMaximum, + this.estimatedServiceMinutesMaximum ); return `${inshopDurationTextWithoutTime} ${inshopDurationTime}`; @@ -322,7 +322,7 @@ export default { if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) { return this.getAvailableTimeSlotsForDropOff( - this.timeSlotsForSelectedDate.timeSlots, + this.timeSlotsForSelectedDate.timeSlots ); } else if (this.appointmentType === AppointmentTypeStrings.MOBILE) { return this.getAvailableTimeSlotsForMobile(this.timeSlotsForSelectedDate.timeSlots); @@ -349,13 +349,13 @@ export default { async setSelectedTimeSlot() { this.$emit( "update:modelValue", - this.getSelectedTimeSlotInfoObject(this.selectedRouteCode), + this.getSelectedTimeSlotInfoObject(this.selectedRouteCode) ); this.$emit("TimeSlotSelected"); }, getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( selectedRouteCode, - isSameDayRelevant = false, + isSameDayRelevant = false ) { if (selectedRouteCode.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { return this.overnightDropOffCmsWidgetName; @@ -396,7 +396,7 @@ export default { getAvailableTimeSlotsForMobile(timeSlotsForSelectedDate) { const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => { const readableTime = `${militaryToTwelveHourTime( - timeSlot.startTime, + timeSlot.startTime )} - ${militaryToTwelveHourTime(timeSlot.endTime)}`; return { value: timeSlot.id, @@ -409,7 +409,7 @@ export default { this.premiumAppointmentFee?.partType === PREMIUM_FEE_PART_TYPE; if (isPremiumTimeSlot && hasPremiumPartAvailable) { availableTimeSlots.unshift( - this.getPremiumAppointmentTimeSlot(timeSlotsForSelectedDate[0]), + this.getPremiumAppointmentTimeSlot(timeSlotsForSelectedDate[0]) ); } @@ -437,7 +437,7 @@ export default { if (this.modelValue?.isPremiumAppointment) { selectedRouteCode = this.addPremiumFlagToInput( - this.modelValue?.timeSlot?.routeCode, + this.modelValue?.timeSlot?.routeCode ); } else { selectedRouteCode = this.modelValue?.timeSlot?.routeCode; @@ -464,7 +464,7 @@ export default { } const timeSlot = this.timeSlotsForSelectedDate?.timeSlots?.find( - (timeSlot) => timeSlot.id == routeCode, + (timeSlot) => timeSlot.id == routeCode ); if (timeSlot) { diff --git a/src/layouts/service-location/classes/provider-address.js b/src/layouts/service-location/classes/provider-address.js index 0cca409f4..52f24109a 100644 --- a/src/layouts/service-location/classes/provider-address.js +++ b/src/layouts/service-location/classes/provider-address.js @@ -4,7 +4,7 @@ export class ProviderAddress { city = null, state = null, zipCode = null, - zipCodeCtu = null, + zipCodeCtu = null ) { this.streetAddress = streetAddress; this.city = city; diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 45f6fed45..e92349ddf 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -13,7 +13,7 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) { storeActions.GET_MOBILE_FEE_PART, null, pageNameToLog, - false, + false ); if ( @@ -33,7 +33,7 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) { serviceZipCodeCtu: zipCodeData.zipCodeCtu, }, pageNameToLog, - false, + false ); return Promise.resolve(pricingResults[0]); @@ -48,7 +48,7 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems, pageNa lineItems: lineItems, }, pageNameToLog, - false, + false ); return Promise.resolve(serviceabilityDetails); @@ -60,7 +60,7 @@ export async function getShopProviderData(serviceZipCode) { { serviceZipCode: serviceZipCode, }, - "service-location", + "service-location" ); return Promise.resolve(shopProviderData); @@ -70,7 +70,7 @@ export async function getAvailabilityRating( startDate, endDate, shopAppointmentType, - providerNumber, + providerNumber ) { // For a given shop provider number and date range, get the appointment time slots available const shopTimeSlots = await baseMixin.methods.dispatchStoreActionWithLogging( @@ -82,7 +82,7 @@ export async function getAvailabilityRating( shopAppointmentType: shopAppointmentType, }, "service-location", - false, + false ); const numberOfDaysToEvaluate = 2; diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js index 2ab61e9b3..5bb41c657 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js @@ -255,7 +255,7 @@ describe("service-location-helper.js", () => { serviceZipCode, damageType, parentAccountNumber, - billToAccountNumber, + billToAccountNumber ); // Assert @@ -283,7 +283,7 @@ describe("service-location-helper.js", () => { serviceZipCode, damageType, parentAccountNumber, - billToAccountNumber, + billToAccountNumber ); // Assert @@ -321,7 +321,7 @@ describe("service-location-helper.js", () => { "2023-06-30", "2023-07-06", "Inshop", - providerNumber, + providerNumber ); // Assert @@ -337,7 +337,7 @@ describe("service-location-helper.js", () => { "2023-06-30", "2023-07-06", "Inshop", - providerNumber, + providerNumber ); // Assert 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 1a85bb938..56833dbaa 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 @@ -125,7 +125,7 @@ jest.mock( getServiceabilityDetails: jest.fn((mockServiceZipCode) => { return mockGetServiceabilityDetails(mockServiceZipCode); }), - }), + }) ); describe("mobile-location-modal-questions.vue", () => { @@ -156,7 +156,7 @@ describe("mobile-location-modal-questions.vue", () => { // Assert expect(wrapper.vm.internalModel.addressQuestions.streetAddress).toEqual("555 Some St"); expect(wrapper.vm.internalModel.addressQuestions.apartmentNumberOrBusinessName).toEqual( - "Apt 1", + "Apt 1" ); expect(wrapper.vm.internalModel.addressQuestions.city).toEqual("Funkytown"); expect(wrapper.vm.internalModel.addressQuestions.state).toEqual("OH"); 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 1d9e9ad1f..4bdc00cb3 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 @@ -118,7 +118,7 @@ export default { const { errorMessage, handleChange, meta, validate, errors } = useField( componentId, props.validationRules, - fieldOptions, + fieldOptions ); return { @@ -242,7 +242,7 @@ export default { // Validate the Zip Code const zipCodeData = await this.getZipCodeData( this.internalModel.addressQuestions.zipCode, - "service-location", + "service-location" ); if (!zipCodeData.isValid) { @@ -256,14 +256,14 @@ export default { const serviceZipCode = this.internalModel.addressQuestions.zipCode; const mobileFeePart = await getPricedMobileFeePart( serviceZipCode, - "service-location", + "service-location" ); // retrieve serviceability details const serviceabilityDetails = await getServiceabilityDetails( serviceZipCode, null, - "service-location", + "service-location" ); // update content related to service zip code diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index cb3796284..eea946b89 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -68,7 +68,7 @@ jest.mock( getShopProviderData: jest.fn((mockServiceZipCode) => { return mockGetShopProviderData(mockServiceZipCode); }), - }), + }) ); jest.spyOn(baseMixin.methods, "getZipCodeData").mockImplementation((serviceZipCode) => { @@ -221,7 +221,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -458,7 +458,7 @@ describe("service-location.vue", () => { // Act mobileLocationQuestionsComponent.vm.$emit( "update:modelValue", - newMobileLocationQuestions, + newMobileLocationQuestions ); // Assert @@ -527,7 +527,7 @@ describe("service-location.vue", () => { // Act mobileLocationQuestionsComponent.vm.$emit( "update:modelValue", - newMobileLocationQuestions, + newMobileLocationQuestions ); // Assert @@ -596,7 +596,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -623,7 +623,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -650,7 +650,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -677,7 +677,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -704,7 +704,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -732,7 +732,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -760,7 +760,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -788,7 +788,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -816,7 +816,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -844,7 +844,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -872,7 +872,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -900,7 +900,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -928,7 +928,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -956,7 +956,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -984,7 +984,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1015,7 +1015,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1042,7 +1042,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1069,7 +1069,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1097,7 +1097,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1125,7 +1125,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1153,7 +1153,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); // Assert @@ -1183,7 +1183,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertMobileOnly" }); @@ -1211,7 +1211,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertMobileOnly" }); @@ -1239,7 +1239,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertNoShops" }); @@ -1267,7 +1267,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertNoShops" }); @@ -1295,7 +1295,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertInshopOnly" }); @@ -1323,7 +1323,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertInshopOnly" }); @@ -1351,7 +1351,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertInshopComponent = wrapper.findComponent({ ref: "alertInshopOnly" }); @@ -1381,7 +1381,7 @@ describe("service-location.vue", () => { wrapper.vm, { query: { fmgPage: "serviceLocation" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const alertComponent = wrapper.findComponent({ ref: "alertRecalNoMobile" }); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index a65a97641..f9a2ec240 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -202,13 +202,13 @@ export default { const serviceZipCode = store.getters.order.serviceLocation.zipCode; const zipCodeDataPromise = baseMixin.methods.getZipCodeData( serviceZipCode, - "service-location", + "service-location" ); const serviceabilityDetailsPromise = getServiceabilityDetails( serviceZipCode, null, - "service-location", + "service-location" ); const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location"); @@ -248,7 +248,7 @@ export default { resultMap.zipCodeData, resultMap.serviceabilityDetails, resultMap.mobileFeePart, - resultMap.shopProviderData, + resultMap.shopProviderData ); }); }, @@ -293,7 +293,7 @@ export default { getShopProviderData(newValue.addressQuestions.zipCode).then((result) => { this.shopProviderData = result.data; this.selectedProvider = new Provider( - this.shopProviderData.mobileProviderNumber, + this.shopProviderData.mobileProviderNumber ); }); } @@ -393,7 +393,7 @@ export default { ":" + store.getters.order.policy.policyNumber + ":" + - store.getters.order.serviceLocation.zipCode, + store.getters.order.serviceLocation.zipCode ); return false; } @@ -408,7 +408,7 @@ export default { "cash: servce-location invalid prereq:" + JSON.stringify(store.getters.lineItems.supportingItems) + ":" + - store.getters.order.serviceLocation.zipCode, + store.getters.order.serviceLocation.zipCode ); return false; } @@ -503,7 +503,7 @@ export default { } else { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, - this.$route, + this.$route ); } }, @@ -518,7 +518,7 @@ export default { // if we have a mobile fee, then save/update supporting items if (this.selectedAppointmentType == "Mobile") { const mobileFeeIndex = supportingItems.findIndex( - (item) => item.partType == MOBILE_FEE_PART_TYPE, + (item) => item.partType == MOBILE_FEE_PART_TYPE ); // If it already exists, update the price with latest data if (mobileFeeIndex >= 0) { @@ -532,12 +532,12 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, supportingItems, - false, + false ); } else { // if it's not a mobile, then make sure we remove any that may have been added const removeMobileFeeIndex = supportingItems?.findIndex( - (item) => item.partType == MOBILE_FEE_PART_TYPE, + (item) => item.partType == MOBILE_FEE_PART_TYPE ); if (removeMobileFeeIndex >= 0) { @@ -545,7 +545,7 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING, supportingItems, - false, + false ); } } @@ -599,7 +599,7 @@ export default { }, }, }, - false, + false ); this.updateAndSaveSupportingItems(); @@ -617,7 +617,7 @@ export default { this.shopProviderData = result.data; if (this.selectedAppointmentType === "Mobile") { this.selectedProvider = new Provider( - this.shopProviderData.mobileProviderNumber, + this.shopProviderData.mobileProviderNumber ); } else { this.selectedProvider = new Provider(); @@ -630,7 +630,7 @@ export default { handler(newValue) { if (newValue === "Mobile") { this.selectedProvider = new Provider( - this.shopProviderData.mobileProviderNumber, + this.shopProviderData.mobileProviderNumber ); } else { this.selectedProvider = new Provider(); 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 7b4face84..7c09836fe 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 @@ -51,7 +51,7 @@ jest.mock( getServiceabilityDetails: jest.fn((mockServiceZipCode) => { return mockGetServiceabilityDetails(mockServiceZipCode); }), - }), + }) ); const linkWidgetName = "linkWidgetName"; 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 9e6855806..841dfe153 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 @@ -140,7 +140,7 @@ export default { const zipCodeData = await this.getZipCodeData( this.internalModel.zipCode, - "service-location", + "service-location" ); if (!zipCodeData.isValid) { @@ -155,14 +155,14 @@ export default { const serviceZipCode = this.internalModel.zipCode; const mobileFeePart = await getPricedMobileFeePart( serviceZipCode, - "service-location", + "service-location" ); // retrieve serviceability details const serviceabilityDetails = await getServiceabilityDetails( serviceZipCode, null, - "service-location", + "service-location" ); // update content related to service zip code diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index bed3e4c67..13ae42095 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -78,7 +78,7 @@ export default { displayAvailabilityIndicators() { return experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_AVAILABILITY_INDICATORS, - "true", + "true" ); }, isLoaderDisplayed() { diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index c9f906c05..7118ab985 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -418,7 +418,7 @@ describe("shop-question.vue", () => { }); displayedAnswers.forEach( - (answer) => (answer.additionalButtonData = wrapper.vm.additionalButtonData), + (answer) => (answer.additionalButtonData = wrapper.vm.additionalButtonData) ); // Act diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index ba26b8f21..1b4d7dea8 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -193,7 +193,7 @@ export default { }, getSelectedProviderIndex(providers, selectedProviderNumber) { const index = providers.findIndex( - (provider) => provider.providerNumber == selectedProviderNumber, + (provider) => provider.providerNumber == selectedProviderNumber ); return index; @@ -219,7 +219,7 @@ export default { await nextTick(); const selectedShopIndex = this.getSelectedProviderIndex( newValue, - this.selectedProviderNumber, + this.selectedProviderNumber ); if (selectedShopIndex >= 3) { diff --git a/src/layouts/service-zip/service-zip.spec.js b/src/layouts/service-zip/service-zip.spec.js index 5dac761b6..96cde148f 100644 --- a/src/layouts/service-zip/service-zip.spec.js +++ b/src/layouts/service-zip/service-zip.spec.js @@ -276,7 +276,7 @@ describe("service-zip.vue", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith( navigationScenarios.CLICKED_BACK_WITH_SKIP_VIN, - wrapper.vm.$route, + wrapper.vm.$route ); }); @@ -292,7 +292,7 @@ describe("service-zip.vue", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toBeCalledWith( navigationScenarios.CLICKED_BACK, - wrapper.vm.$route, + wrapper.vm.$route ); }); }); @@ -317,7 +317,7 @@ describe("service-zip.vue", () => { // Assert expect(wrapper.vm.$router.navigateWithSaving).toBeCalledWith( navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, - wrapper.vm.$route, + wrapper.vm.$route ); expect(wrapper.vm.navigateForwardWithSingleCarMatch).not.toBeCalled(); }); @@ -429,7 +429,7 @@ describe("service-zip.vue", () => { wrapper.vm, { query: { fmgPage: "service-zip" } }, undefined, - nextFunction, + nextFunction ); expect(nextFunction).toHaveBeenCalled(); expect(wrapper.vm.forwardButtonAction).toHaveBeenCalled(); @@ -455,7 +455,7 @@ describe("service-zip.vue", () => { wrapper.vm, { query: { fmgPage: "service-zip" } }, undefined, - nextFunction, + nextFunction ); expect(wrapper.vm.forwardButtonAction).not.toHaveBeenCalled(); }); diff --git a/src/layouts/service-zip/service-zip.vue b/src/layouts/service-zip/service-zip.vue index 48cbb10c7..b8f29c817 100644 --- a/src/layouts/service-zip/service-zip.vue +++ b/src/layouts/service-zip/service-zip.vue @@ -100,8 +100,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); @@ -165,12 +165,12 @@ export default { if (skipVin) { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK_WITH_SKIP_VIN, - this.$route, + this.$route ); } else { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, - this.$route, + this.$route ); } }, @@ -184,7 +184,7 @@ export default { state: zipCodeData.state, zipCodeCtu: zipCodeData.zipCodeCtu, }, - false, + false ); if (!zipCodeData.isValid) { @@ -224,7 +224,7 @@ export default { const supportingItemsPromise = await this.dispatchStoreActionWithLogging( storeActions.GET_SUPPORTING_ITEMS, null, - "estimate", + "estimate" ); const promiseResultMap = [ @@ -239,14 +239,14 @@ export default { this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS, resultMap.supportingItems, - false, + false ); // call saveSession here - navigateWithSaving saves too late in the flow await saveSession({ pageNameToLog: "estimate" }); return this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, - this.$route, + this.$route ); } else { // if we're skipping the vin-lookup but it's not a repair, we still need to get the parts @@ -258,7 +258,7 @@ export default { AlertNonServiceableZipHeader() { return this.getCmsContent("AlertNonServiceableZipWidget", "HeadlineText").replaceAll( "{custom:serviceZip}", - this.serviceZipCode, + this.serviceZipCode ); }, AlertNonServiceableZipBody() { diff --git a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.spec.js b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.spec.js index f29b15753..fe0827be8 100644 --- a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.spec.js +++ b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.spec.js @@ -7,7 +7,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("damage-location-question.vue", () => { @@ -44,7 +44,7 @@ describe("damage-location-question.vue", () => { damageLocationQuestion.methods.initializeComponent.call( wrapper.vm, damageOptions, - "car-group", + "car-group" ); //Assert diff --git a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js index 4b5eab460..8b1544af8 100644 --- a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js +++ b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("replace-options-question.vue", () => { @@ -38,7 +38,7 @@ describe("replace-options-question.vue", () => { replaceOptionsQuestion.methods.initializeComponent.call( wrapper.vm, replaceOptions, - "car-group", + "car-group" ); //Assert @@ -84,7 +84,7 @@ describe("replace-options-question.vue", () => { wrapper.vm, cmsContent, replaceOptions, - "car-group", + "car-group" ); wrapper.vm.$options.watch.isAvailable.call(wrapper.vm, true); diff --git a/src/layouts/vehicle-damage/side-door-options/side-door-options.spec.js b/src/layouts/vehicle-damage/side-door-options/side-door-options.spec.js index b6627cbe0..e3fb8803b 100644 --- a/src/layouts/vehicle-damage/side-door-options/side-door-options.spec.js +++ b/src/layouts/vehicle-damage/side-door-options/side-door-options.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("replace-options-question.vue", () => { @@ -88,7 +88,7 @@ describe("replace-options-question.vue", () => { passengerSideReplaceOptions, driverSideOptions, passengerSideOptions, - "car-group", + "car-group" ); //Assert diff --git a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue index 04904e13f..39818c5f5 100644 --- a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue +++ b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue @@ -53,7 +53,7 @@ defineRule("damage-side-required", required(errorMessages.DAMAGE_SIDE_REQUIRED)) defineRule("driver-side-options-required", required(errorMessages.DRIVER_SIDE_OPTIONS_REQUIRED)); defineRule( "passenger-side-options-required", - required(errorMessages.PASSENGER_SIDE_OPTIONS_REQUIRED), + required(errorMessages.PASSENGER_SIDE_OPTIONS_REQUIRED) ); export default { @@ -72,7 +72,7 @@ export default { getSideDoorReplacementOptions( selectedDoorSides, selectedDriverSideReplaceOptions, - selectedPassengerSideReplaceOptions, + selectedPassengerSideReplaceOptions ) { return { selectedDoorSides: selectedDoorSides, @@ -104,7 +104,7 @@ export default { this.selectedValues = this.getSideDoorReplacementOptions( newValue, this.selectedValues.selectedDriverSideReplaceOptions, - this.selectedValues.selectedPassengerSideReplaceOptions, + this.selectedValues.selectedPassengerSideReplaceOptions ); }, }, @@ -116,7 +116,7 @@ export default { this.selectedValues = this.getSideDoorReplacementOptions( this.selectedValues.selectedDoorSides, newValue, - this.selectedValues.selectedPassengerSideReplaceOptions, + this.selectedValues.selectedPassengerSideReplaceOptions ); }, }, @@ -128,7 +128,7 @@ export default { this.selectedValues = this.getSideDoorReplacementOptions( this.selectedValues.selectedDoorSides, this.selectedValues.selectedDriverSideReplaceOptions, - newValue, + newValue ); }, }, diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js index 82de59c64..b490114da 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.spec.js +++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js @@ -86,7 +86,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.backButtonAction(); @@ -190,7 +190,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.isFormValid = jest.fn(); @@ -202,7 +202,7 @@ describe("vehicle-damage.vue", () => { expect(baseMixin.methods.dispatchStoreActionWithLogging).toBeCalledWith( storeActions.GET_DAMAGE_OPTIONS, { carId: "C00000000" }, - "vehicle-damage", + "vehicle-damage" ); }); @@ -292,7 +292,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.isFormValid = jest.fn(); await wrapper.vm.forwardButtonAction(); @@ -303,7 +303,7 @@ describe("vehicle-damage.vue", () => { expect(baseMixin.methods.dispatchStoreActionWithLogging).toBeCalledWith( storeActions.GET_DAMAGE_OPTIONS, { carId: "C00000000" }, - "vehicle-damage", + "vehicle-damage" ); }); }); @@ -363,7 +363,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["Windshield"]; @@ -381,7 +381,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["Sidedoor"]; @@ -399,7 +399,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["RearWindow"]; @@ -417,7 +417,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["Windshield"]; @@ -436,7 +436,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["SideDoor"]; @@ -455,7 +455,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["Sidedoor"]; @@ -474,7 +474,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.selectedDamageLocations = ["Sidedoor"]; @@ -494,7 +494,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -516,7 +516,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); const testNull = validate("", "replace-options-required"); const testString = validate("sldfj", "replace-options-required"); @@ -548,7 +548,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.getters = { @@ -567,7 +567,7 @@ describe("vehicle-damage.vue", () => { //Assert expect(glassSelections).toEqual(expectedGlass); - }, + } ); const storeWindshieldOptions = [ @@ -627,7 +627,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.getters = { @@ -649,7 +649,7 @@ describe("vehicle-damage.vue", () => { //Assert expect(windshieldSelections).toEqual(expectedWindshieldOptions); - }, + } ); const driverDoorSides = [ @@ -669,7 +669,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.getters = { @@ -690,7 +690,7 @@ describe("vehicle-damage.vue", () => { //Assert expect(glassSelections).toEqual(expectedGlass); - }, + } ); const passengerDoorSides = [ @@ -710,7 +710,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.getters = { @@ -731,7 +731,7 @@ describe("vehicle-damage.vue", () => { //Assert expect(glassSelections).toEqual(expectedGlass); - }, + } ); const rearReplaceOptions = [ @@ -749,7 +749,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.getters = { @@ -770,7 +770,7 @@ describe("vehicle-damage.vue", () => { //Assert expect(glassSelections).toEqual(expectedGlass); - }, + } ); }); describe("hide back button", () => { @@ -832,7 +832,7 @@ describe("vehicle-damage.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-damage" } }, undefined, - nextFunction, + nextFunction ); await nextTick(); expect(nextFunction).toHaveBeenCalled(); @@ -868,7 +868,7 @@ function setupMocks({ pageHeaderWidgetHeaderText, mountOptionsMockData, funnelCo // Combine parameters with default values pageHeaderWidgetHeaderText = Object.assign( pageHeaderWidgetHeaderTextDefault, - pageHeaderWidgetHeaderText, + pageHeaderWidgetHeaderText ); mountOptionsMockData = Object.assign(mountOptionsMockDataDefault, mountOptionsMockData); //Mock api responses diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 5e0d29682..5744597e4 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -119,7 +119,7 @@ export default { const damageOptionsPromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_DAMAGE_OPTIONS, { carId: store.getters.vehicle.carId }, - "vehicle-damage", + "vehicle-damage" ); // Settle promises and get results @@ -142,13 +142,13 @@ export default { vm.$refs.damageLocation.initializeComponent(resultMap.damageOptions); vm.$refs.sideDoorOptions.initializeComponent( resultMap.damageOptions.driverSideOptions.availableReplacementOptions, - resultMap.damageOptions.passengerSideOptions.availableReplacementOptions, + resultMap.damageOptions.passengerSideOptions.availableReplacementOptions ); vm.$refs.windshieldOptions.initializeComponent( - resultMap.damageOptions.windshieldOptions.availableReplacementOptions, + resultMap.damageOptions.windshieldOptions.availableReplacementOptions ); vm.$refs.backGlassOptions.initializeComponent( - resultMap.damageOptions.backGlassOptions.availableReplacementOptions, + resultMap.damageOptions.backGlassOptions.availableReplacementOptions ); if (store.getters.isExternalParameter) { await nextTick(); @@ -191,7 +191,7 @@ export default { this.GaCategories.EVOX, `${this.GaActions.VIF}_${this.$store.getters.vehicle.imageVifNumber}`, this.$store.getters.vehicle.carId, - true, + true ); } }, @@ -270,7 +270,7 @@ export default { windShieldOptions.selectedWindshieldDamageType = damageLocationsSelected.REPLACE; windShieldOptions.selectedWindshieldReplaceOptions.push( - damageLocationsSelected.SINGLE, + damageLocationsSelected.SINGLE ); } @@ -285,7 +285,7 @@ export default { windShieldOptions.selectedWindshieldDamageType = damageLocationsSelected.REPLACE; windShieldOptions.selectedWindshieldReplaceOptions.push( - damageLocationsSelected.DRIVER, + damageLocationsSelected.DRIVER ); } @@ -300,7 +300,7 @@ export default { windShieldOptions.selectedWindshieldDamageType = damageLocationsSelected.REPLACE; windShieldOptions.selectedWindshieldReplaceOptions.push( - damageLocationsSelected.PASSENGER, + damageLocationsSelected.PASSENGER ); } } @@ -355,7 +355,7 @@ export default { getRearReplaceOptionsFromStore() { var rearReplaceOptions = store.getters.damage.glassToReplace?.filter( - (glass) => glass.glassLocation === damageLocationsSelected.REAR, + (glass) => glass.glassLocation === damageLocationsSelected.REAR )[0]?.glassName; return rearReplaceOptions; @@ -370,19 +370,19 @@ export default { selectedWindshieldChipCount: this.selectedWindshieldOptions.selectedWindshieldChipCount, }, - false, + false ); if (this.isWindshieldRepair) { const supportingItems = await this.dispatchStoreActionWithLogging( storeActions.GET_SUPPORTING_ITEMS, null, - "vehicle-damage", + "vehicle-damage" ); this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS, supportingItems.data, - false, + false ); } @@ -405,20 +405,20 @@ export default { if (skipVin) { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_SKIP_VIN, - this.$route, + this.$route ); } else { if (store.getters.damage.isRepair) { this.$router.navigateWithSaving( this.navigationScenarios .CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE, - this.$route, + this.$route ); } else { this.$router.navigateWithSaving( this.navigationScenarios .CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE, - this.$route, + this.$route ); } } @@ -427,17 +427,17 @@ export default { else if (store.getters.vehicle.vin) { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, - this.$route, + this.$route ); } else if (skipVin) { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_SKIP_VIN, - this.$route, + this.$route ); } else { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN, - this.$route, + this.$route ); } }, @@ -451,7 +451,7 @@ export default { glassLocation: damageLocationsSelected.WINDSHIELD, glassName: wsItem, }); - }, + } ); } @@ -471,7 +471,7 @@ export default { glassLocation: damageLocationsSelected.PASSENGER, glassName: passengerItem, }); - }, + } ); } @@ -545,7 +545,7 @@ export default { selectedSingleWindshield.toUpperCase() === damageLocationsSelected.SINGLE.toUpperCase() ); - }, + } ) && (this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( (selectedDriverWindshield) => { @@ -553,7 +553,7 @@ export default { selectedDriverWindshield.toUpperCase() === damageLocationsSelected.DRIVER.toUpperCase() ); - }, + } ) || this.selectedWindshieldOptions.selectedWindshieldReplaceOptions?.some( (selectedPassengerWindshield) => { @@ -561,7 +561,7 @@ export default { selectedPassengerWindshield.toUpperCase() === damageLocationsSelected.PASSENGER.toUpperCase() ); - }, + } )) ); }, diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js index 575dec2ec..902e0808a 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js +++ b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("windshield-chip-count-question.vue", () => { diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js index 0a9e4c5a1..f5ccbce06 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js +++ b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("windshield-damage-type-question.vue", () => { diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue index 4c5a25c48..b878e5380 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue +++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue @@ -52,15 +52,15 @@ import { damageLocationsSelected } from "@/constants/damage-locations-selected.j // DEFINE VALIDATION RULES defineRule( "windshield-damage-type-required", - required(errorMessages.WINDSHIELD_DAMAGE_TYPE_REQUIRED), + required(errorMessages.WINDSHIELD_DAMAGE_TYPE_REQUIRED) ); defineRule( "windshield-chip-count-required", - required(errorMessages.WINDSHIELD_CHIP_COUNT_REQUIRED), + required(errorMessages.WINDSHIELD_CHIP_COUNT_REQUIRED) ); defineRule( "windshield-replace-options-required", - required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED), + required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED) ); defineRule( @@ -72,7 +72,7 @@ defineRule( !selectedDamageLocations[0]?.includes(damageLocationsSelected.WINDSHIELD)) || selectedDamageLocations[0].length === 1 ); - }, + } ); defineRule("repair-only", (value) => { return value.toString() === damageLocationsSelected.REPAIR; @@ -111,13 +111,13 @@ export default { initializeComponent(windshieldAvailableReplacementOptions) { this.windshieldAvailableReplacementOptions = windshieldAvailableReplacementOptions; this.$refs.replaceOptionsQuestion.initializeComponent( - windshieldAvailableReplacementOptions, + windshieldAvailableReplacementOptions ); }, getWindshieldOptions( selectedWindshieldDamageType, selectedWindshieldChipCount, - selectedWindshieldReplaceOptions, + selectedWindshieldReplaceOptions ) { // ONLY UPDATE THE NEW VALUE IF IT IS TRUTHY (NOT NULL) return { @@ -160,7 +160,7 @@ export default { this.selectedValues = this.getWindshieldOptions( this.selectedWindshieldDamageTypeValue, newValue, - null, + null ); }, }, @@ -172,14 +172,14 @@ export default { this.selectedValues = this.getWindshieldOptions( this.selectedWindshieldDamageTypeValue, null, - newValue, + newValue ); }, }, isWindshieldDamageLocation() { return this.selectedDamageLocations.some( (selectedDamageLocation) => - selectedDamageLocation === damageLocationsSelected.WINDSHIELD, + selectedDamageLocation === damageLocationsSelected.WINDSHIELD ); }, isRepairOptionSelected() { diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.spec.js b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.spec.js index bf2e05412..358319d7f 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.spec.js +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); store.getters = { pageData: jest.fn(), @@ -45,11 +45,11 @@ describe("glass-part-question.vue", () => { //Assert expect(Object.keys(wrapper.vm.featureListData).length).toBe(2); expect(wrapper.vm.featureListData["Green Tint"][0].Text).toBe( - "heated glass, solar, 1 hole", + "heated glass, solar, 1 hole" ); expect(wrapper.vm.featureListData["Green Tint"][0].Name).toBe("DB12209GTYN"); expect(wrapper.vm.featureListData["Gray Tint Privacy"][0].Text).toBe( - "heated glass, solar, 1 hole", + "heated glass, solar, 1 hole" ); expect(wrapper.vm.featureListData["Gray Tint Privacy"][0].Name).toBe("DB12209YPYN"); }); @@ -257,7 +257,7 @@ describe("glass-part-question.vue", () => { // Assert expect(expectedResults).toEqual(wrapper.vm.partsForSelectedTint); - }, + } ); }); 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 63e508781..280edfc6c 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 @@ -90,7 +90,7 @@ export default { colorQuestionText() { return getCustomTransformValue( this.glassColorQuestion, - `${this.glassLocation} ${this.glassName}`, + `${this.glassLocation} ${this.glassName}` ); }, @@ -113,7 +113,7 @@ export default { set(newValue) { this.$emit( "update:modelValue", - this.partsForSelectedTint.filter((part) => part.partNumber == newValue)[0], + this.partsForSelectedTint.filter((part) => part.partNumber == newValue)[0] ); }, }, @@ -122,7 +122,7 @@ export default { const matchingGlass = this.PartDataFromApi.partsOrQuestions?.filter( (dataForGlassLocationAndName) => dataForGlassLocationAndName.glassName == this.glassName && - dataForGlassLocationAndName.glassLocation == this.glassLocation, + dataForGlassLocationAndName.glassLocation == this.glassLocation ); const matchingGlassParts = matchingGlass?.length == 1 ? matchingGlass[0].parts : []; return matchingGlassParts.filter((part) => part.color == this.selectedTint) ?? []; diff --git a/src/layouts/vehicle-parts/vehicle-parts.spec.js b/src/layouts/vehicle-parts/vehicle-parts.spec.js index a819487ec..3b6ede356 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.spec.js +++ b/src/layouts/vehicle-parts/vehicle-parts.spec.js @@ -34,7 +34,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); store.getters = { @@ -101,7 +101,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); wrapper.vm.setCmsContent = jest.fn(); @@ -140,7 +140,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); @@ -178,7 +178,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await nextTick(); @@ -245,7 +245,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.dispatch = jest.fn(() => {}); @@ -255,7 +255,7 @@ describe("vehicle-parts.vue", () => { //Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_PART_QUESTIONS, - wrapper.vm.$route, + wrapper.vm.$route ); }); @@ -293,7 +293,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); store.dispatch = jest.fn(() => {}); @@ -302,7 +302,7 @@ describe("vehicle-parts.vue", () => { //Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS, - wrapper.vm.$route, + wrapper.vm.$route ); }); @@ -378,7 +378,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); @@ -445,7 +445,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); @@ -492,7 +492,7 @@ describe("vehicle-parts.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle-parts" } }, undefined, - (c) => c(wrapper.vm), + (c) => c(wrapper.vm) ); await wrapper.vm.forwardButtonAction(); diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 690f8c27b..5361c5e7e 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -100,7 +100,7 @@ export default { vm.$refs[c][0].initializeComponent({ ColorQuestionWidget: resultMap.cmsContent.ColorQuestionWidget, FeatureQuestionWidget: resultMap.cmsContent.FeatureQuestionWidget, - }), + }) ); if (store.getters.isExternalParameter) { baseMixin.methods.ResetExternalParamsAndHideModal(); @@ -183,7 +183,7 @@ export default { const currentPart = this.PartsFromApi.partsOrQuestions[key].parts[partKey]; const isMatched = this.selectedGlassPartNumbers.some( - (p) => p === currentPart.partNumber, + (p) => p === currentPart.partNumber ); if (isMatched) { @@ -204,7 +204,7 @@ export default { await this.dispatchStoreAction( this.storeActions.RESET_MOLDING_AND_CAPABILITY_QUESTIONS_IF_NEEDED, matchedParts, - false, + false ); // Navigate to the next page diff --git a/src/layouts/vehicle/vehicle-question/vehicle-question.spec.js b/src/layouts/vehicle/vehicle-question/vehicle-question.spec.js index ac6100a1f..abdb3f994 100644 --- a/src/layouts/vehicle/vehicle-question/vehicle-question.spec.js +++ b/src/layouts/vehicle/vehicle-question/vehicle-question.spec.js @@ -8,7 +8,7 @@ jest.mock( () => { return {}; }, - { virtual: true }, + { virtual: true } ); describe("vehicle-question.vue", () => { diff --git a/src/layouts/vehicle/vehicle.spec.js b/src/layouts/vehicle/vehicle.spec.js index 6c643c627..8aaab5008 100644 --- a/src/layouts/vehicle/vehicle.spec.js +++ b/src/layouts/vehicle/vehicle.spec.js @@ -113,7 +113,7 @@ describe("vehicle.vue", () => { wrapper.vm, { query: { fmgPage: "vehicle" } }, undefined, - nextFunction, + nextFunction ); await nextTick(); diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 35afd02c7..dbbf8e9c7 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -130,12 +130,12 @@ export default { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); const experimentForLogging = store.getters.applicationUser.experiments.find( - (e) => e.universeName === experimentUniverses.CONCEPT_FUNNEL, + (e) => e.universeName === experimentUniverses.CONCEPT_FUNNEL ); const yearQuestionInitialDataPromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_VEHICLE_YEARS, {}, - "vehicle", + "vehicle" ); var makeQuestionInitialDataPromise = null; var modelQuestionInitialDataPromise = null; @@ -155,7 +155,7 @@ export default { { year: year, }, - "vehicle", + "vehicle" ); modelQuestionInitialDataPromise = baseMixin.methods.dispatchStoreActionWithLogging( @@ -164,7 +164,7 @@ export default { year: year, make: make, }, - "vehicle", + "vehicle" ); styleQuestionInitialDataPromise = baseMixin.methods.dispatchStoreActionWithLogging( @@ -174,7 +174,7 @@ export default { make: make, model: model, }, - "vehicle", + "vehicle" ); } @@ -190,7 +190,7 @@ export default { experiment: experimentForLogging, }, "vehicle", - false, + false ); } @@ -230,17 +230,17 @@ export default { const matchingMake = resultMap.makeQuestionInitialData?.filter( (item) => item.toLowerCase() === - store.getters.externalParameterVehicle.make.toLowerCase(), + store.getters.externalParameterVehicle.make.toLowerCase() ); const matchingModel = resultMap.modelQuestionInitialData?.filter( (item) => item.toLowerCase() === - store.getters.externalParameterVehicle.model.toLowerCase(), + store.getters.externalParameterVehicle.model.toLowerCase() ); const matchingStyle = resultMap.styleQuestionInitialData?.filter( (item) => item.toLowerCase() === - store.getters.externalParameterVehicle.style.toLowerCase(), + store.getters.externalParameterVehicle.style.toLowerCase() ); baseMixin.methods.dispatchStoreAction( storeActions.UPDATE_EXTERNAL_PARAMETER_MMS, @@ -249,7 +249,7 @@ export default { externalParameterModel: matchingModel[0], externalParameterStyle: matchingStyle[0], }, - false, + false ); } } @@ -267,7 +267,7 @@ export default { vm.initializeMMSComponent( resultMap.makeQuestionInitialData, resultMap.modelQuestionInitialData, - resultMap.styleQuestionInitialData, + resultMap.styleQuestionInitialData ); if (store.getters.isExternalParameter) { await vm.getVehicleDetails(); @@ -336,7 +336,7 @@ export default { const result = await this.getStyleOptions( this.selectedYear, this.selectedMake, - model, + model ); if (this.selectedModel == model) { this.styleOptions = result?.data; @@ -417,7 +417,7 @@ export default { model: model, style: style, }, - "vehicle", + "vehicle" ); }, arePagePrerequisitesValid() { @@ -429,7 +429,7 @@ export default { this.selectedYear, this.selectedMake, this.selectedModel, - this.selectedStyle, + this.selectedStyle ); this.carId = result?.data.carId; this.category = result?.data.category; @@ -456,7 +456,7 @@ export default { imageVifNumber: this.imageVifNumber, imageVifColor: this.imageVifColor, }, - false, + false ); this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); }, @@ -489,7 +489,7 @@ export default { { year: year, }, - "vehicle", + "vehicle" ); }, @@ -500,7 +500,7 @@ export default { year: year, make: make, }, - "vehicle", + "vehicle" ); }, @@ -512,7 +512,7 @@ export default { make: make, model: model, }, - "vehicle", + "vehicle" ); }, getImagefromStore() { diff --git a/src/layouts/vin-lookup/vin-lookup.spec.js b/src/layouts/vin-lookup/vin-lookup.spec.js index 03ae4ec1f..39aa0f008 100644 --- a/src/layouts/vin-lookup/vin-lookup.spec.js +++ b/src/layouts/vin-lookup/vin-lookup.spec.js @@ -173,7 +173,7 @@ describe("vin-lookup.vue", () => { navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, wrapper.vm.$route, expect.anything(), - expect.anything(), + expect.anything() ); }); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index 2b0dfda66..ddb24f924 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -166,8 +166,8 @@ defineRule( "email-address-format", regex( /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/, - errorMessages.EMAIL_ADDRESS_FORMAT, - ), + errorMessages.EMAIL_ADDRESS_FORMAT + ) ); defineRule("vin-required", required(errorMessages.VIN_REQUIRED)); defineRule("vin-format", regex(/^[a-hA-Hj-nJ-NpPr-zR-Z0-9]{17}$/, errorMessages.VIN_FORMAT)); @@ -233,7 +233,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.SUBMITTED, this.GaLabels.VIN_LOOKUP, - true, + true ); }); }, @@ -241,12 +241,12 @@ export default { if (this.$store.getters.vehicle.vin) { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK_WITH_VIN, - this.$route, + this.$route ); } else { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK, - this.$route, + this.$route ); } }, @@ -258,7 +258,7 @@ export default { const vehicleLookupResponse = this.dispatchStoreActionWithLogging( storeActions.LOOKUP_VEHICLE_BY_VIN, { vin: this.vin }, - "vin-lookup", + "vin-lookup" ); // Settle promises and get results @@ -313,12 +313,12 @@ export default { this.isSelectedGlassAvailableForVehicle = await isGlassAvailableForCarId( resultMap.vehicleLookupResponse.carId, - "vin-lookup", + "vin-lookup" ); // Update button "Continue with..." this.$refs.navbar.updateButtonText( - `Continue with ${resultMap.vehicleLookupResponse.year} ${resultMap.vehicleLookupResponse.make} ${resultMap.vehicleLookupResponse.model}`, + `Continue with ${resultMap.vehicleLookupResponse.year} ${resultMap.vehicleLookupResponse.make} ${resultMap.vehicleLookupResponse.model}` ); return this.$refs.navbar.removeLoader(); } @@ -332,7 +332,7 @@ export default { vin: this.vin, }), }, - false, + false ); await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false); @@ -343,7 +343,7 @@ export default { zipCode: this.serviceZipCode, zipCodeCtu: resultMap.zipCodeData.zipCodeCtu, }, - false, + false ); return await this.navigateForward(); @@ -366,7 +366,7 @@ export default { zipCode: this.serviceZipCode, zipCodeCtu: zipCodeData.zipCodeCtu, }, - false, + false ); } @@ -390,7 +390,7 @@ export default { this.navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, this.$route, {}, - { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }, + { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else { await this.navigateForwardWithSingleCarMatch(); @@ -404,7 +404,7 @@ export default { this.dispatchStoreActionWithLogging( storeActions.LOOKUP_VIN_BY_IMAGE, image, - "vin-lookup", + "vin-lookup" ) .then((response) => { if (response.data.length > 0) { @@ -433,7 +433,7 @@ export default { AlertMatchedDifferentVehicleHeader() { return this.getCmsContent( "AlertMatchedDifferentVehicleWidget", - "HeadlineText", + "HeadlineText" ).replaceAll("{custom:damage}", getDamageString()); }, AlertMatchedDifferentVehicleBody() { @@ -446,7 +446,7 @@ export default { AlertNonServiceableZipHeader() { return this.getCmsContent("AlertNonServiceableZipWidget", "HeadlineText").replaceAll( "{custom:serviceZip}", - this.serviceZipCode, + this.serviceZipCode ); }, AlertNonServiceableZipBody() { @@ -458,7 +458,7 @@ export default { AlertPerfectMatchInsuranceNotVerifiedBody() { return this.getCmsContent( "AlertPerfectMatchInsuranceNotVerified", - "BodyText", + "BodyText" ).replaceAll("{custom:damage}", getDamageString()); }, AlertPerfectMatchInsuranceVerifiedHeader() { @@ -467,7 +467,7 @@ export default { AlertPerfectMatchInsuranceVerifiedBody() { return this.getCmsContent("AlertPerfectMatchInsuranceVerified", "BodyText").replaceAll( "{custom:damage}", - getIsWindshieldOnly(), + getIsWindshieldOnly() ); }, isInsuranceVerified() { @@ -495,7 +495,7 @@ export default { this.displayVinNotFoundAlert = false; this.displayVinScanFailedAlert = false; this.$refs.navbar.updateButtonText( - this.getCmsContent("FunnelFooterWidget", "ForwardButtonText"), + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") ); }, serviceZipCode() { diff --git a/src/main.js b/src/main.js index 3d97ea345..1017651f8 100644 --- a/src/main.js +++ b/src/main.js @@ -31,7 +31,7 @@ vueApp.mixin(experimentMixin); // Vue Error Handling vueApp.config.errorHandler = (err, vm, info) => { global.$logger.logError( - `Page Name - ${vm.getPageName()} - ${info}: ${err.message}\n${err.stack}`, + `Page Name - ${vm.getPageName()} - ${info}: ${err.message}\n${err.stack}` ); }; diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 02163c937..da89996ef 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -83,7 +83,7 @@ export default { await baseMixin.methods.dispatchStoreAction( storeActions.LOG_CUSTOM_EVENT, payload, - false, + false ); }, @@ -256,7 +256,7 @@ export default { (lineItem) => isDefined(lineItem.kitPrice) && isDefined(lineItem.laborAmount) && - isDefined(lineItem.sellingPrice), + isDefined(lineItem.sellingPrice) ); const isTaxAvailable = isPricingAvailable && @@ -419,7 +419,7 @@ export default { const response = await baseMixin.methods.dispatchStoreAction( storeActions.INITIALIZE_SESSION, payload, - false, + false ); if (response?.data) { diff --git a/src/mixins/analytics-mixin.spec.js b/src/mixins/analytics-mixin.spec.js index d282f3a24..e56840c61 100644 --- a/src/mixins/analytics-mixin.spec.js +++ b/src/mixins/analytics-mixin.spec.js @@ -123,7 +123,7 @@ describe("analyticsMixin.js", () => { "someCat", "someAction", "someLabel", - "someVal", + "someVal" ); expect(mocks.baseMixin.methods.dispatchStoreAction).toBeCalled(); @@ -193,7 +193,7 @@ describe("analyticsMixin.js", () => { "action", "1111122222333333", false, - ValueToLogTypes.LAST_5, + ValueToLogTypes.LAST_5 ); // Assert @@ -232,7 +232,7 @@ describe("analyticsMixin.js", () => { "action", "111", false, - ValueToLogTypes.LAST_5, + ValueToLogTypes.LAST_5 ); // Assert @@ -257,7 +257,7 @@ describe("analyticsMixin.js", () => { () => { return {}; }, - { virtual: true }, + { virtual: true } ); store.getters = { @@ -305,7 +305,7 @@ describe("analyticsMixin.js", () => { () => { return {}; }, - { virtual: true }, + { virtual: true } ); store.getters = { @@ -462,7 +462,7 @@ describe("analyticsMixin.js", () => { result["insuranceDeductible"] === "" && result["isInsuranceItac"] === "" && result["isInsuranceNoComp"] === "" - : false), + : false) ); expect(allFieldsPopulated).toBe(true); }); @@ -559,7 +559,7 @@ describe("analyticsMixin.js", () => { result["insuranceDeductible"] === "" && result["isInsuranceItac"] === "" && result["isInsuranceNoComp"] === "" - : false), + : false) ); expect(allFieldsPopulated).toBe(true); }); @@ -646,7 +646,7 @@ describe("analyticsMixin.js", () => { // Assert console.log(result); const allFieldsPopulatedOrDefault = Object.keys(result).every( - (key) => result[key] === false || !!result[key] || result[key] === "", + (key) => result[key] === false || !!result[key] || result[key] === "" ); expect(allFieldsPopulatedOrDefault).toBe(true); }); diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 12a25c90e..109f90d04 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -70,7 +70,7 @@ export default { const serviceZipValidationResponse = await this.dispatchStoreActionWithLogging( storeActions.VALIDATE_ZIP, { zip: zipCode }, - pageName, + pageName ); return { @@ -109,7 +109,7 @@ export default { if (lineItem.childParts) { totalPrice += this.getTotalPriceOfAllLineItemsAndChildParts( lineItem.childParts, - includeTax, + includeTax ); } }); @@ -138,25 +138,25 @@ export default { if (lineItems.glassParts) { amountDue += this.getTotalPriceOfAllLineItemsAndChildParts( lineItems.glassParts, - includeTax, + includeTax ); } if (lineItems.supportingItems) { amountDue += this.getTotalPriceOfAllLineItemsAndChildParts( lineItems.supportingItems, - includeTax, + includeTax ); } if (lineItems.vaps) { amountDue += this.getTotalPriceOfAllLineItemsAndChildParts( lineItems.vaps, - includeTax, + includeTax ); } if (lineItems.promos) { amountDue += this.getTotalPriceOfAllLineItemsAndChildParts( lineItems.promos, - includeTax, + includeTax ); } diff --git a/src/mixins/input-button-wrapper-mixin.spec.js b/src/mixins/input-button-wrapper-mixin.spec.js index 7c2563a11..944c25a57 100644 --- a/src/mixins/input-button-wrapper-mixin.spec.js +++ b/src/mixins/input-button-wrapper-mixin.spec.js @@ -148,7 +148,7 @@ describe("input-button-wrapper-mixin", () => { expect(inputs[0].element.checked).toBe(isInputButtonOneChecked); expect(inputs[1].element.checked).toBe(isInputButtonTwoChecked); expect(wrapper.vm.value).toEqual(modelValue); - }, + } ); }); @@ -184,7 +184,7 @@ describe("input-button-wrapper-mixin", () => { expect(inputs[0].element.checked).toBe(isInputButtonOneChecked); expect(inputs[1].element.checked).toBe(isInputButtonTwoChecked); expect(wrapper.vm.value).toEqual(modelValue); - }, + } ); }); }); @@ -208,7 +208,7 @@ describe("input-button-wrapper-mixin", () => { // Assert const input = wrapper.find("input"); expect(input.attributes().type).toEqual("checkbox"); - }, + } ); test.each(inputButtonComponents.map((x) => [x.name, x]))( @@ -227,7 +227,7 @@ describe("input-button-wrapper-mixin", () => { // Assert const input = wrapper.find("input"); expect(input.attributes().type).toEqual("radio"); - }, + } ); const selectedValues = ["something", ["test"]]; @@ -260,7 +260,7 @@ describe("input-button-wrapper-mixin", () => { // Assert expect(wrapper.emitted()["update:modelValue"][0][0]).toEqual(selectedValue); - }, + } ); }); }); diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index f147483ee..2749d1933 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -376,7 +376,7 @@ export default { self.$route, {}, {}, - { partsOrQuestions: partsOrQuestions }, + { partsOrQuestions: partsOrQuestions } ); } else if ( hasGlassLocationWithMultipleParts && @@ -389,7 +389,7 @@ export default { self.$route, {}, {}, - { partsOrQuestions: partsOrQuestions }, + { partsOrQuestions: partsOrQuestions } ); } else if ( hasChildPartQuestions && @@ -402,7 +402,7 @@ export default { self.$route, {}, {}, - { partsOrQuestions: partsOrQuestions }, + { partsOrQuestions: partsOrQuestions } ); } else if ( hasCapabilityQuestions && @@ -421,7 +421,7 @@ export default { carId: store.getters.vehicle.carId, partNumber: partOrQuestion.parts[0].partNumber, }, - currentPage, + currentPage ) ).data; @@ -443,7 +443,7 @@ export default { self.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); } else { // if single parts only @@ -467,7 +467,7 @@ export default { } else { self.$router.navigateWithSaving( self.navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS, - self.$route, + self.$route ); } } @@ -477,14 +477,14 @@ export default { const self = vm ?? this; const currentPage = self.$route.query.fmgPage; const pageDataCapabilityQuestions = self.$store.getters.pageData( - fmgPageValues.CAPABILITY_QUESTIONS, + fmgPageValues.CAPABILITY_QUESTIONS ); const pageDataMoldingQuestions = self.$store.getters.pageData( - fmgPageValues.MOLDING_QUESTIONS, + fmgPageValues.MOLDING_QUESTIONS ); const pageDataVehicleParts = self.$store.getters.pageData(fmgPageValues.VEHICLE_PARTS); const pageDataPartQuestions = self.$store.getters.pageData( - fmgPageValues.PART_QUESTIONS, + fmgPageValues.PART_QUESTIONS ); const allPartsOrQuestions = [ diff --git a/src/mixins/vehicle-questions-mixin.spec.js b/src/mixins/vehicle-questions-mixin.spec.js index d3d8f3fee..56f4425cc 100644 --- a/src/mixins/vehicle-questions-mixin.spec.js +++ b/src/mixins/vehicle-questions-mixin.spec.js @@ -309,7 +309,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(result).toEqual(expectedResult); - }, + } ); }); @@ -402,7 +402,7 @@ describe("vehicle-questions-mixin", () => { const returnedGlass = await wrapper.vm.setupInitialData( glass, i, - alreadyAnsweredQuestions, + alreadyAnsweredQuestions ); // Assert @@ -1037,15 +1037,15 @@ describe("vehicle-questions-mixin", () => { const answerToTest = wrapper.vm.questionsData[1].questions[0].answers.filter( (a) => { return a.originalNextQuestionSequence; - }, + } ); // Assert expect(answerToTest[0].originalNextQuestionSequence).toEqual( - duplicatedQuestion.questionSequence, + duplicatedQuestion.questionSequence ); expect(answerToTest[0].nextQuestionSequence).toEqual( - duplicatedQuestionAnswer[0].nextQuestionSequence, + duplicatedQuestionAnswer[0].nextQuestionSequence ); }); @@ -1150,13 +1150,13 @@ describe("vehicle-questions-mixin", () => { // Assert expect( - wrapper.vm.questionsData[1].questions[0].suppressThisQuestion, + wrapper.vm.questionsData[1].questions[0].suppressThisQuestion ).toBeTruthy(); expect( - wrapper.vm.questionsData[1].questions[1].suppressThisQuestion, + wrapper.vm.questionsData[1].questions[1].suppressThisQuestion ).toBeTruthy(); expect( - wrapper.vm.questionsData[1].questions[2].suppressThisQuestion, + wrapper.vm.questionsData[1].questions[2].suppressThisQuestion ).toBeFalsy(); }); }); @@ -1270,12 +1270,12 @@ describe("vehicle-questions-mixin", () => { // Assert expect(answerLeadingToDuplicate.answerResult).toEqual( - answerInDuplicateQuestion[0].answerResult, + answerInDuplicateQuestion[0].answerResult ); expect(answerLeadingToDuplicate.originalAnswerResult).toBeFalsy(); expect(answerLeadingToDuplicate.nextQuestionSequence).toEqual(null); expect(answerLeadingToDuplicate.originalNextQuestionSequence).toEqual( - duplicateQuestion.questionSequence, + duplicateQuestion.questionSequence ); }); }); @@ -1327,7 +1327,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); @@ -1442,7 +1442,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); @@ -1549,7 +1549,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); @@ -1704,7 +1704,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); }); @@ -1752,7 +1752,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); @@ -1864,7 +1864,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); @@ -2042,7 +2042,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); }); @@ -2101,7 +2101,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); }); @@ -2143,7 +2143,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.$route, {}, {}, - { partsOrQuestions }, + { partsOrQuestions } ); }); }); @@ -2187,7 +2187,7 @@ describe("vehicle-questions-mixin", () => { expect(wrapper.vm.$router.navigateWithSaving).toHaveBeenCalledTimes(1); expect(wrapper.vm.$router.navigateWithSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS, - { query: { fmgPage: "vin-lookup" } }, + { query: { fmgPage: "vin-lookup" } } ); expect(wrapper.vm.$router.navigateWithoutSaving).not.toHaveBeenCalled(); }); @@ -2293,13 +2293,13 @@ describe("vehicle-questions-mixin", () => { expect(wrapper.vm.$store.commit).toHaveBeenCalledTimes(1); expect(wrapper.vm.$store.dispatch).toHaveBeenCalledWith( storeActions.SAVE_GLASS_PARTS, - collectedGlassParts, + collectedGlassParts ); expect(wrapper.vm.$router.navigateWithSaving).toHaveBeenCalledTimes(1); expect(wrapper.vm.$router.navigateWithSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS, - { query: { fmgPage: "vin-lookup" } }, + { query: { fmgPage: "vin-lookup" } } ); expect(wrapper.vm.$router.navigateWithoutSaving).not.toHaveBeenCalled(); @@ -2310,7 +2310,7 @@ describe("vehicle-questions-mixin", () => { describe("navigateBack", () => { // TODO KO test.todo( - "current page is quote, there are no questions, and we don't have their vin => go to estimate", + "current page is quote, there are no questions, and we don't have their vin => go to estimate" ); test("current page is quote, there are no questions, and we have their vin => go to vin-lookup", async () => { @@ -2324,7 +2324,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS, - { query: { fmgPage: fmgPageValues.QUOTE } }, + { query: { fmgPage: fmgPageValues.QUOTE } } ); }); @@ -2340,7 +2340,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_CAPABILITY_QUESTIONS, - { query: { fmgPage: fmgPageValues.QUOTE } }, + { query: { fmgPage: fmgPageValues.QUOTE } } ); }); @@ -2356,7 +2356,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_MOLDING_QUESTIONS, - { query: { fmgPage: fmgPageValues.QUOTE } }, + { query: { fmgPage: fmgPageValues.QUOTE } } ); }); @@ -2375,7 +2375,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_MULTIPLE_PARTS_TO_CHOOSE, - { query: { fmgPage: fmgPageValues.MOLDING_QUESTIONS } }, + { query: { fmgPage: fmgPageValues.MOLDING_QUESTIONS } } ); }); @@ -2394,7 +2394,7 @@ describe("vehicle-questions-mixin", () => { // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( navigationScenarios.CLICKED_BACK_WITH_PART_QUESTIONS, - { query: { fmgPage: fmgPageValues.MOLDING_QUESTIONS } }, + { query: { fmgPage: fmgPageValues.MOLDING_QUESTIONS } } ); }); }); diff --git a/src/router/index.js b/src/router/index.js index 58279dd5a..de8b6411f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -82,7 +82,7 @@ const routes = [ // that could have changed in heritage and then stick it in the store and then update the cookie // so load-session runs properly. this can be removed when heritage goes away const referralNumber = getQuerystringParameter( - queryStrings.REFERRAL_NUMBER, + queryStrings.REFERRAL_NUMBER ); const parentAccount = getQuerystringParameter(queryStrings.PARENT_ACCOUNT); const correlationId = getQuerystringParameter(queryStrings.CORRELATION_ID); @@ -91,7 +91,7 @@ const routes = [ store.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, parentAccount); store.commit( storeMutations.UPDATE_REFERRAL_CORRELATION_ID, - correlationId, + correlationId ); updateOrCreateFunnelCookie(); } @@ -110,7 +110,7 @@ const routes = [ ? true : false : null, - to.query.fmgPage, + to.query.fmgPage ); const pageToRedirectTo = await getPageToRouteExistingOrderTo(to); @@ -192,7 +192,7 @@ const routes = [ if (!arePagePrerequisitesValid(nextComponent)) { console.log( - "Page Prereqs not valid for next component: " + nextComponent.default.name, + "Page Prereqs not valid for next component: " + nextComponent.default.name ); GoToFunnelStartOn404(next); } @@ -248,12 +248,12 @@ router.beforeEach(async (to, from, next) => { // Check if alert event is on the bus const alertEvent = eventBus.readEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.PAGE_NOT_FOUND, + globalEvents.SubCategories.PAGE_NOT_FOUND ); //Uknown alerts most likely were added by a failed api call in global-methods const unknownAlertEvent = eventBus.readEventFromBus( globalEvents.Categories.GLOBAL_ALERT, - globalEvents.SubCategories.UNKNOWN_ERROR, + globalEvents.SubCategories.UNKNOWN_ERROR ); // If alert event is on the bus, then display the alert if (alertEvent !== undefined || unknownAlertEvent !== undefined) { @@ -310,7 +310,7 @@ router.navigateWithoutSaving = ( currentRoute, optionalQuery = {}, optionalParams = {}, - optionalPageData = {}, + optionalPageData = {} ) => { navigate(scenario, currentRoute, false, optionalQuery, optionalParams, optionalPageData); }; @@ -320,7 +320,7 @@ router.navigateWithSaving = ( currentRoute, optionalQuery = {}, optionalParams = {}, - optionalPageData = {}, + optionalPageData = {} ) => { navigate(scenario, currentRoute, true, optionalQuery, optionalParams, optionalPageData); }; @@ -341,7 +341,7 @@ router.overrideNavigation = ( isSavingNavigation, optionalQuery = {}, optionalParams = {}, - optionalPageData, + optionalPageData ) => { navigate( scenario, @@ -349,7 +349,7 @@ router.overrideNavigation = ( isSavingNavigation, optionalQuery, optionalParams, - optionalPageData, + optionalPageData ); next(); }; @@ -369,7 +369,7 @@ async function navigate( isSavingNavigation, optionalQuery = {}, optionalParams = {}, - optionalPageData = {}, + optionalPageData = {} ) { if (!scenario) { console.error("No scenario provided. Please review the routing table."); @@ -391,7 +391,7 @@ async function navigate( destinationFmgPageValue, Object.keys(optionalPageData).length > 0 ? optionalPageData - : (existingPageDataForPage ?? {}), + : (existingPageDataForPage ?? {}) ); optionalParams.isSavingNavigation = isSavingNavigation; @@ -441,7 +441,7 @@ function getNavigationMap(scenario, currentRoute) { .filter( (item) => item.fmgPageValue === fmgPageValue && - item.maps.filter((map) => map.scenario === scenario).length > 0, + item.maps.filter((map) => map.scenario === scenario).length > 0 ) .map((m) => m.maps.filter((map) => map.scenario === scenario))[0] .filter((x) => x.filter === true || x.filter === undefined); @@ -493,7 +493,7 @@ function GoToFunnelStartOn404(next) { messageCopy: "You can get a quote by starting on this page.", messageHeadline: "We're sorry, something went wrong.", type: globalEventTypes.Danger, - }, + } ); next({ @@ -512,7 +512,7 @@ async function DisplayPageError() { messageCopy: "", messageHeadline: "We're sorry, something went wrong.", type: globalEventTypes.Danger, - }, + } ); store.commit(storeMutations.UPDATE_IS_EXTERNAL_PARAMETER, false); baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); @@ -571,7 +571,7 @@ async function runExperiments(nextPage) { triggerEvent: experimentTriggers.SITE_ENTRY, triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE, }, - nextPage, + nextPage ); } @@ -582,7 +582,7 @@ async function runExperiments(nextPage) { triggerEvent: experimentTriggers.PAGE_ENTRY, triggerValue: nextPage, }, - nextPage, + nextPage ); } @@ -631,7 +631,7 @@ function updateExternalParameterState() { store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_IS_REPAIR, true); store.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_NUMBER_OF_CHIPS, - externalParameterNumberOfChips, + externalParameterNumberOfChips ); } } @@ -639,20 +639,20 @@ function updateExternalParameterState() { store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_ZIP_CODE, externalParameterZipCode); store.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_EMAIL_ADDRESS, - externalParameterEmail, + externalParameterEmail ); } if (externalParameterIsInsurance?.toUpperCase() == "TRUE") { store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_IS_INSURANCE, true); store.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_SERVICE_PACKAGE, - externalParameterServicePackage?.toLowerCase(), + externalParameterServicePackage?.toLowerCase() ); } if (externalParameterDamage?.toUpperCase() != "WINDSHIELDREPAIR") { store.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_VIN_SELECTION, - externalParameterVinSelection, + externalParameterVinSelection ); } } diff --git a/src/store/index.js b/src/store/index.js index 09f6c747e..aa5747a0f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -410,7 +410,7 @@ export const mutations = { removeEventFromBus(state, eventData) { const matchedEvent = state.applicationUser.eventBus.find( ({ category, subCategory }) => - category === eventData.category && subCategory === eventData.subCategory, + category === eventData.category && subCategory === eventData.subCategory ); const itemIndex = state.applicationUser.eventBus.indexOf(matchedEvent); @@ -549,7 +549,7 @@ export const mutations = { //premium appointment fee used on schedule page also needs reset when schedule is reset const supportingItems = state.order.lineItems.supportingItems; const premiumAppointmentFeeIndex = supportingItems?.findIndex( - (item) => item.partType == PREMIUM_FEE_PART_TYPE, + (item) => item.partType == PREMIUM_FEE_PART_TYPE ); if (premiumAppointmentFeeIndex >= 0) { @@ -680,10 +680,10 @@ export const mutations = { ? true : false; state.order.payment.insuranceCoverage.coverageStatus = coverageStatusValue( - sessionInformation?.order.insuranceCoverage.coverageStatus, + sessionInformation?.order.insuranceCoverage.coverageStatus ); state.order.payment.insuranceCoverage.coverageType = coverageTypeValue( - sessionInformation?.order.insuranceCoverage.coverageType, + sessionInformation?.order.insuranceCoverage.coverageType ); state.order.payment.insuranceCoverage.coverageVerificationType = sessionInformation?.order.insuranceCoverage.coverageVerificationType; @@ -745,7 +745,7 @@ export const getters = { eventBusItem: (state) => (eventCategory, eventSubCategory) => { const matchedEvent = state.applicationUser.eventBus.find( ({ category, subCategory }) => - category === eventCategory && subCategory === eventSubCategory, + category === eventCategory && subCategory === eventSubCategory ); return matchedEvent !== undefined ? matchedEvent.eventValue : undefined; @@ -757,7 +757,7 @@ export const getters = { }, hasAnyNonWindshieldGlassParts: (state) => { const nonWindshieldItems = state.order.damage.glassToReplace?.filter( - (glassToReplace) => glassToReplace.glassLocation != "Windshield", + (glassToReplace) => glassToReplace.glassLocation != "Windshield" ); return !!nonWindshieldItems?.length; }, @@ -784,7 +784,7 @@ export const getters = { }, areRearWipersOnOrder: (state) => { return !!state.order.lineItems.vaps?.some( - (vap) => vap.partType.toUpperCase() === partTypeStrings.REAR_WIPER.toUpperCase(), + (vap) => vap.partType.toUpperCase() === partTypeStrings.REAR_WIPER.toUpperCase() ); }, scheduleDisplayText: (state) => { @@ -801,7 +801,7 @@ export const getters = { const readableDuration = getDisplayTextForDurationLength( state.order.schedule.jobMinMinutes, - state.order.schedule.jobMaxMinutes, + state.order.schedule.jobMaxMinutes ); return { @@ -840,40 +840,40 @@ export const getters = { funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1, funnelSelectedWindshieldGlass: getNonFalseValuesOfPropertyInArrayOfObjects( state.order.damage.glassToReplace, - "glassLocation", + "glassLocation" ).includes(damageLocationsSelected.WINDSHIELD), funnelSelectedBackGlass: getNonFalseValuesOfPropertyInArrayOfObjects( state.order.damage.glassToReplace, - "glassLocation", + "glassLocation" ).includes(damageLocationsSelected.REAR), funnelSelectedDriverSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects( state.order.damage.glassToReplace, - "glassLocation", + "glassLocation" ).includes(damageLocationsSelected.DRIVER), funnelSelectedPassengerSideGlass: getNonFalseValuesOfPropertyInArrayOfObjects( state.order.damage.glassToReplace, - "glassLocation", + "glassLocation" ).includes(damageLocationsSelected.PASSENGER), funnelOrderPartNumbers: [ ...getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.glassParts, - "partNumber", + "partNumber" ), ...getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.supportingItems, - "partNumber", + "partNumber" ), ...getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.vaps, - "partNumber", + "partNumber" ), ], funnelOrderPartTypes: [ ...getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.glassParts, - "recalibrationType", + "recalibrationType" ), ], }; @@ -916,22 +916,22 @@ function getTimeSlotsAdditionalEventData( provisionalTriggers, zipCode, firstAvailableAppointmentDateString, - shopAppointmentType, + shopAppointmentType ) { var numberOfDays = null; if (firstAvailableAppointmentDateString) numberOfDays = getDateDifferenceInDays( new Date().toISOString().split("T")[0], - firstAvailableAppointmentDateString, + firstAvailableAppointmentDateString ); if (shopAppointmentType) return `FirstAvailableAppointment:${numberOfDays},Zip:${zipCode},ShopAppointmentType:${shopAppointmentType},ProvisionalTriggers:${provisionalTriggers.join( - ",", + "," )}`; else return `FirstAvailableAppointment:${numberOfDays},Zip:${zipCode},ProvisionalTriggers:${provisionalTriggers.join( - ",", + "," )}`; } @@ -988,7 +988,7 @@ export const actions = { { payload: { licenseLastName, licenseStreetAddress, licenseZip, licenseState }, pageNameToLog, - }, + } ) { return globalMethods.callHttpClient({ method: endpoints.LookupVinByAddress.method, @@ -1153,7 +1153,7 @@ export const actions = { method: endpoints.GetPageData.method, endpoint: endpoints.GetPageData.url( applicationConfig.APPLICATION_ABBREVIATION, - pageName, + pageName ), payload: {}, logApiCall: true, @@ -1164,7 +1164,7 @@ export const actions = { // Analytics Actions logExperimentExposure( context, - { payload: { userId, sessionKey, pageName, experiment }, pageNameToLog }, + { payload: { userId, sessionKey, pageName, experiment }, pageNameToLog } ) { return globalMethods.callHttpClient({ method: endpoints.LogExperimentExposureIfAssigned.method, @@ -1220,7 +1220,7 @@ export const actions = { lockToken, settledTenderAmount, billToAccountNumber, - }, + } ) { context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber); context.commit(storeMutations.UPDATE_REFERRAL_SEQUENCE_NUMBER, referralSequenceNumber); @@ -1251,7 +1251,7 @@ export const actions = { experimentsForUser, referralSequenceNumber, parentAccountNumber, - }, + } ) { if (!pageName) { return; @@ -1299,7 +1299,7 @@ export const actions = { experimentsForUser, referralSequenceNumber, parentAccountNumber, - }, + } ) { if (!pageName) { return; @@ -1375,7 +1375,7 @@ export const actions = { async runExperimentsForTrigger( context, - { payload: { userId, triggerEvent, triggerValue }, pageNameToLog }, + { payload: { userId, triggerEvent, triggerValue }, pageNameToLog } ) { if (triggerEvent == experimentTriggers.SITE_ENTRY) { context.commit(storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, true); @@ -1441,7 +1441,7 @@ export const actions = { // Flatten location and name properties response.data.partsOrQuestions = convertGlassPieceNamingFromApi( - response.data.partsOrQuestions, + response.data.partsOrQuestions ); return response; @@ -1483,7 +1483,7 @@ export const actions = { // Flatten location and name properties response.data.glassPieceParts = convertGlassPieceNamingFromApi( - response.data.glassPieceParts, + response.data.glassPieceParts ); return response; @@ -1559,14 +1559,14 @@ export const actions = { const lineItemsWithOnlyPartNumbers = context.getters.order.lineItems.supportingItems?.map( (lineItem) => ({ partNumber: lineItem.partNumber, - }), + }) ); var lineItems = null; if (lineItemsWithOnlyPartNumbers) { lineItems = buildQueryStringParameterFromArrayOfComplexObjects( lineItemsWithOnlyPartNumbers, - "lineItems", + "lineItems" ); } @@ -1577,7 +1577,7 @@ export const actions = { const glassPieces = buildQueryStringParameterFromArrayOfComplexObjects( glassArray, - "glassPieces", + "glassPieces" ); var endPoint = `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&carId=${carId}`; @@ -1647,7 +1647,7 @@ export const actions = { .parts[0]; const capabilityQuestionAnswers = context.getters.damage.capabilityQuestionAnswers; const capabilityQuestionAnswersForPart = capabilityQuestionAnswers.find( - (x) => x.glassLocation === glassLocation, + (x) => x.glassLocation === glassLocation ); return globalMethods.callHttpClient({ @@ -1664,7 +1664,7 @@ export const actions = { getShopTimeSlots( context, - { payload: { startDate, endDate, shopAppointmentType, providerNumber }, pageNameToLog }, + { payload: { startDate, endDate, shopAppointmentType, providerNumber }, pageNameToLog } ) { const order = context.state.order; const vehicle = context.state.order.vehicle; @@ -1721,7 +1721,7 @@ export const actions = { response.data.provisionalTriggers, order.serviceLocation.zipCode, response.data.days?.[0]?.date, - shopAppointmentType, + shopAppointmentType ), }); }, @@ -1777,7 +1777,7 @@ export const actions = { getTimeSlotsAdditionalEventData( response.data.provisionalTriggers, order.serviceLocation.zipCode, - response.data.days?.[0]?.date, + response.data.days?.[0]?.date ), }); }, @@ -1970,7 +1970,7 @@ export const actions = { isConceptInsurance, }, pageNameToLog, - }, + } ) { const order = context.state.order; @@ -2009,7 +2009,7 @@ export const actions = { context.commit( storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, - response.data, + response.data ); await resetScheduleIfUnavailable(context, response.data.order, pageNameToLog); @@ -2018,7 +2018,7 @@ export const actions = { (error) => { deleteFunnelCookie(); context.commit(storeMutations.RESET_STATE); - }, + } ); }, @@ -2039,7 +2039,7 @@ export const actions = { // Vehicle saveVehicle( context, - { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }, + { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor } ) { if ( context.state.order.vehicle.year != year || @@ -2065,7 +2065,7 @@ export const actions = { saveVehicleDamage( context, - { isWindshieldRepair, selectedGlassToReplace, selectedWindshieldChipCount }, + { isWindshieldRepair, selectedGlassToReplace, selectedWindshieldChipCount } ) { const selectedGlassPassedInSorted = selectedGlassToReplace.slice().sort(); const isGlassToReplaceTheSame = @@ -2076,7 +2076,7 @@ export const actions = { .every( (obj, index) => obj.glassLocation === selectedGlassPassedInSorted[index].glassLocation && - obj.glassName === selectedGlassPassedInSorted[index].glassName, + obj.glassName === selectedGlassPassedInSorted[index].glassName ); const isWindshieldRepairTheSame = isWindshieldRepair === context.state.order.damage.isRepair; @@ -2097,7 +2097,7 @@ export const actions = { context.commit(storeMutations.UPDATE_IS_REPAIR, isWindshieldRepair); context.commit( storeMutations.UPDATE_NUMBER_OF_CHIPS, - isWindshieldRepair ? parseInt(selectedWindshieldChipCount) : null, + isWindshieldRepair ? parseInt(selectedWindshieldChipCount) : null ); context.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, selectedGlassToReplace); } @@ -2122,7 +2122,7 @@ export const actions = { saveRegistrationLicensePlateLookup( context, - { isSelectedGlassAvailableForVehicle, vehicleInfo, registrationInfo }, + { isSelectedGlassAvailableForVehicle, vehicleInfo, registrationInfo } ) { //Reset dependent state when changing if ( @@ -2153,7 +2153,7 @@ export const actions = { saveRegistrationAddressLookup( context, - { isSelectedGlassAvailableForVehicle, vehicleInfo, customerInfo }, + { isSelectedGlassAvailableForVehicle, vehicleInfo, customerInfo } ) { //Reset dependent state when changing if (vehicleInfo.vin !== context.state.order.vehicle.vin) { @@ -2179,16 +2179,16 @@ export const actions = { // if part question answers have changed, reset subsequent question answers const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue( context.getters.damage.partQuestionAnswers, - "result", + "result" ); const sortedPartQuestionAnswersArray = sortArrayOfObjectsByPropertyValue( partQuestionAnswersArray, - "result", + "result" ); const havePartQuestionAnswersChanged = sortedPreviousResultsArray?.length !== sortedPartQuestionAnswersArray.length || !sortedPreviousResultsArray?.every( - (x, i) => x.result === sortedPartQuestionAnswersArray[i].result, + (x, i) => x.result === sortedPartQuestionAnswersArray[i].result ); if (havePartQuestionAnswersChanged) { @@ -2261,16 +2261,16 @@ export const actions = { saveMoldingQuestionAnswers(context, moldingQuestionAnswers) { const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue( context.getters.damage.moldingQuestionAnswers, - "partNum", + "partNum" ); const sortedMoldingQuestionAnswersArray = sortArrayOfObjectsByPropertyValue( moldingQuestionAnswers, - "partNum", + "partNum" ); const haveMoldingQuestionAnswersChanged = sortedPreviousResultsArray?.length !== sortedMoldingQuestionAnswersArray.length || !sortedPreviousResultsArray?.every( - (x, i) => x.partNum === sortedMoldingQuestionAnswersArray[i].partNum, + (x, i) => x.partNum === sortedMoldingQuestionAnswersArray[i].partNum ); if (haveMoldingQuestionAnswersChanged) { @@ -2292,16 +2292,16 @@ export const actions = { saveCapabilityQuestionAnswers(context, capabilityQuestionAnswers) { const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue( context.getters.damage.capabilityQuestionAnswers, - "result", + "result" ); const sortedCapabilityQuestionAnswersArray = sortArrayOfObjectsByPropertyValue( capabilityQuestionAnswers, - "result", + "result" ); const haveCapabilityQuestionAnswersChanged = sortedPreviousResultsArray?.length !== sortedCapabilityQuestionAnswersArray.length || !sortedPreviousResultsArray?.every( - (x, i) => x.result === sortedCapabilityQuestionAnswersArray[i].result, + (x, i) => x.result === sortedCapabilityQuestionAnswersArray[i].result ); if (haveCapabilityQuestionAnswersChanged) { @@ -2314,7 +2314,7 @@ export const actions = { //Save new values context.commit( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - capabilityQuestionAnswers, + capabilityQuestionAnswers ); }, @@ -2368,11 +2368,11 @@ export const actions = { // Clean up inactivePromos // Remove bundle identifier inactivePromos = inactivePromos.map((promoCode) => - getPromoCodeWithoutBundleIdentifier(promoCode), + getPromoCodeWithoutBundleIdentifier(promoCode) ); // Remove duplicates inactivePromos = inactivePromos.filter( - (promoCode, index) => inactivePromos.indexOf(promoCode) === index, + (promoCode, index) => inactivePromos.indexOf(promoCode) === index ); } activePromos = activePromos?.slice(0); @@ -2388,14 +2388,14 @@ export const actions = { activePromosToSave = activePromos; inactivePromosToSave = removeCurrentlyActivePromoCodesFromInactivePromos( activePromosToSave, - inactivePromos, + inactivePromos ); } else if (!activePromos) { // Only inactivePromos supplied inactivePromosToSave = inactivePromos; activePromosToSave = (context.getters.lineItems.promos ?? []).filter((activePromo) => { return !inactivePromosToSave.includes( - getPromoCodeWithoutBundleIdentifier(activePromo.promoCode), + getPromoCodeWithoutBundleIdentifier(activePromo.promoCode) ); }); } else if (!inactivePromos) { @@ -2403,7 +2403,7 @@ export const actions = { activePromosToSave = activePromos; inactivePromosToSave = removeCurrentlyActivePromoCodesFromInactivePromos( activePromosToSave, - context.getters.payment.inactivePromos ?? [], + context.getters.payment.inactivePromos ?? [] ); } context.commit(storeMutations.UPDATE_PROMOS, activePromosToSave); @@ -2413,7 +2413,7 @@ export const actions = { // Price order actions async priceOrderItemsAndSaveServerData( context, - { payload: { availableLineItems, serviceZipCode, serviceZipCodeCtu }, pageNameToLog }, + { payload: { availableLineItems, serviceZipCode, serviceZipCodeCtu }, pageNameToLog } ) { const zipCodeToUse = serviceZipCode ? serviceZipCode @@ -2433,7 +2433,7 @@ export const actions = { const availableLineItemsFormattedForRequest = buildQueryStringParameterFromArrayOfComplexObjects( lineItemsWithOnlyPartNumbers, - "lineItems", + "lineItems" ); const vehicle = context.getters.order.vehicle; @@ -2483,7 +2483,7 @@ export const actions = { pricedLineItems, }, pageNameToLog, - }, + } ) { const flattenedLineItemsWithChildParts = getFlattenedArrayOfLineItemsWithChildParts(pricedLineItems); @@ -2499,7 +2499,7 @@ export const actions = { const pricedLineItemsFormattedForRequest = buildQueryStringParameterFromArrayOfComplexObjects( lineItemsWithOnlyPriceInfo, - "lineItems", + "lineItems" ); let queryString = ""; @@ -2554,7 +2554,7 @@ export const actions = { useDefaultCashParentAccount = false, }, pageNameToLog, - }, + } ) { const order = context.getters.order; lineItemsToUse = lineItemsToUse ?? order.lineItems; @@ -2603,7 +2603,7 @@ export const actions = { if (validateResponse?.data?.serverData) { context.commit( storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, - validateResponse.data.serverData, + validateResponse.data.serverData ); } @@ -2620,7 +2620,7 @@ export const actions = { useDefaultCashParentAccount = false, }, pageNameToLog, - }, + } ) { const order = context.getters.order; @@ -2632,7 +2632,7 @@ export const actions = { inactivePromosToUse = inactivePromosToUse ?? order.payment.inactivePromos; inactivePromosToUse = removeCurrentlyActivePromoCodesFromInactivePromos( lineItemsToUse.promos, - inactivePromosToUse, + inactivePromosToUse ); let requestObject = { @@ -2669,7 +2669,7 @@ export const actions = { context.commit( storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, - revalidateResponse.data.lineItemsServerData, + revalidateResponse.data.lineItemsServerData ); return revalidateResponse?.data; @@ -2725,7 +2725,7 @@ export const actions = { serviceLocationInfo.zipCode !== context.state.order.serviceLocation.zipCode || !providersEqual( serviceLocationInfo.provider, - context.state.order.serviceLocation.provider, + context.state.order.serviceLocation.provider ) || serviceLocationInfo.appointmentType !== context.state.order.serviceLocation.appointmentType @@ -2844,15 +2844,15 @@ export const actions = { updateExternalParameterMMS(context, externalParameterMMS) { context.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_MAKE, - externalParameterMMS.externalParameterMake, + externalParameterMMS.externalParameterMake ); context.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_MODEL, - externalParameterMMS.externalParameterModel, + externalParameterMMS.externalParameterModel ); context.commit( storeMutations.UPDATE_EXTERNAL_PARAMETER_STYLE, - externalParameterMMS.externalParameterStyle, + externalParameterMMS.externalParameterStyle ); }, }; @@ -2880,12 +2880,12 @@ function getHasRecalibrationPart(state) { var hasRequiresRecalibration = getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.glassParts, - "requiresRecalibration", + "requiresRecalibration" )?.length > 0; var hasRecalibrationType = getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.glassParts, - "recalibrationType", + "recalibrationType" )?.length > 0; if (hasRequiresRecalibration) { @@ -2894,7 +2894,7 @@ function getHasRecalibrationPart(state) { return ( getNonFalseValuesOfPropertyInArrayOfObjects( state.order.lineItems.glassParts, - "recalibrationType", + "recalibrationType" )[0].toLowerCase() != "unknown" ); } else { @@ -2961,7 +2961,7 @@ function convertGlassPieceNamingFromApi(glassArray) { function addPricesToLineItems(lineItems, pricingLineItems) { lineItems.forEach((lineItem) => { const lineItemIndex = pricingLineItems.findIndex( - (pricingLineItem) => pricingLineItem.partNumber === lineItem.partNumber, + (pricingLineItem) => pricingLineItem.partNumber === lineItem.partNumber ); if (lineItem.childParts) { @@ -2981,7 +2981,7 @@ function addPricesToLineItems(lineItems, pricingLineItems) { function addTaxesToPricedLineItems(pricedLineItems, taxingLineItems = []) { pricedLineItems.forEach((pricedLineItem) => { const lineItemIndex = taxingLineItems.findIndex( - (taxingLineItem) => taxingLineItem.partNumber === pricedLineItem.partNumber, + (taxingLineItem) => taxingLineItem.partNumber === pricedLineItem.partNumber ); if (pricedLineItem.childParts) { @@ -3005,7 +3005,7 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem if (category == "supportingItems") { // if the category is supporting items we need to filter out the items that aren't repair chips const nonRepairChipSupportItemsLineItems = lineItemsInCategory.filter( - (lineItem) => lineItem.partNumber != "WSREPAIR", + (lineItem) => lineItem.partNumber != "WSREPAIR" ); /* @@ -3015,18 +3015,18 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem */ // get the supporting items that ARE repair chips and sort them by descending labor amount let repairChipLineItems = lineItemsInCategory.filter( - (lineItem) => lineItem.partNumber == "WSREPAIR", + (lineItem) => lineItem.partNumber == "WSREPAIR" ); repairChipLineItems = repairChipLineItems.sort( - (a, b) => parseFloat(b.laborAmount) - parseFloat(a.laborAmount), + (a, b) => parseFloat(b.laborAmount) - parseFloat(a.laborAmount) ); // get the supporting items from the available line items (taxed) that ARE repair chips and sort them by descending labor amount let availableRepairChipLineItems = availableLineItems.filter( - (lineItem) => lineItem.partNumber == "WSREPAIR", + (lineItem) => lineItem.partNumber == "WSREPAIR" ); availableRepairChipLineItems = availableRepairChipLineItems.sort( - (a, b) => parseFloat(b.laborAmount) - parseFloat(a.laborAmount), + (a, b) => parseFloat(b.laborAmount) - parseFloat(a.laborAmount) ); // go through each one of those mapping the taxes to the correct chip @@ -3043,7 +3043,7 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem const availableLineItem = availableLineItems.find( (ali) => ali.partNumber == - nonRepairChipSupportItemsLineItems[lineItemIndex].partNumber, + nonRepairChipSupportItemsLineItems[lineItemIndex].partNumber ); if (availableLineItem) { nonRepairChipSupportItemsLineItems[lineItemIndex].salesTax = @@ -3060,7 +3060,7 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem lineItemIndex++ ) { const availableLineItem = availableLineItems.find( - (ali) => ali.partNumber == lineItemsInCategory[lineItemIndex].partNumber, + (ali) => ali.partNumber == lineItemsInCategory[lineItemIndex].partNumber ); if (availableLineItem) { lineItemsInCategory[lineItemIndex].salesTax = availableLineItem.salesTax; @@ -3270,7 +3270,7 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) { }, pageNameToLog: pageNameToLog, }, - false, + false ); if (newTimeSlotsResponse?.data.days?.length === 0) { @@ -3282,7 +3282,7 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) { // if early bird fee is in supporting items then need to check the timeslot to see if offer premium is also still available if ( order.lineItem?.supportingItems?.findIndex( - (item) => item.partType == PREMIUM_FEE_PART_TYPE, + (item) => item.partType == PREMIUM_FEE_PART_TYPE ) ) { newTimeSlotsResponse.data.days?.forEach((day) => { @@ -3318,7 +3318,7 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) { }, pageNameToLog: pageNameToLog, }, - false, + false ); if (newTimeSlotsResponse?.data.days?.length === 0) { diff --git a/src/store/store.spec.js b/src/store/store.spec.js index f7cca8c22..fb1c73f98 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -476,7 +476,7 @@ describe("Actions", () => { // Assert await expect( - actions.lookupVinByImage(context, { payload: image, pageNameToLog: "test" }), + actions.lookupVinByImage(context, { payload: image, pageNameToLog: "test" }) ).rejects.toEqual("An error occurred"); }); @@ -868,7 +868,7 @@ describe("Actions", () => { expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_NUMBER, "123"); expect(commit).toBeCalledWith( storeMutations.UPDATE_REFERRAL_DATE, - new Date().toUTCString(), + new Date().toUTCString() ); expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, "xxx-xxx-xxx"); expect(commit).toBeCalledWith(storeMutations.UPDATE_PARENT_ACCT_NUMBER, "167132"); @@ -994,7 +994,7 @@ describe("Actions", () => { // Assert expect(commit).toBeCalledWith( storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, - "test@safelite.com", + "test@safelite.com" ); }); @@ -1042,7 +1042,7 @@ describe("Actions", () => { // Assert expect(dispatch).toHaveBeenCalledWith( - storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES ); expect(commit).toHaveBeenCalledWith(storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS); }); @@ -1074,10 +1074,10 @@ describe("Actions", () => { // Assert expect(dispatch).not.toHaveBeenCalledWith( - storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES ); expect(commit).not.toHaveBeenCalledWith( - storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS, + storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS ); }); @@ -1463,7 +1463,7 @@ describe("Actions", () => { // Assert expect(dispatch).not.toBeCalledWith( - storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES ); }); @@ -1512,15 +1512,15 @@ describe("Actions", () => { // Assert expect(dispatch).toHaveBeenNthCalledWith( 1, - storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES ); expect(dispatch).toHaveBeenNthCalledWith( 2, - storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES, + storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES ); expect(dispatch).toHaveBeenNthCalledWith( 3, - storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES, + storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES ); expect(commit).toBeCalledWith(storeMutations.UPDATE_VEHICLE, payload.vehicleInfo); @@ -1571,11 +1571,11 @@ describe("Actions", () => { // Assert expect(dispatch).toHaveBeenNthCalledWith( 1, - storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES ); expect(dispatch).toHaveBeenNthCalledWith( 2, - storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES, + storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES ); expect(commit).toBeCalledWith(storeMutations.UPDATE_VEHICLE, payload.vehicleInfo); @@ -1626,11 +1626,11 @@ describe("Actions", () => { // Assert expect(dispatch).toHaveBeenNthCalledWith( 1, - storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES ); expect(dispatch).toHaveBeenNthCalledWith( 2, - storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES, + storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES ); expect(commit).toBeCalledWith(storeMutations.UPDATE_VEHICLE, payload.vehicleInfo); @@ -1671,11 +1671,11 @@ describe("Actions", () => { //Assert expect(dispatch).toHaveBeenNthCalledWith( 1, - storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES, + storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES ); expect(dispatch).toHaveBeenNthCalledWith( 2, - storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES, + storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES ); if (context.state.order.vehicle.year !== payload.year) { expect(commit).toBeCalledWith(storeMutations.UPDATE_YEAR, payload.year); @@ -1722,16 +1722,16 @@ describe("Actions", () => { // Assert expect(dispatch).toHaveBeenNthCalledWith( 1, - storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES, + storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES ); expect(commit).toBeCalledWith(storeMutations.UPDATE_IS_REPAIR, payload.isWindshieldRepair); expect(commit).toBeCalledWith( storeMutations.UPDATE_NUMBER_OF_CHIPS, - payload.isWindshieldRepair ? parseInt(payload.selectedWindshieldChipCount) : null, + payload.isWindshieldRepair ? parseInt(payload.selectedWindshieldChipCount) : null ); expect(commit).toBeCalledWith( storeMutations.UPDATE_GLASS_TO_REPLACE, - payload.selectedGlassToReplace, + payload.selectedGlassToReplace ); }); @@ -1755,7 +1755,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -1774,7 +1774,7 @@ describe("Actions", () => { expect(context.commit).toHaveBeenNthCalledWith( 1, storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, - true, + true ); expect(context.getters.applicationUser.triggeredSiteEntry).toBe(true); expect(globalMethods.callHttpClient).toHaveBeenCalled(); @@ -1791,7 +1791,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -1810,7 +1810,7 @@ describe("Actions", () => { // Assert expect(context.commit).not.toHaveBeenCalledWith( storeMutations.UPDATE_TRIGGERED_SITE_ENTRY, - expect.any, + expect.any ); expect(context.getters.applicationUser.triggeredSiteEntry).toBe(false); @@ -1832,7 +1832,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -1842,17 +1842,17 @@ describe("Actions", () => { function testPartQuestionAnswerDependenciesHaveBeenReset( context, - shouldPartQuestionAnswersBeReset, + shouldPartQuestionAnswersBeReset ) { if (shouldPartQuestionAnswersBeReset) { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, - null, + null ); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.VEHICLE_PARTS, @@ -1870,11 +1870,11 @@ describe("Actions", () => { expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).not.toBeCalledWith( storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, - null, + null ); expect(context.commit).not.toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.VEHICLE_PARTS, @@ -1892,7 +1892,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith( storeMutations.UPDATE_PART_QUESTION_ANSWERS, - expect.anything(), + expect.anything() ); } @@ -2013,7 +2013,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -2026,11 +2026,11 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, - null, + null ); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.MOLDING_QUESTIONS, @@ -2044,11 +2044,11 @@ describe("Actions", () => { expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).not.toBeCalledWith( storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, - null, + null ); expect(context.commit).not.toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.MOLDING_QUESTIONS, @@ -2090,7 +2090,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2134,7 +2134,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2187,7 +2187,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2232,7 +2232,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2285,7 +2285,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2330,7 +2330,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2383,7 +2383,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2428,7 +2428,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2481,7 +2481,7 @@ describe("Actions", () => { // Act actions.resetMoldingAndCapabilityQuestionAnswersIfNeeded( context, - currentlySelectedParts, + currentlySelectedParts ); // Assert @@ -2499,7 +2499,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -2512,7 +2512,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.CAPABILITY_QUESTIONS, @@ -2522,7 +2522,7 @@ describe("Actions", () => { expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); expect(context.commit).not.toBeCalledWith( storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, - null, + null ); expect(context.commit).not.toBeCalledWith(storeMutations.UPDATE_PAGE_DATA, { page: fmgPageValues.CAPABILITY_QUESTIONS, @@ -2647,7 +2647,7 @@ describe("Actions", () => { context.commit = jest .fn() .mockImplementation((storeMutation, value) => - mutations[storeMutation](context, value), + mutations[storeMutation](context, value) ); context.getters = { ...getters, @@ -2657,7 +2657,7 @@ describe("Actions", () => { function testCapabilityQuestionAnswerDependenciesHaveBeenReset( context, - shouldAnswersBeReset, + shouldAnswersBeReset ) { if (shouldAnswersBeReset) { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, null); @@ -2793,13 +2793,13 @@ describe("Actions", () => { expect(context.commit).toHaveBeenNthCalledWith( 2, storeMutations.UPDATE_INACTIVE_PROMOS, - [], + [] ); expect(context.commit).toHaveBeenNthCalledWith(3, storeMutations.UPDATE_PROMOS, []); expect(context.commit).toHaveBeenNthCalledWith( 4, storeMutations.UPDATE_INACTIVE_PROMOS, - [], + [] ); }); it("should save both active and inactivePromos when method is supplied with both active and inactive", () => { @@ -2820,7 +2820,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PROMOS, activePromos); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - inactivePromos, + inactivePromos ); }); it("should remove any inactivePromos that are already active when supplied with both active and inactive", () => { @@ -2842,7 +2842,7 @@ describe("Actions", () => { // Assert expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - expectedInactivePromos, + expectedInactivePromos ); }); it("should save active promos from store and inactive promos from method call when only inactivePromos is provided", () => { @@ -2861,7 +2861,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PROMOS, activePromos); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - inactivePromos, + inactivePromos ); }); it("should save active promos but remove duplicates from store and inactive promos from method call when only inactivePromos is provided", () => { @@ -2882,11 +2882,11 @@ describe("Actions", () => { // Assert expect(context.commit).toBeCalledWith( storeMutations.UPDATE_PROMOS, - expectedSavedActivePromos, + expectedSavedActivePromos ); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - inactivePromos, + inactivePromos ); }); it("should save inactivePromos from the store and provided activePromos when only activePromos is provided", () => { @@ -2905,7 +2905,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PROMOS, activePromos); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - inactivePromos, + inactivePromos ); }); it("should save inactivePromos without duplicates from activePromos from the store and provided activePromos when only activePromos is provided", () => { @@ -2926,7 +2926,7 @@ describe("Actions", () => { expect(context.commit).toBeCalledWith(storeMutations.UPDATE_PROMOS, activePromos); expect(context.commit).toBeCalledWith( storeMutations.UPDATE_INACTIVE_PROMOS, - expectedInactivePromos, + expectedInactivePromos ); }); }); @@ -2985,7 +2985,7 @@ describe("Actions", () => { // Assert const vapsItem = firstCallArgs[0].payload.order.lineItemsOnOrder.filter( - (item) => item.partNumber == 1, + (item) => item.partNumber == 1 )[0]; expect(vapsItem.id).toEqual("GUID"); }); @@ -3050,7 +3050,7 @@ describe("Actions", () => { // Assert const vapsItems = firstCallArgs[0].payload.addableVaps.filter( - (item) => item.partNumber == "SBB22", + (item) => item.partNumber == "SBB22" ); expect(vapsItems[1].id).toEqual("GUID1"); expect(vapsItems[0].id).toEqual("GUID2"); @@ -3167,7 +3167,7 @@ describe("Actions", () => { // Assert expect(firstCallArgs[0].payload.order.lineItemsOnOrder).toEqual( - expectedLineItemsOnOrder, + expectedLineItemsOnOrder ); }); it("should not blow up if an error comes back from the http call", async () => { @@ -3207,7 +3207,7 @@ describe("Actions", () => { }; globalMethods.callHttpClient = jest.fn(() => - Promise.reject(new Error("Error message")), + Promise.reject(new Error("Error message")) ); crypto.randomUUID = jest.fn(() => "GUID"); @@ -3283,7 +3283,7 @@ describe("Actions", () => { // Assert expect(context.commit).toBeCalledWith( storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, - expect.anything(), + expect.anything() ); }); }); @@ -3341,7 +3341,7 @@ describe("Actions", () => { const vapsLineItem = firstCallArgs[0].payload.order.lineItemsOnOrder.filter( (lineItem) => { return lineItem.partNumber == "testVap"; - }, + } ); expect(vapsLineItem[0].id).toEqual("GUID"); }); @@ -3408,7 +3408,7 @@ describe("Actions", () => { // Assert expect(firstCallArgs[0].payload.inactivePromos).toEqual(expectedInactivePromos); expect(firstCallArgs[0].payload.order.lineItemsOnOrder).toEqual( - expectedLineItemsOnOrder, + expectedLineItemsOnOrder ); }); it("can build a valid payload with store data only", async () => { @@ -3465,10 +3465,10 @@ describe("Actions", () => { const firstCallArgs = globalMethods.callHttpClient.mock.calls[0]; // Assert expect(firstCallArgs[0].payload.inactivePromos).toEqual( - context.getters.order.payment.inactivePromos, + context.getters.order.payment.inactivePromos ); expect(firstCallArgs[0].payload.order.lineItemsOnOrder).toEqual( - expectedLineItemsOnOrder, + expectedLineItemsOnOrder ); }); it("removes any promos from inactivePromos that are already active before sending the request", async () => { @@ -3584,7 +3584,7 @@ describe("Actions", () => { // Assert expect(context.commit).toBeCalledWith( storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA, - expect.anything(), + expect.anything() ); }); }); @@ -3621,7 +3621,7 @@ describe("Getters", () => { // Assert //expect(storeState.applicationUser.eventBus).toEqual([event]); expect(getters.eventBusItem(storeState)(event.category, event.subCategory)).toEqual( - event.eventValue, + event.eventValue ); }); @@ -3772,7 +3772,7 @@ describe("Getters", () => { mutations.updateParentAcctNumber(storeState, mockStateValues.funnelParentAccountNumber); mutations.updateInsuranceVerifiedStatus( storeState, - mockStateValues.funnelIsCoverageVerified, + mockStateValues.funnelIsCoverageVerified ); mutations.updateIsInsurance(storeState, false); mutations.updateGlassParts(storeState, mockStateValues.funnelGlassParts); @@ -3852,7 +3852,7 @@ describe("Getters", () => { mutations.updateParentAcctNumber(storeState, mockStateValues.funnelParentAccountNumber); mutations.updateInsuranceVerifiedStatus( storeState, - mockStateValues.funnelIsCoverageVerified, + mockStateValues.funnelIsCoverageVerified ); mutations.updateIsInsurance(storeState, false); mutations.updateGlassParts(storeState, mockStateValues.funnelGlassParts); @@ -4120,7 +4120,7 @@ describe("isVinOptionalVehicle", () => { var vinOptionalResult = actions.isVinOptionalVehicle(context); expect(vinOptionalResult).toEqual(expectedVinSkip); - }, + } ); const testcarID = [ ["CR00000100", "make", [{ glassLocation: "driver" }], false], @@ -4150,6 +4150,6 @@ describe("isVinOptionalVehicle", () => { var vinOptionalResult = actions.isVinOptionalVehicle(context); expect(vinOptionalResult).toEqual(expectedVinSkip); - }, + } ); }); diff --git a/src/store/vuex-shared-mutations/strategies/broadcastChannel.spec.js b/src/store/vuex-shared-mutations/strategies/broadcastChannel.spec.js index c3b4fed42..7b5856875 100644 --- a/src/store/vuex-shared-mutations/strategies/broadcastChannel.spec.js +++ b/src/store/vuex-shared-mutations/strategies/broadcastChannel.spec.js @@ -43,7 +43,7 @@ describe("BroadcastChannelStrategy", () => { it("should throw an error if Broadcast strategy is not available", () => { expect(() => new BroadcastChannelStrategy({ BroadcastChannel: null })).toThrow( - "Broadcast strategy not available", + "Broadcast strategy not available" ); }); }); @@ -58,7 +58,7 @@ describe("BroadcastChannelStrategy", () => { strategy.addEventListener(mockFn); expect(mockChannel.addEventListener).toHaveBeenCalledWith( "message", - expect.any(Function), + expect.any(Function) ); // const mockEvent = { data: "test-message" }; diff --git a/src/store/vuex-shared-mutations/strategies/localStorage.js b/src/store/vuex-shared-mutations/strategies/localStorage.js index b21342b0f..ff3df0537 100644 --- a/src/store/vuex-shared-mutations/strategies/localStorage.js +++ b/src/store/vuex-shared-mutations/strategies/localStorage.js @@ -9,7 +9,7 @@ let messageCounter = 1; function splitMessage(message) { const partsCount = Math.ceil(message.length / MAX_MESSAGE_LENGTH); return Array.from({ length: partsCount }).map((_, idx) => - message.substr(idx * MAX_MESSAGE_LENGTH, MAX_MESSAGE_LENGTH), + message.substr(idx * MAX_MESSAGE_LENGTH, MAX_MESSAGE_LENGTH) ); } @@ -18,7 +18,7 @@ export default class LocalStorageStrategy { { window: windowImpl, localStorage: localStorageImpl } = { window: globalObj.window, localStorage: globalObj.localStorage, - }, + } ) { if (!windowImpl || !localStorageImpl) { return false; @@ -93,7 +93,7 @@ export default class LocalStorageStrategy { total: messageParts.length, messagePart: m, messageCounter, - }), + }) ); this.storage.removeItem(key); }); diff --git a/src/store/vuex-shared-mutations/strategies/localStorage.spec.js b/src/store/vuex-shared-mutations/strategies/localStorage.spec.js index f762ec70f..0dd8ee8f6 100644 --- a/src/store/vuex-shared-mutations/strategies/localStorage.spec.js +++ b/src/store/vuex-shared-mutations/strategies/localStorage.spec.js @@ -8,7 +8,7 @@ describe("LocalStorageStrategy", () => { removeItem: jest.fn(), }; expect( - LocalStorageStrategy.available({ window: {}, localStorage: localStorageMock }), + LocalStorageStrategy.available({ window: {}, localStorage: localStorageMock }) ).toBe(true); }); it("should return false if localStorage is not available", () => { diff --git a/src/store/vuex-shared-mutations/vuexSharedMutations.js b/src/store/vuex-shared-mutations/vuexSharedMutations.js index 7c01a52de..2ccd5a53a 100644 --- a/src/store/vuex-shared-mutations/vuexSharedMutations.js +++ b/src/store/vuex-shared-mutations/vuexSharedMutations.js @@ -10,13 +10,13 @@ export default ({ predicate, strategy, ...rest } = {}) => { /* istanbul ignore next: deprecation warning */ if ("storageKey" in rest || "sharingKey" in rest) { window.console.warn( - "Configuration directly on plugin was removed, configure specific strategies if needed", + "Configuration directly on plugin was removed, configure specific strategies if needed" ); } if (!Array.isArray(predicate) && typeof predicate !== "function") { throw new Error( - "Either array of accepted mutations or predicate function must be supplied", + "Either array of accepted mutations or predicate function must be supplied" ); } diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js index 907e5ca4c..9d8112189 100644 --- a/src/ux-components/alert/alert.spec.js +++ b/src/ux-components/alert/alert.spec.js @@ -13,7 +13,7 @@ describe("alert.vue", () => { manualHeadline: "testHeader", manualCopy: "testCopy", }, - }), + }) ); const wrapperDiv = wrapper.find("div"); @@ -31,7 +31,7 @@ describe("alert.vue", () => { manualHeadline: "testHeader", manualCopy: "testCopy", }, - }), + }) ); const wrapperDiv = wrapper.find("div"); @@ -58,7 +58,7 @@ describe("alert.vue", () => { manualCopy: "testCopy with a {routerLink: testName, testLink} inside of it", }, stubs: ["textBlock"], - }), + }) ); // Assert @@ -76,7 +76,7 @@ describe("alert.vue", () => { "

testCopy with a {routerLink: testName, testLink} inside of it

and two paragraphs

", }, stubs: ["router-link"], - }), + }) ); // Assert expect(wrapper.findAll("p").length === 3).toBe(true); @@ -147,7 +147,7 @@ describe("alert.vue", () => { manualHeadline: "testHeader", manualCopy: "testCopy", }, - }), + }) ); // Assert @@ -215,7 +215,7 @@ function setupMocks(mountOptionsMockData = {}) { mixins: [mockMixin], }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); return allMountOptions; diff --git a/src/ux-components/button-main/button-main.spec.js b/src/ux-components/button-main/button-main.spec.js index 53b09251a..76e9afe28 100644 --- a/src/ux-components/button-main/button-main.spec.js +++ b/src/ux-components/button-main/button-main.spec.js @@ -12,7 +12,7 @@ describe("buttonMain.vue", () => { propsData: { isPrimary: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -28,7 +28,7 @@ describe("buttonMain.vue", () => { propsData: { isDisabled: true, }, - }), + }) ); const button = wrapper.find("button"); @@ -45,7 +45,7 @@ describe("buttonMain.vue", () => { loaderColor: "blue", loaderEnabled: true, }, - }), + }) ); // Act @@ -66,7 +66,7 @@ describe("buttonMain.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); // Act @@ -87,7 +87,7 @@ describe("buttonMain.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -112,7 +112,7 @@ describe("buttonMain.vue", () => { loaderPosition: "right", loaderEnabled: true, }, - }), + }) ); wrapper.setData({ @@ -137,7 +137,7 @@ describe("buttonMain.vue", () => { loaderEnabled: true, isDisabled: false, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -161,7 +161,7 @@ describe("buttonMain.vue", () => { loaderEnabled: true, isDisabled: true, }, - }), + }) ); const buttonElement = wrapper.find("button"); @@ -179,7 +179,7 @@ describe("buttonMain.vue", () => { function setupMocks(mountOptionsMockData = {}) { const defaultMountOptions = { route: { query: { fmgPage: "page-name" } } }; const baseMountOptions = getMountOptions( - Object.assign(defaultMountOptions, mountOptionsMockData), + Object.assign(defaultMountOptions, mountOptionsMockData) ); const allMountOptions = Object.assign(defaultMountOptions, baseMountOptions); diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index a03502374..9cc61e051 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -44,7 +44,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.buttonText, - true, + true ); if (!this.isDisabled) { this.isLoaderDisplayed = true; diff --git a/src/ux-components/text-link/text-link.vue b/src/ux-components/text-link/text-link.vue index 369922dbb..7fc4eaef8 100644 --- a/src/ux-components/text-link/text-link.vue +++ b/src/ux-components/text-link/text-link.vue @@ -41,7 +41,7 @@ export default { this.$route.query[this.queryStrings.FMG_PAGE], this.GaActions.CLICKED, this.text, - true, + true ); if (this.useLoadingModal) {