ESLint fix all warnings / errors. Removed old or disabled statements.
This commit is contained in:
parent
3920ca97cc
commit
fc38033649
98 changed files with 57 additions and 270 deletions
|
|
@ -44,7 +44,7 @@ export default {
|
|||
watch: {
|
||||
shouldShowLoader(newVal) {
|
||||
// prevent keyboard input when loader is shown, re-enable when hidden
|
||||
if(newVal) {
|
||||
if (newVal) {
|
||||
document.onkeydown = () => false;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ const endpoints = Object.freeze({
|
|||
zipCode,
|
||||
applicationName,
|
||||
referralSequenceNumber
|
||||
// eslint-disable-next-line max-len
|
||||
) => `${PARTS_BASE_URL}/recal-parts/${carId}/${partNumber}/${recalibrationType}/${parentAccountNumber}/${zipCode}/${applicationName}/${referralSequenceNumber}`,
|
||||
method: 'GET'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ const errorMessages = Object.freeze({
|
|||
INVALID_ZIP: 'The ZIP you entered was invalid. Please enter a valid ZIP.',
|
||||
ZIP_CODE_NOT_SERVICED_FOR_VEHICLE: 'We do not currently offer glass service for your vehicle in this ZIP code. Please try another ZIP code.',
|
||||
VIN_REQUIRED: 'Please enter your VIN',
|
||||
VIN_FORMAT:
|
||||
// eslint-disable-next-line max-len
|
||||
'Invalid VIN. Please make sure that you entered the correct 17-digit, alpha-numeric number. VINs do not contain the letters I, O, or Q',
|
||||
VIN_FORMAT: 'Invalid VIN. Please make sure that you entered the correct 17-digit, alpha-numeric number. VINs do not contain the letters I, O, or Q',
|
||||
OPTION_REQUIRED: 'Please select an option',
|
||||
VEHICLE_REQUIRED: 'Please select a vehicle',
|
||||
POLICY_NUMBER_REQUIRED: 'Policy number is required.',
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ export default {
|
|||
this.handleClick(e);
|
||||
break;
|
||||
case this.eventTypes.CHANGE:
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
this.selectingInitiatesLoad
|
||||
? this.handleSelectionChange(e)
|
||||
: this.handleClick(e);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import buttonQuestion from '@/digital-components/button-question/button-question.vue';
|
||||
import { getMountOptions } from '@/helpers/unit-test-helper.js';
|
||||
|
|
|
|||
|
|
@ -593,7 +593,6 @@ export default {
|
|||
this.findFirstAvailableDateInView();
|
||||
let attempts = 0;
|
||||
while (!this.selectedDate && attempts < 5) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await this.gotoNextPage();
|
||||
attempts += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ import { useForm } from 'vee-validate';
|
|||
import { modalPositions } from '@/constants/component-variants';
|
||||
|
||||
export default {
|
||||
// eslint-disable-next-line vue/multi-word-component-names
|
||||
name: 'modal',
|
||||
components: {
|
||||
ButtonMain
|
||||
|
|
@ -103,7 +102,6 @@ export default {
|
|||
// TODO: Correct Duplicate key 'modalId' issue.
|
||||
// Probably just rename the prop. -br
|
||||
return {
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
modalId,
|
||||
meta,
|
||||
validate,
|
||||
|
|
|
|||
|
|
@ -157,7 +157,6 @@ export default {
|
|||
initialValue
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
const { errorMessage, handleBlur, handleChange, meta, validate, errors } =
|
||||
useField(props.inputId, props.validationRules, fieldOptions);
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export default {
|
|||
);
|
||||
}
|
||||
|
||||
if (error.response.status != '404') {
|
||||
if (error.response.status !== 404) {
|
||||
global.$logger.logError(
|
||||
`${method}: ${endpoint}: ${error.message}`,
|
||||
error.response
|
||||
|
|
|
|||
|
|
@ -1,8 +1,3 @@
|
|||
/* eslint-disable no-use-before-define */
|
||||
/* eslint-disable no-param-reassign */
|
||||
/* eslint-disable jsdoc/require-param-type */
|
||||
/* eslint-disable jsdoc/require-param-description */
|
||||
/* eslint-disable jsdoc/require-returns */
|
||||
import dynamicStrings from '@/constants/dynamic-strings';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
|
|
@ -300,7 +295,6 @@ function mapStringToState(str) {
|
|||
// Our final string value that will be built from the matches.
|
||||
const stringBuilder = '';
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const match of globalStateMatches) {
|
||||
// Reset store state for each match.
|
||||
const valueFromStore = getStoreValueFromString(match[2]);
|
||||
|
|
@ -331,12 +325,10 @@ function getStoreValueFromString(str) {
|
|||
if (!str) return '';
|
||||
|
||||
let storeOrStateObject = useMainStore();
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const s of str.split('.')) {
|
||||
if (s === 'getters') continue; // For backward compatibility
|
||||
// TODO: I don't think this next line is doing what they think it's doing.
|
||||
// eslint-disable-next-line eqeqeq, valid-typeof
|
||||
if (typeof storeOrStateObject[s] != undefined) {
|
||||
if (typeof storeOrStateObject[s] !== "undefined") {
|
||||
storeOrStateObject = storeOrStateObject[s];
|
||||
} else {
|
||||
break;
|
||||
|
|
@ -384,13 +376,11 @@ export function processIfStatements(str, ifConditionKeyword, replacePlaceholderC
|
|||
*/
|
||||
function getAndFlagFirstNonNestedIfStatementWithKeyword(matches, ifConditionKeyword) {
|
||||
let index = 0;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const match of matches) {
|
||||
if (match.groups.isIfStatement && match.groups.ifConditionType === ifConditionKeyword) {
|
||||
let interiorIndex = 0;
|
||||
let nestedLevel = 0;
|
||||
let elseStatementIndex = null;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const interiorMatch of matches.slice(index + 1)) {
|
||||
if (interiorMatch.groups.isIfStatement) {
|
||||
if (interiorMatch.groups.ifConditionType === ifConditionKeyword) {
|
||||
|
|
@ -539,7 +529,6 @@ export function doesCopyContainTextLink(copy) {
|
|||
export function setupModalLinks(context) {
|
||||
context.$nextTick(() => {
|
||||
const elements = document.getElementsByClassName('modal-text');
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const element of elements) {
|
||||
const target = element.getAttribute('modalTarget');
|
||||
if (target) {
|
||||
|
|
@ -626,7 +615,7 @@ export function getRouterLinkHtmlStringFromCopy(copy) {
|
|||
|
||||
/**
|
||||
* Returns a phone link as an 'a' tag element
|
||||
* @param copy
|
||||
* @param phoneNumber
|
||||
* @returns string
|
||||
*/
|
||||
export function getPhoneLinkHtmlStringFromPhoneNumber(phoneNumber) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { useMainStore } from '@/store';
|
|||
* @function isLocalhost
|
||||
*/
|
||||
function isLocalhost() {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
return location.hostname.includes('localhost');
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +29,6 @@ function getCookieValueByName(name) {
|
|||
Gets current domain without the subdomain for cookie.
|
||||
*/
|
||||
function getDomainWithoutSubdomain() {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
const url = location.hostname;
|
||||
if (isLocalhost()) {
|
||||
return 'localhost';
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ function hasMatchingReplacementOption(vehicleDamageOptions, selectedGlassToRepla
|
|||
Rear: 'backGlassOptions'
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const glassToReplace of selectedGlassToReplace) {
|
||||
const propName = optionsMap[glassToReplace.glassLocation];
|
||||
const { availableReplacementOptions } = vehicleDamageOptions[propName];
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ export function getDateFormat(date, format) {
|
|||
const hour = (`0${date.getHours()}`).slice(-2);
|
||||
const minute = (`0${date.getMinutes()}`).slice(-2);
|
||||
const second = (`0${date.getSeconds()}`).slice(-2);
|
||||
// eslint-disable-next-line consistent-return
|
||||
return format
|
||||
.replace('yyyy', year)
|
||||
.replace('MM', month)
|
||||
|
|
@ -147,7 +146,6 @@ export function getDateFormat(date, format) {
|
|||
|
||||
export function padTo2Digits(time) {
|
||||
// Use the built-in method toString() with a radix of 10 to convert the time value to a decimal string
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
time = time.toString(10);
|
||||
// Use the conditional operator to check if the length of the string is less than 2
|
||||
return time.length < 2
|
||||
|
|
@ -172,7 +170,6 @@ export function convertMsToTime(milliseconds) {
|
|||
export function calculateDuration(startDate, endDate) {
|
||||
if (startDate instanceof Date !== true) return;
|
||||
if (endDate instanceof Date !== true) return;
|
||||
// eslint-disable-next-line consistent-return
|
||||
return convertMsToTime(endDate - startDate);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
import { experimentSettings } from '@/constants/experiments';
|
||||
|
||||
export function hasExperimentSetting(storeExperimentSettings, settingName) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function getLineItemsFlattened(lineItems) {
|
||||
return lineItems?.flatMap((li) => [li, ...(getLineItemsFlattened(li.childParts))]) ?? [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ export function deepClone(object) {
|
|||
}
|
||||
|
||||
const clone = { ...object };
|
||||
// eslint-disable-next-line no-return-assign
|
||||
Object.keys(clone).forEach((key) =>
|
||||
(clone[key] = typeof object[key] === 'object' ? deepClone(object[key]) : object[key]));
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
export function getPriceOfLineItem(lineItem) {
|
||||
let price = (lineItem.kitPrice ?? 0) + (lineItem.laborAmount ?? 0) + (lineItem.sellingPrice ?? 0);
|
||||
if (lineItem.childParts && lineItem.childParts.length !== 0) {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
price += getPriceOfLineItems(lineItem.childParts);
|
||||
}
|
||||
return price;
|
||||
|
|
@ -15,7 +14,6 @@ export function getPriceOfLineItem(lineItem) {
|
|||
export function getSalesTaxOfLineItem(lineItem) {
|
||||
let price = lineItem.salesTax ?? 0;
|
||||
if (lineItem.childParts && lineItem.childParts.length !== 0) {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
price += getTaxOfLineItems(lineItem.childParts);
|
||||
}
|
||||
return price;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ describe('querystring-helper', () => {
|
|||
const result = getLineItemQueryString(lineItems, 'param');
|
||||
|
||||
// Assert
|
||||
// eslint-disable-next-line max-len
|
||||
expect(result).toBe('¶m[0].partNumber=a¶m[1].partNumber=b¶m[2].partNumber=c¶m[3].partNumber=d¶m[4].partNumber=e');
|
||||
});
|
||||
});
|
||||
|
|
@ -74,7 +73,6 @@ describe('querystring-helper', () => {
|
|||
const result = getTaxLineItemQueryString(lineItems, 'param');
|
||||
|
||||
// Assert
|
||||
// eslint-disable-next-line max-len
|
||||
expect(result).toBe('¶m[0].partNumber=a¶m[0].laborAmount=0¶m[0].sellingPrice=10¶m[0].kitPrice=10¶m[1].partNumber=b¶m[1].laborAmount=10¶m[1].sellingPrice=10¶m[1].kitPrice=0¶m[2].partNumber=c¶m[2].laborAmount=5¶m[2].sellingPrice=5¶m[2].kitPrice=5¶m[3].partNumber=d¶m[3].laborAmount=10¶m[3].sellingPrice=10¶m[3].kitPrice=10');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ const currencyFormatter = new Intl.NumberFormat('en-US', {
|
|||
|
||||
/**
|
||||
* @function formatAmountInDollars
|
||||
* @param {string, number} amount
|
||||
* @param {string | number} amount
|
||||
* @returns {string}
|
||||
*/
|
||||
export function formatAmountInDollars(amount) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { RouterLinkStub } from '@vue/test-utils';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
|
||||
|
|
@ -60,9 +59,7 @@ export function getMountOptions(mockData) {
|
|||
|
||||
// Heritage integration common methods
|
||||
export const cookies = {
|
||||
[cookieNames.ISS_SESSION_INFO]:
|
||||
// eslint-disable-next-line max-len
|
||||
'{"ReferralNumber":"1566818","ReferralDate":"2022-03-15T10:56:24.597","ReferralCorrelationId":"404d2b04-f86e-45c3-b373-127b6217b060","ShouldResetState":false}',
|
||||
[cookieNames.ISS_SESSION_INFO]: '{"ReferralNumber":"1566818","ReferralDate":"2022-03-15T10:56:24.597","ReferralCorrelationId":"404d2b04-f86e-45c3-b373-127b6217b060","ShouldResetState":false}',
|
||||
UNIQUE_SESSION_ID: '33756020-b58e-4ec7-b8b8-3f1576719c40',
|
||||
anotherCookie: '{}',
|
||||
someOtherCookie: '{}',
|
||||
|
|
|
|||
|
|
@ -232,7 +232,6 @@ export default {
|
|||
const self = this;
|
||||
this.$nextTick(() => {
|
||||
this.showAllFields = true;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
let processedStreetAddress = false;
|
||||
let processedRoute = false;
|
||||
for (const component of googlePlace.address_components) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, propsData
|
|||
|
||||
async function awaitingSetupTicks(wrapper) {
|
||||
for (let i = 0; i < 11; i++) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await wrapper.vm.$nextTick();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ export default {
|
|||
const map = await this.getMap(zipBounds?.getCenter());
|
||||
|
||||
await this.addMarkersToMap(map, markerPositions);
|
||||
let positionsToDisplay = markerPositions.map((marker) => marker.position);
|
||||
if(zipBounds) {
|
||||
const positionsToDisplay = markerPositions.map((marker) => marker.position);
|
||||
if (zipBounds) {
|
||||
positionsToDisplay.push(zipBounds.getNorthEast());
|
||||
positionsToDisplay.push(zipBounds.getSouthWest());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
// Components
|
||||
import questionsPageLayout from '@/iss-components/questions-page-layout/questions-page-layout.vue';
|
||||
|
||||
|
|
|
|||
|
|
@ -167,9 +167,7 @@ describe('address-lookup.vue', () => {
|
|||
expect(wrapper.findComponent({ ref: 'alertMatchedTwoIdenticalYMMVehicle' }).isVisible()).toBe(true);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test(
|
||||
'if the looking up VIN by address is not allowed in the state selected display the Vin Lookup By HomeAddress Not Allowed Alert',
|
||||
test('if the looking up VIN by address is not allowed in the state selected display the Vin Lookup By HomeAddress Not Allowed Alert',
|
||||
async () => {
|
||||
// Arrange
|
||||
const mockRegistrationAddress = {
|
||||
|
|
@ -364,9 +362,7 @@ describe('address-lookup.vue', () => {
|
|||
);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test(
|
||||
'if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
|
||||
test('if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
|
||||
async () => {
|
||||
// Arrange
|
||||
const mockRegistrationAddress = {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ export default {
|
|||
siteSubHeader,
|
||||
customerQuestions,
|
||||
alert,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [baseFormMixin, vinPagesMixin],
|
||||
|
|
@ -153,9 +152,7 @@ export default {
|
|||
).replaceAll('{custom:damage}', getDamageString());
|
||||
},
|
||||
AlertMatchedDifferentVehicleBody() {
|
||||
const vinYmmFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmExpected = `${useMainStore().order.vehicle.year} ${
|
||||
useMainStore().order.vehicle.make
|
||||
} ${useMainStore().order.vehicle.model}`;
|
||||
|
|
@ -175,12 +172,8 @@ export default {
|
|||
).replaceAll('{custom:damage}', getDamageString());
|
||||
},
|
||||
AlertMatchedTwoIdenticalYMMVehicleBody() {
|
||||
const vinYmmsFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
|
||||
const vinYmmsExpected =
|
||||
// eslint-disable-next-line max-len
|
||||
`${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model} ${useMainStore().order.vehicle.style}`;
|
||||
const vinYmmsFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
|
||||
const vinYmmsExpected = `${useMainStore().order.vehicle.year} ${useMainStore().order.vehicle.make} ${useMainStore().order.vehicle.model} ${useMainStore().order.vehicle.style}`;
|
||||
|
||||
return this.getCmsContent(
|
||||
'AlertMatchedTwoIdenticalYMMVehicleWidget',
|
||||
|
|
@ -191,9 +184,7 @@ export default {
|
|||
.replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected);
|
||||
},
|
||||
isTwoIdenticalYMMVehicleFound() {
|
||||
const vinYmmFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmExpected = `${useMainStore().order.vehicle.year} ${
|
||||
useMainStore().order.vehicle.make
|
||||
} ${useMainStore().order.vehicle.model}`;
|
||||
|
|
@ -290,9 +281,7 @@ export default {
|
|||
|
||||
// Update button "Continue with..."
|
||||
showIssLoadingModal(false);
|
||||
return this.$refs.siteFooter
|
||||
// eslint-disable-next-line max-len
|
||||
.updateButtonText(`Continue with ${carFound.year} ${carFound.make} ${carFound.model} ${this.forwardButtonCarStyle}`);
|
||||
return this.$refs.siteFooter.updateButtonText(`Continue with ${carFound.year} ${carFound.make} ${carFound.model} ${this.forwardButtonCarStyle}`);
|
||||
}
|
||||
|
||||
// update data
|
||||
|
|
|
|||
|
|
@ -81,11 +81,8 @@ export default {
|
|||
).replaceAll('{custom:damage}', getDamageString());
|
||||
},
|
||||
AlertMatchedTwoIdenticalYMMVehicleBody() {
|
||||
const vinYmmsFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.selectedVehicle?.vehicle.year} ${this.selectedVehicle?.vehicle.make} ${this.selectedVehicle?.vehicle.model} ${this.selectedVehicle?.vehicle.style}`;
|
||||
const vinYmmsExpected =
|
||||
`${this.vehicleSelected?.year} ${this.vehicleSelected?.make} ${this.vehicleSelected?.model} ${this.vehicleSelected?.style}`;
|
||||
const vinYmmsFound = `${this.selectedVehicle?.vehicle.year} ${this.selectedVehicle?.vehicle.make} ${this.selectedVehicle?.vehicle.model} ${this.selectedVehicle?.vehicle.style}`;
|
||||
const vinYmmsExpected = `${this.vehicleSelected?.year} ${this.vehicleSelected?.make} ${this.vehicleSelected?.model} ${this.vehicleSelected?.style}`;
|
||||
|
||||
return this.getCmsContent('AlertMatchedTwoIdenticalYMMVehicleWidget', 'BodyText')
|
||||
.replaceAll('{custom:damage}', getDamageString())
|
||||
|
|
|
|||
|
|
@ -190,9 +190,7 @@ describe('address-vehicles.vue', () => {
|
|||
expect(wrapper.vm.forwardButtonAction).toReturn;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test(
|
||||
'Should navigate to CLICKED_FORWARD scenario if carId is different and selected glass not available for vehicle on navigateForward',
|
||||
test('Should navigate to CLICKED_FORWARD scenario if carId is different and selected glass not available for vehicle on navigateForward',
|
||||
async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ export default {
|
|||
siteFooter,
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert,
|
||||
addressVehiclesQuestion
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ export default {
|
|||
siteSubHeader,
|
||||
siteFooter,
|
||||
textboxQuestion,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
textBlock
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@ const baseStoreGettersPageData = () => ({
|
|||
capabilityQuestions: [
|
||||
{
|
||||
questionSequence: 1,
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the optional Lane-Keeping System which tugs on the steering wheel and/or beeps to alert you if you drift too close to the edge of the lane?',
|
||||
questionText: 'Is your vehicle equipped with the optional Lane-Keeping System which tugs on the steering wheel and/or beeps to alert you if you drift too close to the edge of the lane?',
|
||||
answers: [
|
||||
{
|
||||
answerResult1: 'DYNAMIC',
|
||||
|
|
@ -67,17 +65,13 @@ const baseStoreGettersDamage = () => ({
|
|||
result: 'FW04848',
|
||||
answeredQuestions: [
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
selectedAnswer: '1|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 1
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
selectedAnswer: '2|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 2
|
||||
|
|
@ -212,17 +206,13 @@ describe('capabilityQuestions.vue', () => {
|
|||
answerResult: 'FW04848',
|
||||
answeredQuestions: [
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
selectedAnswer: '1|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 1
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
selectedAnswer: '2|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 2
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ import questionsPageLayout from '@/iss-components/questions-page-layout/question
|
|||
export default {
|
||||
name: 'capability-questions',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
questionsPageLayout
|
||||
},
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ export default {
|
|||
checkbox,
|
||||
textareaQuestion,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert,
|
||||
buttonQuestion,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<!-- eslint-disable vue/no-v-html -->
|
||||
<template>
|
||||
<transition
|
||||
name="fade"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
// Components
|
||||
import coverageStatement from '@/layouts/coverage-statement/coverage-statement.vue';
|
||||
|
||||
|
|
@ -367,7 +366,6 @@ describe('coverageStatement.vue', () => {
|
|||
[false, coverageStatuses.NO_COVERAGE, coverageType.ITAC],
|
||||
[false, coverageStatuses.NO_COVERAGE, coverageType.Deductible]
|
||||
])('isQuoteDisplayed', (expected, status, type) => {
|
||||
// eslint-disable-next-line max-len
|
||||
test(`$returns ${expected} when coverageStatus is ${getEnumName(coverageStatuses, status)} and coverageType is ${getEnumName(coverageType, type)}`, () => {
|
||||
// Arrange
|
||||
const mainInitialState = {
|
||||
|
|
@ -725,7 +723,6 @@ describe('coverageStatement.vue', () => {
|
|||
// Act
|
||||
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
|
||||
for (let i = 0; i < 7; i++) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
|
|
@ -751,7 +748,6 @@ describe('coverageStatement.vue', () => {
|
|||
// Act
|
||||
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
|
||||
for (let i = 0; i < 7; i++) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await nextTick();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
<!-- eslint-disable vue/no-v-html -->
|
||||
<template>
|
||||
<Form
|
||||
ref="theForm"
|
||||
v-slot="{ meta }"
|
||||
@submit="onSubmit"
|
||||
@invalidSubmit="onInvalidSubmit">
|
||||
<div class="fade-on-route-transition coverage-statement">
|
||||
|
|
@ -141,7 +139,6 @@ export default {
|
|||
name: 'coverage-statement',
|
||||
components: {
|
||||
siteHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
contentGroupModal,
|
||||
buttonMain,
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ describe('duplicateCheck.vue', () => {
|
|||
expect(wrapper.vm.$router.navigate)
|
||||
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, undefined);
|
||||
});
|
||||
// eslint-disable-next-line max-len
|
||||
|
||||
test('coverageType deductible and loaded duplicate with policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE', async () => {
|
||||
// Arrange
|
||||
const vin = getRandomString(17, 17);
|
||||
|
|
@ -454,7 +454,7 @@ describe('duplicateCheck.vue', () => {
|
|||
expect(wrapper.vm.$router.navigate)
|
||||
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_POLICY_VEHICLE, undefined);
|
||||
});
|
||||
// eslint-disable-next-line max-len
|
||||
|
||||
test('coverageType deductible and loaded duplicate with non policy vehicle => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE', async () => {
|
||||
// Arrange
|
||||
const vin = getRandomString(17, 17);
|
||||
|
|
@ -482,7 +482,7 @@ describe('duplicateCheck.vue', () => {
|
|||
expect(wrapper.vm.$router.navigate)
|
||||
.toHaveBeenCalledWith(navigationScenarios.CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NON_POLICY_VEHICLE, undefined);
|
||||
});
|
||||
// eslint-disable-next-line max-len
|
||||
|
||||
test('coverageType deductible and loaded duplicate with no policy vehicles => CLICKED_FORWARD_LOADED_DUPLICATE_WITH_NO_POLICY_VEHICLES', async () => {
|
||||
// Arrange
|
||||
const { wrapper } = getMountedComponent({
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ export default {
|
|||
siteSubHeader,
|
||||
buttonQuestion,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
buttonMain
|
||||
},
|
||||
|
|
|
|||
|
|
@ -256,7 +256,6 @@ describe('license-plate-lookup.vue', () => {
|
|||
expect(wrapper.vm.navigateForwardWithSingleCarMatch).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len, function-paren-newline
|
||||
test('if a different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page',
|
||||
async () => {
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ defineRule('state-required', required(errorMessages.STATE_REQUIRED));
|
|||
export default {
|
||||
name: 'license-plate-lookup',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
siteFooter,
|
||||
siteHeader,
|
||||
|
|
@ -169,11 +168,8 @@ export default {
|
|||
).replaceAll('{custom:damage}', getDamageString());
|
||||
},
|
||||
AlertMatchedDifferentVehicleBody() {
|
||||
const vinYmmFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make}
|
||||
${this.mainStore.order.vehicle.model}`;
|
||||
const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`;
|
||||
|
||||
return this.getCmsContent(
|
||||
'AlertMatchedDifferentVehicleWidget',
|
||||
|
|
@ -190,12 +186,8 @@ export default {
|
|||
).replaceAll('{custom:damage}', getDamageString());
|
||||
},
|
||||
AlertMatchedTwoIdenticalYMMVehicleBody() {
|
||||
const vinYmmsFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
|
||||
const vinYmmsExpected =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model} ${this.mainStore.order.vehicle.style}`;
|
||||
const vinYmmsFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model} ${this.customAlertData?.vehicleInfo?.style}`;
|
||||
const vinYmmsExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model} ${this.mainStore.order.vehicle.style}`;
|
||||
|
||||
return this.getCmsContent(
|
||||
'AlertMatchedTwoIdenticalYMMVehicleWidget',
|
||||
|
|
@ -206,9 +198,7 @@ export default {
|
|||
.replaceAll('{custom:vinYmmsExpected}', vinYmmsExpected);
|
||||
},
|
||||
isTwoIdenticalYMMVehicleFound() {
|
||||
const vinYmmFound =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmFound = `${this.customAlertData?.vehicleInfo?.year} ${this.customAlertData?.vehicleInfo?.make} ${this.customAlertData?.vehicleInfo?.model}`;
|
||||
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make}
|
||||
${this.mainStore.order.vehicle.model}`;
|
||||
return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase();
|
||||
|
|
@ -300,9 +290,7 @@ export default {
|
|||
showIssLoadingModal(false);
|
||||
|
||||
// Update button "Continue with..."
|
||||
return this.$refs.siteFooter
|
||||
// eslint-disable-next-line max-len
|
||||
.updateButtonText(`Continue with ${vehicleFromLookup.year} ${vehicleFromLookup.make} ${vehicleFromLookup.model} ${this.forwardButtonCarStyle}`);
|
||||
return this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleFromLookup.year} ${vehicleFromLookup.make} ${vehicleFromLookup.model} ${this.forwardButtonCarStyle}`);
|
||||
}
|
||||
|
||||
// Save vehicle, license plate, and registration information
|
||||
|
|
|
|||
|
|
@ -132,17 +132,13 @@ const baseStoreGettersDamage = () => ({
|
|||
result: 'FW04848',
|
||||
answeredQuestions: [
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
selectedAnswer: '1|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 1
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
selectedAnswer: '2|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 2
|
||||
|
|
@ -219,17 +215,13 @@ describe('moldingQuestions.vue', () => {
|
|||
answerResult: 'FW04848',
|
||||
answeredQuestions: [
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
selectedAnswer: '1|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 1
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
selectedAnswer: '2|nextQuestion|3|Yes',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 2
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import questionsPageLayout from '@/iss-components/questions-page-layout/question
|
|||
export default {
|
||||
name: 'molding-questions',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
questionsPageLayout
|
||||
},
|
||||
|
|
@ -150,7 +149,6 @@ export default {
|
|||
|
||||
// get parts from the questionAnswers
|
||||
const partsOrQuestions = this.partsOrQuestionsData;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const answer of questionAnswersArray) {
|
||||
partsOrQuestions.find((partOrQuestion) =>
|
||||
partOrQuestion.glassLocation === answer.glassLocation
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.add-to-calendar-text {
|
||||
margin: 0 0 0 0.4375rem;
|
||||
color: #1574a1;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import { defineRule, useField } from 'vee-validate';
|
|||
import errorMessages from '@/constants/error-messages.js';
|
||||
import { required } from '@/helpers/validation-rules';
|
||||
import { deepClone } from '@/helpers/object-helper';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import calendarModalListButton from './calendar-modal-list-button/calendar-modal-list-button.vue';
|
||||
// Validation for the modal button
|
||||
|
|
@ -145,7 +144,6 @@ export default {
|
|||
},
|
||||
|
||||
getSelectedCalendarObject(calendarOptionId) {
|
||||
// eslint-disable-next-line no-shadow
|
||||
const calendarOption = this.calendarOptionsData?.find((calendarOption) => calendarOption.name === calendarOptionId);
|
||||
|
||||
if (calendarOption) {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ import widgetFields from '@/constants/cms-widget-fields.js';
|
|||
export default {
|
||||
name: 'order-confirmation',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
siteHeader,
|
||||
siteFooter,
|
||||
|
|
|
|||
|
|
@ -90,9 +90,7 @@ const baseStoreGettersPageData = () => ({
|
|||
partQuestions: [
|
||||
{
|
||||
questionSequence: 1,
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
answers: [
|
||||
{
|
||||
answerResult: '',
|
||||
|
|
@ -122,16 +120,12 @@ const baseStoreGettersDamage = () => ({
|
|||
result: 'FW04848',
|
||||
answeredQuestions: [
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 1
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
selectedAnswerText: 'Yes',
|
||||
questionNum: 2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios'
|
|||
export default {
|
||||
name: 'part-questions',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
questionsPageLayout,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
import { getMountOptions } from '@/helpers/unit-test-helper.js';
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
import paymentMethodListButton from '@/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue';
|
||||
|
||||
const testConstants = {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ import { supportsApplePay } from '@/helpers/browser-helper';
|
|||
export default {
|
||||
name: 'payment-method',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
|
|
|
|||
|
|
@ -416,7 +416,6 @@ export default {
|
|||
cartDropdown,
|
||||
siteHeader,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import showIssLoadingModal from '@/helpers/loading-modal-helper';
|
|||
export default {
|
||||
name: 'payment-return',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ export default {
|
|||
siteSubHeader,
|
||||
siteFooter,
|
||||
buttonQuestion,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ export default {
|
|||
textboxQuestion,
|
||||
addressQuestions,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -93,10 +93,7 @@ describe('policy-vehicles.vue', () => {
|
|||
});
|
||||
|
||||
describe('forwardButtonAction', () => {
|
||||
// eslint-disable-next-line max-len
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'Selected VIN matches vehicle listed in system => update vehicle and navigate forward with CLICKED_FORWARD_LISTED_VEHICLE scenario.',
|
||||
test('Selected VIN matches vehicle listed in system => update vehicle and navigate forward with CLICKED_FORWARD_LISTED_VEHICLE scenario.',
|
||||
async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
|
@ -150,9 +147,7 @@ describe('policy-vehicles.vue', () => {
|
|||
}
|
||||
);
|
||||
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'Selected VIN matches vehicle listed in system and policy vehicle has Educator endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
|
||||
test('Selected VIN matches vehicle listed in system and policy vehicle has Educator endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
|
||||
async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
|
@ -203,9 +198,7 @@ describe('policy-vehicles.vue', () => {
|
|||
}
|
||||
);
|
||||
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'Selected VIN matches vehicle listed in system and policy vehicle has Parking Guard endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
|
||||
test('Selected VIN matches vehicle listed in system and policy vehicle has Parking Guard endorsement => update vehicle and navigate forward with CLICKED_FORWARD_WITH_ENDORSEMENTS scenario.',
|
||||
async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
|
@ -285,7 +278,6 @@ describe('policy-vehicles.vue', () => {
|
|||
await wrapper.vm.forwardButtonAction();
|
||||
|
||||
// Assert
|
||||
// eslint-disable-next-line max-len
|
||||
expect(wrapper.vm.mainStore.setBailout).toHaveBeenCalledWith(bailoutMessage.vehicleVinLookupError(vin, lookupReturnValue.data));
|
||||
expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith(
|
||||
navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
|
|
@ -296,9 +288,7 @@ describe('policy-vehicles.vue', () => {
|
|||
}
|
||||
);
|
||||
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'Vehicle not found in lookupVehicleByVin call => policyVinFound false and navigate forward with CLICKED_FORWARD_WITH_CAR_ID_NOT_FOUND scenario.',
|
||||
test('Vehicle not found in lookupVehicleByVin call => policyVinFound false and navigate forward with CLICKED_FORWARD_WITH_CAR_ID_NOT_FOUND scenario.',
|
||||
async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ export default {
|
|||
siteHeader,
|
||||
siteFooter,
|
||||
policyVehiclesQuestion,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert
|
||||
},
|
||||
|
|
|
|||
|
|
@ -88,9 +88,7 @@ export default {
|
|||
siteFooter,
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
buttonQuestion,
|
||||
buttonMain,
|
||||
steeringModal,
|
||||
tpaRecalModal,
|
||||
|
|
@ -111,7 +109,7 @@ export default {
|
|||
vm.setCmsContent(resultMap.cmsContent);
|
||||
// open steering modal if it has body text, the state is defined in the CMS content and doesn't
|
||||
// populate if the state is not listed in the CMS content
|
||||
if (!!vm.$refs[STEERING_MODAL_REF_NAME].ModalBodyText) {
|
||||
if (vm.$refs[STEERING_MODAL_REF_NAME].ModalBodyText) {
|
||||
vm.openStateSteeringModal();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export default {
|
|||
},
|
||||
|
||||
footerButtonClick() {
|
||||
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged )) {
|
||||
if (this.tpaRecalAnswer && (!this.showAcknowledgementCheckbox || this.acknowledged)) {
|
||||
this.$refs[this.ModalName]?.closeModal();
|
||||
this.$emit('buttonClick', this.tpaRecalAnswer);
|
||||
} else if (!this.tpaRecalAnswer) {
|
||||
|
|
@ -182,7 +182,6 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
.form-test-error {
|
||||
p {
|
||||
font-weight: 500;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import { render } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import issPageValues from '@/router/router-constants/issPage-values';
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ const getAvailableDates = async (
|
|||
storeAction.payload.shopAppointmentType,
|
||||
storeAction.payload.providerNumber
|
||||
).catch(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('Error fetching shop time slots...');
|
||||
});
|
||||
} else if (storeAction.payload?.zipCodeOverride) {
|
||||
|
|
@ -186,7 +185,6 @@ const getAvailableDates = async (
|
|||
storeAction.payload.endDate,
|
||||
storeAction.payload.zipCodeOverride
|
||||
).catch(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('Error fetching mobile time slots...');
|
||||
});
|
||||
}
|
||||
|
|
@ -220,7 +218,6 @@ export default {
|
|||
datePicker,
|
||||
serviceLocation,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ import {
|
|||
getServiceabilityDetails
|
||||
} from '@/helpers/service-location-helper';
|
||||
import { deepClone } from '@/helpers/object-helper.js';
|
||||
// eslint-disable-next-line max-len
|
||||
import vehicleProtectedQuestion from '@/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue';
|
||||
|
||||
export default {
|
||||
|
|
@ -195,7 +194,6 @@ export default {
|
|||
&& this.addressModel.zipCode !== ''
|
||||
&& this.internalModel.isVehicleProtected !== null
|
||||
) {
|
||||
// eslint-disable-next-line max-len
|
||||
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
|
||||
}
|
||||
return this.getCmsContent(this.linkWidgetName, 'BodyText');
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ export default {
|
|||
buttonQuestion
|
||||
},
|
||||
props: {
|
||||
// eslint-disable-next-line vue/require-prop-types
|
||||
modelValue: {
|
||||
isVehicleProtected: Boolean
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import baseMixin from '@/mixins/base-mixin';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
|
|
|
|||
|
|
@ -489,7 +489,6 @@ export default {
|
|||
this.setMobileProviderNumber(initialData.providers.mobileProviderNumber);
|
||||
let foundMatch = false;
|
||||
if (this.selectedProvider && this.selectedProvider.providerNumber) {
|
||||
// eslint-disable-next-line max-len
|
||||
const matchedProvider = initialData.providers.shopProviders.find((provider) => provider.providerNumber === this.selectedProvider.providerNumber);
|
||||
if (matchedProvider) {
|
||||
foundMatch = true;
|
||||
|
|
@ -497,7 +496,6 @@ export default {
|
|||
}
|
||||
}
|
||||
if (initialData.providers.shopProviders.length > 0 && !foundMatch) {
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
this.selectedProvider = initialData.providers.shopProviders[0];
|
||||
} else if (initialData.providers.shopProviders.length === 0) {
|
||||
this.selectedProvider = null;
|
||||
|
|
@ -563,7 +561,6 @@ export default {
|
|||
if (providers) {
|
||||
this.setMobileProviderNumber(providers.mobileProviderNumber);
|
||||
if (providers.shopProviders.length > 0) {
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
this.selectedProvider = providers.shopProviders[0];
|
||||
} else {
|
||||
this.selectedProvider = null;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ export default {
|
|||
return toTitleCase(this.modelValue.companyName);
|
||||
},
|
||||
modalHeaderText() {
|
||||
// eslint-disable-next-line max-len
|
||||
return this.getCmsContent(this.modalWidgetName, widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT).replaceAll('{custom:serviceZipcode}', this.internalZipcode);
|
||||
},
|
||||
modalFooterText() {
|
||||
|
|
@ -262,14 +261,12 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// eslint-disable-next-line consistent-return
|
||||
async updateShops(autoExpand = false) {
|
||||
this.errorMessage = '';
|
||||
let result = await this.getNearbyShops(this.searchRadiusInMiles);
|
||||
let currentSearchIndex = this.searchRadiusArray.findIndex((option) => option.Name === this.searchRadiusInMiles);
|
||||
while (autoExpand && result.length === 0 && currentSearchIndex < this.searchRadiusArray.length - 1) {
|
||||
const newSearchRadius = this.searchRadiusArray[currentSearchIndex + 1].Name;
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
result = await this.getNearbyShops(newSearchRadius);
|
||||
currentSearchIndex += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ export default {
|
|||
siteHeader,
|
||||
siteFooter,
|
||||
siteSubHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
servicePackageQuestion,
|
||||
loadingModal,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ export default {
|
|||
siteHeader,
|
||||
siteFooter,
|
||||
textBlock,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ describe('TPA search page', () => {
|
|||
// Assert
|
||||
expect(preferredShopNotListedLink.exists()).toBeTruthy();
|
||||
expect(preferredShopNotListedLink.props().linkType).toBe('navigation');
|
||||
// eslint-disable-next-line no-script-url
|
||||
expect(preferredShopNotListedLink.props().href).toBe('javascript:void(0)');
|
||||
});
|
||||
test('site footer', () => {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ async function getInitialSearchData() {
|
|||
const pair = radiusFilterPairs[pairIndex];
|
||||
radius = pair.radius;
|
||||
filter = pair.filter;
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const result = await useMainStore().getTpaProviders(zipCode, radius);
|
||||
providers = result?.data?.shopProviders ?? [];
|
||||
|
||||
|
|
@ -195,7 +194,6 @@ export default {
|
|||
loader,
|
||||
googleMap,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
|
|||
|
|
@ -131,12 +131,10 @@ export default {
|
|||
components: {
|
||||
siteHeader,
|
||||
textBlock,
|
||||
buttonMain,
|
||||
reviewBlock,
|
||||
deductibleBox,
|
||||
siteFooter,
|
||||
contactDetailsDrawer,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert,
|
||||
modal
|
||||
|
|
@ -300,7 +298,6 @@ export default {
|
|||
this.getEditShopLinkText,
|
||||
() => this.navigate(this.navigationScenarios.EDIT_PREFERRED_SHOP)
|
||||
),
|
||||
// eslint-disable-next-line max-len
|
||||
this.getSection(
|
||||
this.getContactInfoTitle,
|
||||
this.getContactInfoLines,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ export default {
|
|||
watch: {
|
||||
isAvailable(val) {
|
||||
// CHECK TO UPDATE SELECTED VALUES WHEN ISAVAILABLE IS TRUE
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
val && this.updateSelectedValues();
|
||||
},
|
||||
shouldDisplayReplaceOptionsQuestion(shouldDisplayReplaceOptionsQuestion) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import { mount, flushPromises } from '@vue/test-utils';
|
||||
import { createTestingPinia } from '@pinia/testing';
|
||||
import navigationScenarios from '@/router/router-constants/navigation-scenarios';
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ export default {
|
|||
damageLocationQuestion,
|
||||
windshieldOptions,
|
||||
replaceOptionsQuestion,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
alert
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
// eslint-disable-next-line max-len
|
||||
import windshieldChipCountQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue';
|
||||
import { getMountOptions } from '@/helpers/unit-test-helper.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
// eslint-disable-next-line max-len
|
||||
import windshieldDamageTypeQuestion from '@/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue';
|
||||
import { getMountOptions } from '@/helpers/unit-test-helper.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import { mount } from '@vue/test-utils';
|
||||
import baseMixin from '@/mixins/base-mixin';
|
||||
import navigationScenarios from '@/router/router-constants/navigation-scenarios';
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ import TextBlock from '@/digital-components/text-block/text-block.vue';
|
|||
export default {
|
||||
name: 'vehicle-lookup',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
SiteFooter,
|
||||
siteHeader,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ import { useMainStore } from '@/store';
|
|||
export default {
|
||||
name: 'vehicle-parts',
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
glassPartQuestion,
|
||||
siteHeader,
|
||||
|
|
@ -115,7 +114,6 @@ export default {
|
|||
selectedGlassPartNumbers() {
|
||||
// Compile all selected parts from the page.
|
||||
const numberArray = [];
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const glassPart of Object.values(this.selectedGlassParts)) {
|
||||
if (glassPart?.partNumber) {
|
||||
numberArray.push(glassPart.partNumber);
|
||||
|
|
@ -174,9 +172,7 @@ export default {
|
|||
const matchedParts = [];
|
||||
|
||||
// Match them to the parts from the API.
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const [key, value] of Object.entries(this.PartsFromApi.partsOrQuestions)) {
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const [partKey, partValue] of Object.entries(value.parts)) {
|
||||
const currentPart =
|
||||
this.PartsFromApi.partsOrQuestions[key].parts[partKey];
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ export default {
|
|||
siteHeader,
|
||||
siteSubHeader,
|
||||
siteFooter,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
vehicleQuestion,
|
||||
alert
|
||||
|
|
@ -223,7 +222,6 @@ export default {
|
|||
);
|
||||
},
|
||||
(error) => {
|
||||
// eslint-disable-next-line max-len
|
||||
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, this.mainStore.vehicle.style, error));
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
|
|
@ -260,7 +258,6 @@ export default {
|
|||
return this.mainStore.getVehicleModels().then(
|
||||
(response) => response,
|
||||
(error) => {
|
||||
// eslint-disable-next-line max-len
|
||||
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, null, null, error));
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
|
|
@ -273,7 +270,6 @@ export default {
|
|||
return this.mainStore.getVehicleStyles().then(
|
||||
(response) => response,
|
||||
(error) => {
|
||||
// eslint-disable-next-line max-len
|
||||
this.mainStore.setBailout(bailoutMessage.vehicleYMMSLookupError(this.mainStore.vehicle.year, this.mainStore.vehicle.make, this.mainStore.vehicle.model, null, error));
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import { render } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import '@testing-library/jest-dom';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default {
|
|||
inject: ['vehicleFromLookup']
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
/**
|
||||
Override wrong margin-bottom rule in the Alert component.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
/**
|
||||
Override wrong margin-bottom rule in the Alert component.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
/**
|
||||
Override wrong margin-bottom rule in the Alert component.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import { getDamageString } from '@/helpers/damage-helper';
|
||||
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
|
||||
import { RouterLinkStub } from '@vue/test-utils';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-env jest */
|
||||
import '@testing-library/jest-dom';
|
||||
import { flushPromises } from '@vue/test-utils';
|
||||
import { render, waitFor } from '@testing-library/vue';
|
||||
|
|
@ -296,7 +295,6 @@ describe('vin-lookup.vue', () => {
|
|||
expect(mockRouter.navigateWithSpinner).toHaveBeenCalledWith(navigationScenarios.CLICKED_BACK, mockRoute);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Different vehicle is found than the one entered and the selected glass is not available for that vehicle, navigate back to vehicle-damage page.', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
@ -334,7 +332,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
|
||||
describe('Succesful navigateForward', () => {
|
||||
// eslint-disable-next-line max-len
|
||||
test('Vehicle with Part Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_PART_QUESTIONS', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
@ -366,7 +363,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Vehicle with Multiple Parts. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MULTIPLE_PARTS_TO_CHOOSE', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
@ -398,7 +394,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Vehicle with Molding Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_MOLDING_QUESTIONS', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
@ -430,7 +425,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Vehicle with Capability Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_CAPABILITY_QUESTIONS', async () => {
|
||||
const user = userEvent.setup();
|
||||
const store = useMainStore();
|
||||
|
|
@ -465,7 +459,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Vehicle no additional Parts or Questions. Click "Continue", execute navigate with navigationScenario.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
@ -525,7 +518,6 @@ describe('vin-lookup.vue', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('Policy Vehicle with invalid vin corrected. Click "Continue", execute navigate with navigationScenario.CORRECTED_VIN_FROM_POLICY_VEHICLE', async () => {
|
||||
const user = userEvent.setup();
|
||||
mountOptions.global.stubs.vinQuestion = false;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ export default {
|
|||
siteFooter,
|
||||
siteHeader,
|
||||
siteSubHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
vinLocationInformation,
|
||||
vinLookupAlerts,
|
||||
|
|
@ -140,9 +139,7 @@ export default {
|
|||
// TODO: Side effects in computed.
|
||||
if (this.vinPopulatedOnPageLoad) {
|
||||
// TODO: Modify to remove side effects in computed
|
||||
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||
this.needToLookupVehicle = false;
|
||||
const lastSixChars = this.vin.substring(11, this.vin.length);
|
||||
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
|
||||
|
|
@ -220,9 +217,7 @@ export default {
|
|||
vehicleLookupAlertTypes.NOT_MATCHED;
|
||||
}
|
||||
|
||||
const vehicleYearMakeModelStyle =
|
||||
// eslint-disable-next-line max-len
|
||||
`${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model} ${this.forwardButtonCarStyle}`;
|
||||
const vehicleYearMakeModelStyle = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model} ${this.forwardButtonCarStyle}`;
|
||||
this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModelStyle}`);
|
||||
this.needToLookupVehicle = false;
|
||||
showIssLoadingModal(false);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style lang="scss">
|
||||
#vin-question-wrapper .form-test-error {
|
||||
/**
|
||||
Override extra margin-bottom in the error message in TextboxQuestion
|
||||
|
|
|
|||
|
|
@ -196,7 +196,6 @@ export default {
|
|||
dropdownQuestion,
|
||||
siteFooter,
|
||||
textBlock,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form
|
||||
},
|
||||
mixins: [BaseFormMixin],
|
||||
|
|
@ -244,7 +243,6 @@ export default {
|
|||
damageOption: 'damage-option-required',
|
||||
extension: `${globalRules.EXTENSION_FORMAT}`,
|
||||
lossCity: `${globalRules.DATE_OF_LOSS_CITY_REQUIRED}|${globalRules.DATE_OF_LOSS_CITY_FORMAT}`,
|
||||
// eslint-disable-next-line max-len
|
||||
lossDate: `${globalRules.DATE_OF_LOSS_REQUIRED}|${globalRules.DATE_OF_LOSS_NOT_TEN_YEARS_PAST}|${globalRules.DATE_OF_LOSS_NOT_FUTURE}`,
|
||||
lossState: `${globalRules.DATE_OF_LOSS_STATE_REQUIRED}`,
|
||||
policyNumber: `${globalRules.POLICY_NUMBER_REQUIRED}|${globalRules.POLICY_NUMBER_FORMAT}`,
|
||||
|
|
@ -261,7 +259,6 @@ export default {
|
|||
);
|
||||
const damageCauseAnswersObj = {};
|
||||
if (damageCauseAnswers) {
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const answer of Object.values(damageCauseAnswers)) {
|
||||
if (answer?.Name) {
|
||||
damageCauseAnswersObj[answer.Name] = answer.Name;
|
||||
|
|
@ -287,7 +284,6 @@ export default {
|
|||
},
|
||||
getStates() {
|
||||
return Object.keys(states).reduce((acc, key) => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
acc[key] = states[key].toUpperCase();
|
||||
return acc;
|
||||
}, {});
|
||||
|
|
@ -460,7 +456,6 @@ export default {
|
|||
}
|
||||
});
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`Error on loading session from cookie ${error}`);
|
||||
this.startNewReferral();
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function getPageName(vm) {
|
|||
}
|
||||
// Vue Error Handling
|
||||
vueApp.config.errorHandler = (err, vm, info) => {
|
||||
const pageName= getPageName(vm);
|
||||
const pageName = getPageName(vm);
|
||||
global.$logger.logError(
|
||||
`Page Name - ${pageName} - ${info}: ${err.message}\n${err.stack}`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable import/no-cycle */
|
||||
import {
|
||||
areAllSessionCookiesSet,
|
||||
getDeviceIdValue,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ describe('analyticsMixin.js', () => {
|
|||
expect(expectedDataLayer).toEqual(expect.arrayContaining(window.dataLayer));
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
test('pushEventToGA, should call dataLayer push and ValueToLogTypes.LAST_5 logs only the last 3 characters for a 3 character string', () => {
|
||||
// Arrange
|
||||
window.dataLayer = [];
|
||||
|
|
|
|||
|
|
@ -407,7 +407,6 @@ export default {
|
|||
// go to capability-questions page and pass the partsData
|
||||
|
||||
// mimic part-questions page data for consistency
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const partOrQuestion of partsOrQuestions) {
|
||||
if (this.hasCapabilityQuestions([partOrQuestion])) {
|
||||
const capabilityQuestionsForGlassLocation =
|
||||
|
|
|
|||
|
|
@ -658,9 +658,7 @@ describe('vehicle-questions-mixin', () => {
|
|||
questions: [
|
||||
{
|
||||
questionSequence: 1,
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
questionText: 'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
||||
answers: [
|
||||
{
|
||||
answerResult: '',
|
||||
|
|
@ -677,9 +675,7 @@ describe('vehicle-questions-mixin', () => {
|
|||
},
|
||||
{
|
||||
questionSequence: 2,
|
||||
questionText:
|
||||
// eslint-disable-next-line max-len
|
||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
questionText: 'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
||||
answers: [
|
||||
{
|
||||
answerResult: 'FW04848',
|
||||
|
|
@ -1200,7 +1196,6 @@ describe('vehicle-questions-mixin', () => {
|
|||
|
||||
describe('and the duplicate has an answerResult', () => {
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'then any questions in the same glass piece that lead to the duplicate should be modified to just provide the duplicate\'s answerResult',
|
||||
async () => {
|
||||
// Arrange
|
||||
|
|
@ -2202,7 +2197,6 @@ describe('vehicle-questions-mixin', () => {
|
|||
});
|
||||
|
||||
test(
|
||||
// eslint-disable-next-line max-len
|
||||
'current page is molding questions and there are part questions, multiple parts to choose, and capability questions => go to vehicle-parts',
|
||||
() => {
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-use-before-define */
|
||||
import { createWebHistory, createRouter } from 'vue-router';
|
||||
import lazyLoadComponent from '@/router/dynamic-routing/component-loader';
|
||||
import issPageValues from '@/router/router-constants/issPage-values';
|
||||
|
|
@ -168,7 +167,6 @@ router.beforeEach(async (to, from) => {
|
|||
});
|
||||
|
||||
router.afterEach(async (to, from) => {
|
||||
/*eslint-disable-line*/
|
||||
const store = useMainStore();
|
||||
// Update lastPageVisited in the store
|
||||
store.updateLastPageVisited(to.name);
|
||||
|
|
@ -327,7 +325,6 @@ function navigate(
|
|||
function navigateToUrl(url, optionalQuery = {}) {
|
||||
// possibly show some loading screen in the future here.
|
||||
const externalUrl = new URL(url);
|
||||
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
||||
for (const queryKey in optionalQuery) {
|
||||
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* eslint-disable no-use-before-define */
|
||||
/* eslint-disable max-len */
|
||||
import { defineStore } from 'pinia';
|
||||
import applicationConfig from '@/constants/application-config';
|
||||
import bailoutCode from '@/constants/bailoutCode';
|
||||
|
|
@ -14,9 +12,7 @@ import partTypeStrings from '@/constants/part-type-strings';
|
|||
import { paymentMethods } from '@/constants/payment-method-constants';
|
||||
import { AppointmentTypeStrings } from '@/constants/schedule-constants';
|
||||
import webStorageConstants from '@/constants/web-storage-constants';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import globalMethods from '@/global-methods';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { getSessionKeyValue, getUserIdValue, deleteISSCookie, getDeviceIdValue } from '@/helpers/cookie-helper';
|
||||
import { convertDateStringToDate, getDateDifferenceInDays, militaryToTwelveHourTime } from '@/helpers/date-helper';
|
||||
import { getExperimentSettingValue, getFeatureTogglesPayloadObject } from '@/helpers/experiment-helper';
|
||||
|
|
@ -32,7 +28,6 @@ import {
|
|||
getTaxLineItemQueryString
|
||||
} from '@/helpers/querystring-helper';
|
||||
import { getTopLevelGlassPartsWithRecal } from '@/helpers/recal-helper';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { getDateForSavedSessionTimeout } from '@/helpers/session-helper';
|
||||
import issPageValues from '@/router/router-constants/issPage-values';
|
||||
|
||||
|
|
@ -1607,7 +1602,6 @@ export const useMainStore = defineStore({
|
|||
order.contactInfo.alternativePhone = data?.customer?.alternativePhone;
|
||||
order.contactInfo.requestTextUpdates = data?.customer?.isSmsOptIn;
|
||||
|
||||
|
||||
if (data?.customer?.address) {
|
||||
order.customer.address.streetAddress = data.customer?.address?.streetAddress;
|
||||
order.customer.address.streetAddress2 = data.customer?.address?.streetAddress2;
|
||||
|
|
@ -2450,7 +2444,7 @@ export const useMainStore = defineStore({
|
|||
|
||||
// populate initial state
|
||||
populateInitialState(forceReset) {
|
||||
if (!sessionStorage.getItem(storeId) || forceReset ) {
|
||||
if (!sessionStorage.getItem(storeId) || forceReset) {
|
||||
this.$state = state;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1080,7 +1080,7 @@ describe('Store', () => {
|
|||
vin: getRandomString(17, 17),
|
||||
licensePlateNumber: getRandomString(7, 7)
|
||||
};
|
||||
const customer= {
|
||||
const customer = {
|
||||
address: {
|
||||
streetAddress: getRandomString(10, 50),
|
||||
streetAddress2: getRandomString(5, 20),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
import { shallowMount, RouterLinkStub } from '@vue/test-utils';
|
||||
import { getMountOptions } from '@/helpers/unit-test-helper.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ import textLink from '@/ux-components/text-link/text-link.vue';
|
|||
import { Collapse } from 'bootstrap';
|
||||
|
||||
export default {
|
||||
// eslint-disable-next-line vue/multi-word-component-names
|
||||
name: 'alert',
|
||||
components: {
|
||||
textBlock,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
process.env.VUE_APP_CONSUMER_CF_DISTRO = 'https://digitalapi.dev.safelite.io';
|
||||
process.env.VUE_APP_CURRENT_ENVIRONMENT = 'Localhost';
|
||||
process.env.VUE_APP_CUSTOMER_PORTAL_URL = 'https://myaccountdev.safelite.com/';
|
||||
|
|
|
|||
Loading…
Reference in a new issue