diff --git a/src/constants/application-config.js b/src/constants/application-config.js index 1d1ee4a1..f6797d9d 100644 --- a/src/constants/application-config.js +++ b/src/constants/application-config.js @@ -10,8 +10,8 @@ const applicationConfig = Object.freeze({ ANALYTICS_SESSION_TIMEOUT_MINUTES: 30, SAVED_SESSION_TIMEOUT_DAYS: 45, COOKIE_PATH: '/', - APPLICATION_NAME: 'SelfService', - SITE_ENTRY_TRIGGER_VALUE: 'SelfService', + APPLICATION_NAME: 'ISS', + SITE_ENTRY_TRIGGER_VALUE: 'ISS', APPLICATION_ABBREVIATION: 'iss', PAGE_QUERYSTRING: 'issPage', CLIENTTAG_QUERYSTRING: 'ClientTag', diff --git a/src/constants/experiments.js b/src/constants/experiments.js index a6fa86a3..b21571e7 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -3,7 +3,8 @@ const experimentUniverses = Object.freeze({ }); const experimentSettings = Object.freeze({ - GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index' + GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index', + ISS_DISPLAY_PAY_IN_ADVANCE: 'ISSDisplayPIAInsurance_ISS' }); const experimentTriggers = Object.freeze({ diff --git a/src/global-methods.js b/src/global-methods.js index c32a6c9d..0769b113 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -11,7 +11,7 @@ export default { return new Promise((resolve, reject) => { const store = useMainStore(); const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; - const payloadAndAnalyticsData = { ...payload, AppName: 'SelfService' }; + const payloadAndAnalyticsData = { ...payload, AppName: 'ISS' }; const headers = { [headerKeys.EXPERIMENT]: JSON.stringify(store.experimentSettings) }; diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js index 476c9f59..9967aeb7 100644 --- a/src/layouts/payment-method/payment-method.spec.js +++ b/src/layouts/payment-method/payment-method.spec.js @@ -8,6 +8,7 @@ import { useMainStore } from '@/store'; import issPageValues from '@/router/router-constants/issPage-values'; import { paymentMethods } from '@/constants/payment-method-constants'; import queryStrings from '@/constants/query-strings'; +import { experimentSettings } from '@/constants/experiments'; function setupMocks({ customMountOptions = {}, queryString }) { const mountOptions = getMountOptions({ @@ -15,6 +16,20 @@ function setupMocks({ customMountOptions = {}, queryString }) { route: { query: { issPage: issPageValues.PAYMENT_METHOD, ...queryString }, params: {} } }); + const mockMixin = { + methods: { + getSettingValue: jest.fn((settingName) => { + if (settingName === experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE) { + return 'true'; + } + + return 'false'; + }) + } + }; + + mountOptions.global.mixins = [mockMixin]; + const wrapper = shallowMount(paymentMethod, mountOptions); return wrapper; diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 9ce1266e..c5014290 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -34,10 +34,16 @@ alertClass="alert-danger" :isDismissible="false" /> -
Pia Disabled Placeholder
+ v-if="!isPayInAdvanceDisabled" + v-model="paymentMethodInternalModel" + cmsWidgetName="PaymentMethodWidget" + :validationRules="rules.optionRequired" /> +