From e05a1bf51babdf75e7e460f69da64d498c68624a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 28 Feb 2023 10:32:03 -0500 Subject: [PATCH] Fixed service-location tests for new code --- src/layouts/service-location/service-location.spec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index f83cdc624..8f3505cdc 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -8,6 +8,7 @@ import baseMixin from "@/mixins/base-mixin"; import { nextTick } from "vue"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper.js"; +import { getMobileFee } from "@/helpers/service-location-helper"; import store from "@/store"; // Define Mocks @@ -19,6 +20,10 @@ jest.mock("@/helpers/cms-content-helper", () => ({ fetchCmsContentForPage: jest.fn(), })); +jest.mock("@/helpers/service-location-helper", () => ({ + getMobileFee: jest.fn(), +})); + jest.mock("@/store", () => ({ commit: jest.fn(), dispatch: jest.fn(), @@ -116,7 +121,7 @@ describe("service-location.vue", () => { expect(wrapper.vm.mobileLocationQuestions.serviceZipCode).toBe(newZip); }); - test("updates service zip code serviceZipCodeQuestion when resetServiceZipCode is called", () => { + test.only("updates service zip code serviceZipCodeQuestion when resetServiceZipCode is called", () => { // Arrange const { wrapper } = setupMocks({}); const newServiceZipCodeQuestion = { @@ -163,6 +168,7 @@ function setupMocks({ mountOptionsMockData = {} }) { settleAllPromises.mockImplementation(() => apiPromise); fetchCmsContentForPage.mockImplementation(() => Promise.resolve()); + getMobileFee.mockImplementation(() => Promise.resolve()); const mountOptions = getMountOptions(mountOptionsMockData); const wrapper = shallowMount(serviceLocation, mountOptions);