CSR-977 revert suppressvincapture decommission
CSR-977 revert suppressvincapture decommission
This commit is contained in:
parent
c6ba5cb97f
commit
6d7f68ab7e
4 changed files with 37 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ const experimentUniverses = {
|
||||||
|
|
||||||
const experimentSettings = {
|
const experimentSettings = {
|
||||||
GOOGLE_CUSTOM_DIMENSION_INDEX: "Google Custom Dimension Index",
|
GOOGLE_CUSTOM_DIMENSION_INDEX: "Google Custom Dimension Index",
|
||||||
|
SUPPRESS_VIN_CAPTURE: "SuppressVinCapture",
|
||||||
DISPLAY_AVAILABILITY_INDICATORS: "DisplayAvailabilityIndicators",
|
DISPLAY_AVAILABILITY_INDICATORS: "DisplayAvailabilityIndicators",
|
||||||
PIA_EXPERIENCE: "PIA Experience",
|
PIA_EXPERIENCE: "PIA Experience",
|
||||||
PIA_INSURANCE: "DisplayPIAInsurance",
|
PIA_INSURANCE: "DisplayPIAInsurance",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"
|
||||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
import { storeActions } from "@/constants/store-actions.js";
|
import { storeActions } from "@/constants/store-actions.js";
|
||||||
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
|
import experimentMixin from "@/mixins/experiment-mixin";
|
||||||
|
import { experimentSettings } from "@/constants/experiments";
|
||||||
import { includesWindshieldReplacement } from "@/helpers/damage-helper";
|
import { includesWindshieldReplacement } from "@/helpers/damage-helper";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
|
@ -139,7 +142,11 @@ export async function skipVinLookup() {
|
||||||
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
|
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
return isVinOptionalVehicle || !includesWindshieldReplacement();
|
return (
|
||||||
|
isVinOptionalVehicle ||
|
||||||
|
!includesWindshieldReplacement() ||
|
||||||
|
experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function skipVinLookupNotRepair() {
|
export async function skipVinLookupNotRepair() {
|
||||||
|
|
@ -151,7 +158,11 @@ export async function skipVinLookupNotRepair() {
|
||||||
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
|
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
return isVinOptionalVehicle || !includesWindshieldReplacement();
|
return (
|
||||||
|
isVinOptionalVehicle ||
|
||||||
|
!includesWindshieldReplacement() ||
|
||||||
|
experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLazyLoadedComponent(pageName) {
|
async function getLazyLoadedComponent(pageName) {
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,16 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
|
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
|
||||||
store.commit(storeMutations.UPDATE_MAKE, "acura");
|
store.commit(storeMutations.UPDATE_MAKE, "acura");
|
||||||
|
|
||||||
|
const mockExperimentsList = [
|
||||||
|
{
|
||||||
|
universeName: "ConceptFunnel",
|
||||||
|
settings: {
|
||||||
|
SuppressVinCapture: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
store.commit(storeMutations.UPDATE_EXPERIMENTS, mockExperimentsList);
|
||||||
|
|
||||||
// Mock out the lazy load calls for all components.
|
// Mock out the lazy load calls for all components.
|
||||||
mockLazyLoadComponentReturnValues({
|
mockLazyLoadComponentReturnValues({
|
||||||
[fmgPageValues.VEHICLE]: true,
|
[fmgPageValues.VEHICLE]: true,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import router from "@/router";
|
||||||
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
|
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
|
||||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||||
import vinPagesMixin from "@/mixins/vin-pages-mixin";
|
import vinPagesMixin from "@/mixins/vin-pages-mixin";
|
||||||
|
import { experimentSettings } from "../../constants/experiments";
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
|
||||||
|
|
@ -23,6 +24,16 @@ let mockCmsContent = {
|
||||||
let mockStoreActionData = {};
|
let mockStoreActionData = {};
|
||||||
|
|
||||||
let mockStoreData = {};
|
let mockStoreData = {};
|
||||||
|
let mockExperimentSettings = {
|
||||||
|
experiments: [
|
||||||
|
{
|
||||||
|
universeName: "ConceptFunnel",
|
||||||
|
settings: {
|
||||||
|
SuppressVinCapture: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
function resetMockStoreData() {
|
function resetMockStoreData() {
|
||||||
mockStoreData = {
|
mockStoreData = {
|
||||||
|
|
@ -159,12 +170,14 @@ function resetMockStoreData() {
|
||||||
|
|
||||||
function applyMockStoreDataToGetters() {
|
function applyMockStoreDataToGetters() {
|
||||||
store.getters = {
|
store.getters = {
|
||||||
|
experimentSettings: mockExperimentSettings,
|
||||||
order: mockStoreData,
|
order: mockStoreData,
|
||||||
damage: mockStoreData.damage,
|
damage: mockStoreData.damage,
|
||||||
payment: mockStoreData.payment,
|
payment: mockStoreData.payment,
|
||||||
policy: mockStoreData.policy,
|
policy: mockStoreData.policy,
|
||||||
};
|
};
|
||||||
store.state.order = mockStoreData;
|
store.state.order = mockStoreData;
|
||||||
|
store.state.applicationUser.experiments = mockExperimentSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mockDispatchStoreAction(actionName) {
|
async function mockDispatchStoreAction(actionName) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue