COMMIT
This commit is contained in:
parent
17a736b542
commit
3efb2f6e15
2 changed files with 13 additions and 2 deletions
|
|
@ -23,6 +23,14 @@ jest.mock("@/helpers/cms-content-helper", () => ({
|
||||||
fetchCmsContentForPage: jest.fn(),
|
fetchCmsContentForPage: jest.fn(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
useMainStore().getters = {
|
||||||
|
pageData: jest.fn(),
|
||||||
|
damage: {
|
||||||
|
isRepair: false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const basePartResponse = {
|
const basePartResponse = {
|
||||||
partsOrQuestions: [
|
partsOrQuestions: [
|
||||||
|
|
@ -69,6 +77,9 @@ describe("vehicle-parts.vue", () => {
|
||||||
issPage: "vehicle-parts",
|
issPage: "vehicle-parts",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
useMainStore: {
|
||||||
|
getters: useMainStore().getters,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -110,7 +121,7 @@ describe("vehicle-parts.vue", () => {
|
||||||
//Act
|
//Act
|
||||||
vehicleParts.beforeRouteEnter.call(
|
vehicleParts.beforeRouteEnter.call(
|
||||||
wrapper.vm,
|
wrapper.vm,
|
||||||
{ query: { fmgPage: "vehicle-parts" } },
|
{ query: { issPage: "vehicle-parts" } },
|
||||||
undefined,
|
undefined,
|
||||||
(c) => c(wrapper.vm)
|
(c) => c(wrapper.vm)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -405,7 +405,7 @@ export default {
|
||||||
// mimic part-questions page data for consistency
|
// mimic part-questions page data for consistency
|
||||||
for (let partOrQuestion of partsOrQuestions) {
|
for (let partOrQuestion of partsOrQuestions) {
|
||||||
if (this.hasCapabilityQuestions([partOrQuestion])) {
|
if (this.hasCapabilityQuestions([partOrQuestion])) {
|
||||||
let capabilityQuestionsForGlassLocation = (await this.mainStore.getCapabilityQuestions(this.mainStore.vehicle.carId, partOrQuestion.parts[0].partNumber));
|
let capabilityQuestionsForGlassLocation = (await this.mainStore.getCapabilityQuestions(this.mainStore.vehicle.carId, partOrQuestion.parts[0].partNumber)).data;
|
||||||
|
|
||||||
capabilityQuestionsForGlassLocation.forEach((question) => {
|
capabilityQuestionsForGlassLocation.forEach((question) => {
|
||||||
question.answers = question.answers.map((answer) => {
|
question.answers = question.answers.map((answer) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue