From c008ac3ff31f8a60568ef090ca8e2faa0b06cc8c Mon Sep 17 00:00:00 2001 From: Jason Wheeler Date: Wed, 16 Nov 2022 11:24:21 -0500 Subject: [PATCH] test fix --- .../vehicle-style/vehicle-style.spec.js | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/layouts/vehicle-style/vehicle-style.spec.js b/src/layouts/vehicle-style/vehicle-style.spec.js index 0701da80..41cf7b06 100644 --- a/src/layouts/vehicle-style/vehicle-style.spec.js +++ b/src/layouts/vehicle-style/vehicle-style.spec.js @@ -23,7 +23,7 @@ jest.mock("@/helpers/cms-content-helper", () => ({ })); describe("vehicle-style.vue", () => { -/* + test("Style question component is initized with api data", async () => { //Arrange const styleQuestionInitialData = ["2 Door", "4 Door"]; @@ -95,19 +95,7 @@ describe("vehicle-style.vue", () => { //Assert expect(arePagePrerequisitesValid).toBe(true); }); - - */ - test("Model set, arePagePrerequisitesValid should be true ", () => { - //Arrange - const { wrapper } = setupMocks({}); - //useMainStore().order.vehicle = { year: 2011, make: "ford", model: "mustang", style: null } - //Act - //const arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); - - //Assert - expect(true).toBe(true); - }); }); function setupMocks({ @@ -116,8 +104,6 @@ function setupMocks({ pageHeaderWidgetHeaderText = {}, mountOptionsMockData = {}, }) { - const wrapper = {}; - const apiPromise = {}; //Mock api responses const apiResponses = { cmsContent: { @@ -134,7 +120,7 @@ function setupMocks({ }, styleQuestionInitialData: styleQuestionInitialData, }; -/* + const apiPromise = Promise.resolve(apiResponses); settleAllPromises.mockImplementation(() => apiPromise); @@ -154,6 +140,6 @@ function setupMocks({ styleQuestion.methods.initializeComponent; wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent; - */ + return { wrapper, apiPromise }; }