Merge pull request #1138 from Safelite/feature/digital/CSR-1415
CSR-1415
This commit is contained in:
commit
418a29a08b
3 changed files with 18922 additions and 0 deletions
18896
src/constants/single-windshield-carid.js
Normal file
18896
src/constants/single-windshield-carid.js
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -8,6 +8,7 @@ import { storeActions } from "@/constants/store-actions";
|
||||||
import { applicationConfig } from "@/constants/application-config";
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
import { experimentTriggers } from "@/constants/experiments";
|
import { experimentTriggers } from "@/constants/experiments";
|
||||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected";
|
import { damageLocationsSelected } from "@/constants/damage-locations-selected";
|
||||||
|
import { singleWindshieldCarid } from "@/constants/single-windshield-carid";
|
||||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
||||||
|
|
@ -1530,6 +1531,10 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
|
context.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
|
||||||
},
|
},
|
||||||
isVinOptionalVehicle(context) {
|
isVinOptionalVehicle(context) {
|
||||||
|
if (singleWindshieldCarid.find((item) => item === context.state.order.vehicle.carId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
switch (context.state.order.vehicle.make.toLowerCase()) {
|
switch (context.state.order.vehicle.make.toLowerCase()) {
|
||||||
case "mercedes benz":
|
case "mercedes benz":
|
||||||
case "volkswagen":
|
case "volkswagen":
|
||||||
|
|
|
||||||
|
|
@ -2807,6 +2807,27 @@ describe("isVinOptionalVehicle", () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var vinOptionalResult = actions.isVinOptionalVehicle(context);
|
||||||
|
expect(vinOptionalResult).toEqual(expectedVinSkip);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const testcarID = [
|
||||||
|
["CR00000100", "make", false],
|
||||||
|
["CR00067899", "make2", true],
|
||||||
|
["CR00062396", "make3", true],
|
||||||
|
["CR00066428", "make4", false],
|
||||||
|
];
|
||||||
|
test.each(testcarID)(
|
||||||
|
"%s %s should skip vin lookup is %s",
|
||||||
|
async (carId, make, expectedVinSkip) => {
|
||||||
|
const context = state;
|
||||||
|
|
||||||
|
context.state = {
|
||||||
|
order: {
|
||||||
|
vehicle: { make: make, carId: carId },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
var vinOptionalResult = actions.isVinOptionalVehicle(context);
|
var vinOptionalResult = actions.isVinOptionalVehicle(context);
|
||||||
expect(vinOptionalResult).toEqual(expectedVinSkip);
|
expect(vinOptionalResult).toEqual(expectedVinSkip);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue