commit
a4aaa6ec88
2 changed files with 12 additions and 4 deletions
|
|
@ -1,13 +1,16 @@
|
|||
import { storeActions } from "@/constants/store-actions.js";
|
||||
import store from "@/store";
|
||||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||
import { saveOrder } from "@/helpers/heritage-integration/order-helper.js";
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
async navigateForwardWithSingleCarMatch() {
|
||||
// We want to save the order before calling getPartsOrQuestions because that call is lengthy
|
||||
saveOrder();
|
||||
|
||||
// If we have not already saved a session, we need to save one now before the lengthy call to getPartsOrQuestions
|
||||
if (!store.getters.applicationUser.savedSessionId) {
|
||||
saveOrder();
|
||||
}
|
||||
|
||||
const result = await this.dispatchStoreAction(storeActions.GET_PARTS_OR_QUESTIONS);
|
||||
const partsOrQuestions = result.data.partsOrQuestions;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,12 @@ function setupMocks({ partsOrQuestions = [] }) {
|
|||
navigate: jest.fn(), navigateWithSaving: jest.fn(), navigateWithoutSaving: jest.fn(),
|
||||
},
|
||||
store: {
|
||||
commit: jest.fn()
|
||||
commit: jest.fn(),
|
||||
getters: {
|
||||
applicationUser: {
|
||||
savedSessionId: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue