test fix
This commit is contained in:
parent
4122ec257d
commit
c008ac3ff3
1 changed files with 3 additions and 17 deletions
|
|
@ -23,7 +23,7 @@ jest.mock("@/helpers/cms-content-helper", () => ({
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe("vehicle-style.vue", () => {
|
describe("vehicle-style.vue", () => {
|
||||||
/*
|
|
||||||
test("Style question component is initized with api data", async () => {
|
test("Style question component is initized with api data", async () => {
|
||||||
//Arrange
|
//Arrange
|
||||||
const styleQuestionInitialData = ["2 Door", "4 Door"];
|
const styleQuestionInitialData = ["2 Door", "4 Door"];
|
||||||
|
|
@ -95,19 +95,7 @@ describe("vehicle-style.vue", () => {
|
||||||
//Assert
|
//Assert
|
||||||
expect(arePagePrerequisitesValid).toBe(true);
|
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({
|
function setupMocks({
|
||||||
|
|
@ -116,8 +104,6 @@ function setupMocks({
|
||||||
pageHeaderWidgetHeaderText = {},
|
pageHeaderWidgetHeaderText = {},
|
||||||
mountOptionsMockData = {},
|
mountOptionsMockData = {},
|
||||||
}) {
|
}) {
|
||||||
const wrapper = {};
|
|
||||||
const apiPromise = {};
|
|
||||||
//Mock api responses
|
//Mock api responses
|
||||||
const apiResponses = {
|
const apiResponses = {
|
||||||
cmsContent: {
|
cmsContent: {
|
||||||
|
|
@ -134,7 +120,7 @@ function setupMocks({
|
||||||
},
|
},
|
||||||
styleQuestionInitialData: styleQuestionInitialData,
|
styleQuestionInitialData: styleQuestionInitialData,
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
const apiPromise = Promise.resolve(apiResponses);
|
const apiPromise = Promise.resolve(apiResponses);
|
||||||
|
|
||||||
settleAllPromises.mockImplementation(() => apiPromise);
|
settleAllPromises.mockImplementation(() => apiPromise);
|
||||||
|
|
@ -154,6 +140,6 @@ function setupMocks({
|
||||||
styleQuestion.methods.initializeComponent;
|
styleQuestion.methods.initializeComponent;
|
||||||
|
|
||||||
wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent;
|
wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent;
|
||||||
*/
|
|
||||||
return { wrapper, apiPromise };
|
return { wrapper, apiPromise };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue