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;