From 4805c750ec694c1c14e5f55d9d524a2481e306f0 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 24 Feb 2025 10:32:27 -0500 Subject: [PATCH] CASH-132 CASH-132 mock experiment settings --- src/layouts/confirmation/confirmation.spec.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/layouts/confirmation/confirmation.spec.js b/src/layouts/confirmation/confirmation.spec.js index 45347491a..37ad71949 100644 --- a/src/layouts/confirmation/confirmation.spec.js +++ b/src/layouts/confirmation/confirmation.spec.js @@ -14,6 +14,19 @@ import { experimentSettings } from "@/constants/experiments"; const mockExperimentSettings = experimentSettings; +jest.mock("@/mixins/experiment-mixin.js", () => ({ + methods: { + getSettingValue(settingName) { + if (settingName === mockExperimentSettings.RECAL_PRICE_REMOVE) { + return true; + } + }, + hasSettingEqualTo(settingName, settingValue) { + return true; + }, + }, +})); + // Mock our module for promises. jest.mock("@/helpers/layout-helper.js", () => ({ settleAllPromises: jest.fn(), @@ -572,13 +585,6 @@ function setupMocks({ customMountOptions }) { getCmsContent: jest.fn().mockImplementation(() => { return wordingText; }), - getSettingValue: jest.fn((settingName) => { - if (settingName === experimentSettings.RECAL_PRICE_REMOVE) { - return "true"; - } - - return "false"; - }), }, }, ];