From d361a161bb6c16c2bed645c69c76590bd77a0d96 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 8 Apr 2024 09:19:00 -0400 Subject: [PATCH] fix tests --- src/layouts/payment-method/payment-method.spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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;