CSR-1415
Skip vinlookup
This commit is contained in:
parent
c0d4343c5a
commit
6b6051b2f7
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 { experimentTriggers } from "@/constants/experiments";
|
||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected";
|
||||
import { singleWindshieldCarid } from "@/constants/single-windshield-carid";
|
||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||
import router from "@/router";
|
||||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
||||
|
|
@ -1530,6 +1531,10 @@ export const actions = {
|
|||
context.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
|
||||
},
|
||||
isVinOptionalVehicle(context) {
|
||||
if (singleWindshieldCarid.find((item) => item === context.state.order.vehicle.carId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (context.state.order.vehicle.make.toLowerCase()) {
|
||||
case "mercedes benz":
|
||||
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);
|
||||
expect(vinOptionalResult).toEqual(expectedVinSkip);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue