Merge pull request #1297 from Safelite/feature/richardson/INSR-10088

Experiment wiring
This commit is contained in:
brich1212safe 2026-07-13 14:54:19 -04:00 committed by GitHub
commit 00df4c42c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 62 additions and 9 deletions

View file

@ -3,6 +3,7 @@ const experimentUniverses = Object.freeze({
ISS_FEATURETOGGLE_AREFEES_HIDDEN: 'NextGenISS_FeatureToggle_AreFeesHidden', ISS_FEATURETOGGLE_AREFEES_HIDDEN: 'NextGenISS_FeatureToggle_AreFeesHidden',
ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN: 'NextGenISS_FeatureToggle_AreFeesOverridden', ISS_FEATURETOGGLE_AREFEES_OVERRIDDEN: 'NextGenISS_FeatureToggle_AreFeesOverridden',
ISS_MOBILE_FIRST_APPOINTMENTS: 'ISS_Mobile_First_Appointments', ISS_MOBILE_FIRST_APPOINTMENTS: 'ISS_Mobile_First_Appointments',
ISS_YMM_NOT_FOUND: 'ISS_Nextgen_YMM_Not_Found',
ADYEN_PAYMENT_TEST: 'NextGenAdyenPaymentTest' ADYEN_PAYMENT_TEST: 'NextGenAdyenPaymentTest'
}); });
@ -17,16 +18,21 @@ const experimentSettings = Object.freeze({
ISS_MOBILE_FIRST_MAX_PM_MOBILE_DAYS: 'MaxPmMobileDays', ISS_MOBILE_FIRST_MAX_PM_MOBILE_DAYS: 'MaxPmMobileDays',
ISS_MOBILE_FIRST_SHOW_FIRST_MOBILE_APPOINTMENT: 'ShowMobileFirstAppointment', ISS_MOBILE_FIRST_SHOW_FIRST_MOBILE_APPOINTMENT: 'ShowMobileFirstAppointment',
ISS_ENABLE_ADYEN_V1: 'ISS_Enable_Adyen_V1', ISS_ENABLE_ADYEN_V1: 'ISS_Enable_Adyen_V1',
ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED: 'IssEnableVinRequiredBailout',
ISS_YMMS_VIN_REQUIRED_PAGE_ENABLED: 'IssEnableVinRequiredPage',
MSR_SPLIT_PAY_ENABLED: 'EnableMSRSplitPay' MSR_SPLIT_PAY_ENABLED: 'EnableMSRSplitPay'
}); });
const experimentTest = Object.freeze({ const experimentTest = Object.freeze({
ISS_MOBILE_FIRST_POPUP_V3: 'ISS_Mobile_First_Popup_V3' ISS_MOBILE_FIRST_POPUP_V3: 'ISS_Mobile_First_Popup_V3',
ISS_YMMS_V1: 'ISS_Nextgen_YMM_V1',
}); });
const experimentVariation = Object.freeze({ const experimentVariation = Object.freeze({
ISS_MOBILE_FIRST_CONTROL_V3: 'NoShowMobileFirstPopUp_V3_CONTROL', ISS_MOBILE_FIRST_CONTROL_V3: 'NoShowMobileFirstPopUp_V3_CONTROL',
ISS_MOBILE_FIRST_TEST_V3: 'YesShowMobileFirstPopUp_V3_TEST' ISS_MOBILE_FIRST_TEST_V3: 'YesShowMobileFirstPopUp_V3_TEST',
ISS_YMMS_CONTROL: 'ISS_Nextgen_YMM_Control',
ISS_YMMS_TEST: 'ISS_Nextgen_YMM_Test',
}); });
const experimentTriggers = Object.freeze({ const experimentTriggers = Object.freeze({

View file

@ -3,6 +3,7 @@ import addressLookup from '@/layouts/address-lookup/address-lookup.vue';
// Supporting Files // Supporting Files
import baseMixin from '@/mixins/base-mixin'; import baseMixin from '@/mixins/base-mixin';
import { experimentSettings } from '@/constants/experiments';
import settleAllPromises from '@/helpers/layout-helper.js'; import settleAllPromises from '@/helpers/layout-helper.js';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';
@ -69,8 +70,16 @@ function setupMocks({
zipCode: '11111' zipCode: '11111'
} }
} }
},
mixins: {
getSettingValue: jest.fn((settingName) => {
if (settingName === experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) {
return 'true';
}
return 'false';
})
} }
}) })
); );
@ -422,6 +431,13 @@ describe('address-lookup.vue', () => {
const { wrapper } = setupMocks({}, {}); const { wrapper } = setupMocks({}, {});
wrapper.vm.navigateForwardWithSingleCarMatch = jest.fn(); wrapper.vm.navigateForwardWithSingleCarMatch = jest.fn();
wrapper.vm.getSettingValue = jest.fn((settingName) => {
if (settingName === experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) {
return 'true';
}
return 'false';
});
useMainStore().order.vehicle.carId = 'C0000'; useMainStore().order.vehicle.carId = 'C0000';
@ -457,6 +473,13 @@ describe('address-lookup.vue', () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.navigateForwardWithSingleCarMatch = jest.fn(); wrapper.vm.navigateForwardWithSingleCarMatch = jest.fn();
wrapper.vm.getSettingValue = jest.fn((settingName) => {
if (settingName === experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) {
return 'true';
}
return 'false';
});
useMainStore().order.vehicle.carId = 'CARID3'; useMainStore().order.vehicle.carId = 'CARID3';

View file

@ -81,6 +81,7 @@ import alert from '@/ux-components/alert/alert.vue';
import { Form } from 'vee-validate'; import { Form } from 'vee-validate';
// Supporting files // Supporting files
import { experimentSettings } from '@/constants/experiments';
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
import settleAllPromises from '@/helpers/layout-helper'; import settleAllPromises from '@/helpers/layout-helper';
import routerParams from '@/router/router-constants/router-params'; import routerParams from '@/router/router-constants/router-params';
@ -344,7 +345,8 @@ export default {
{ [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }
); );
} else if (matchingCars.length === 1) { } else if (matchingCars.length === 1) {
if (this.mainStore.order.vehicle.vinRequired) { const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true';
if (ymmsBailoutEnabled && this.mainStore.order.vehicle.vinRequired) {
this.mainStore.setBailout(bailoutMessage.YMMNotFound()); this.mainStore.setBailout(bailoutMessage.YMMNotFound());
return this.$router.navigate( return this.$router.navigate(
this.navigationScenarios.BAILOUT, this.navigationScenarios.BAILOUT,

View file

@ -1,5 +1,6 @@
import addressVehicles from '@/layouts/address-vehicles/address-vehicles.vue'; import addressVehicles from '@/layouts/address-vehicles/address-vehicles.vue';
import baseMixin from '@/mixins/base-mixin'; import baseMixin from '@/mixins/base-mixin';
import { experimentSettings } from '@/constants/experiments';
import settleAllPromises from '@/helpers/layout-helper.js'; import settleAllPromises from '@/helpers/layout-helper.js';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js';
@ -104,7 +105,14 @@ function setupMocks({
return 'VehicleConfirmationQuestionTestReturn'; return 'VehicleConfirmationQuestionTestReturn';
} }
return null; return null;
}) }),
getSettingValue: jest.fn((settingName) => {
if (settingName === experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) {
return 'true';
}
return 'false';
}),
}, },
computed: { computed: {
dynamicStrings() { dynamicStrings() {

View file

@ -72,6 +72,7 @@ import settleAllPromises from '@/helpers/layout-helper';
import { useMainStore } from '@/store'; import { useMainStore } from '@/store';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';
import errorMessages from '@/constants/error-messages'; import errorMessages from '@/constants/error-messages';
import { experimentSettings } from '@/constants/experiments';
import { required } from '@/helpers/validation-rules'; import { required } from '@/helpers/validation-rules';
import { Form, defineRule } from 'vee-validate'; import { Form, defineRule } from 'vee-validate';
import { isGlassAvailableForCarId } from '@/helpers/damage-helper'; import { isGlassAvailableForCarId } from '@/helpers/damage-helper';
@ -256,7 +257,8 @@ export default {
false false
); );
if (this.mainStore.order.vehicle.vinRequired) { const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true';
if (ymmsBailoutEnabled && this.mainStore.order.vehicle.vinRequired) {
this.mainStore.setBailout(bailoutMessage.YMMNotFound()); this.mainStore.setBailout(bailoutMessage.YMMNotFound());
return this.$router.navigate( return this.$router.navigate(
this.navigationScenarios.BAILOUT, this.navigationScenarios.BAILOUT,

View file

@ -78,6 +78,7 @@ import settleAllPromises from '@/helpers/layout-helper';
import { useMainStore } from '@/store'; import { useMainStore } from '@/store';
import bailoutMessage from '@/constants/bailoutMessage'; import bailoutMessage from '@/constants/bailoutMessage';
import errorMessages from '@/constants/error-messages'; import errorMessages from '@/constants/error-messages';
import { experimentSettings } from '@/constants/experiments';
import { required } from '@/helpers/validation-rules'; import { required } from '@/helpers/validation-rules';
import { defineRule, Form } from 'vee-validate'; import { defineRule, Form } from 'vee-validate';
import { import {
@ -304,7 +305,8 @@ export default {
} }
}); });
if (this.mainStore.order.vehicle.vinRequired) { const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true';
if (ymmsBailoutEnabled && this.mainStore.order.vehicle.vinRequired) {
this.mainStore.setBailout(bailoutMessage.YMMNotFound()); this.mainStore.setBailout(bailoutMessage.YMMNotFound());
return this.$router.navigate( return this.$router.navigate(
this.navigationScenarios.BAILOUT, this.navigationScenarios.BAILOUT,

View file

@ -5,6 +5,7 @@ import baseMixin from '@/mixins/base-mixin';
import { createTestingPinia } from '@pinia/testing'; import { createTestingPinia } from '@pinia/testing';
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
import errorMessages from '@/constants/error-messages'; import errorMessages from '@/constants/error-messages';
import { experimentSettings } from '@/constants/experiments';
import issPageValues from '@/router/router-constants/issPage-values'; import issPageValues from '@/router/router-constants/issPage-values';
import queryStrings from '@/constants/query-strings'; import queryStrings from '@/constants/query-strings';
import { GaActions } from '@/constants/analytics'; import { GaActions } from '@/constants/analytics';
@ -172,7 +173,14 @@ const mountOptions = {
getFooterInfoBoxHeight: jest.fn(() => 80), getFooterInfoBoxHeight: jest.fn(() => 80),
cssClassNameForCmsWidget: jest.fn(() => 'widget-name-mock-class'), cssClassNameForCmsWidget: jest.fn(() => 'widget-name-mock-class'),
getPageNameByQueryString: jest.fn(() => ''), getPageNameByQueryString: jest.fn(() => ''),
pushEventToGA: jest.fn() pushEventToGA: jest.fn(),
getSettingValue: jest.fn((settingName) => {
if (settingName === experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) {
return 'true';
}
return 'false';
})
}, },
computed: { computed: {
GaActions() { GaActions() {

View file

@ -42,6 +42,7 @@
<script> <script>
// Import Supporting Files // Import Supporting Files
import { computed } from 'vue'; import { computed } from 'vue';
import { experimentSettings } from '@/constants/experiments';
import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types'; import vehicleLookupAlertTypes from '@/constants/vehicle-lookup-alert-types';
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
import { isGlassAvailableForCarId } from '@/helpers/damage-helper'; import { isGlassAvailableForCarId } from '@/helpers/damage-helper';
@ -176,7 +177,8 @@ export default {
this.$refs.siteFooter.enableForwardAction(); this.$refs.siteFooter.enableForwardAction();
showIssLoadingModal(true); showIssLoadingModal(true);
if (this.mainStore.order.vehicle.vinRequired) { const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true';
if (ymmsBailoutEnabled && this.mainStore.order.vehicle.vinRequired) {
this.mainStore.setBailout(bailoutMessage.YMMNotFound()); this.mainStore.setBailout(bailoutMessage.YMMNotFound());
return this.$router.navigate( return this.$router.navigate(
this.navigationScenarios.BAILOUT, this.navigationScenarios.BAILOUT,