diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 292a4bb0b..523e0b103 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -196,7 +196,7 @@ export default { this.displayNonServiceableZipAlert = false; return this.$router.navigateWithSaving( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS , + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, this.$route ); } diff --git a/src/layouts/vehicle-parts/vehicle-parts.spec.js b/src/layouts/vehicle-parts/vehicle-parts.spec.js index 74028e69f..66b8996e7 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.spec.js +++ b/src/layouts/vehicle-parts/vehicle-parts.spec.js @@ -196,7 +196,7 @@ describe("vehicle-parts.vue", () => { }); }); - test("User had part questions > BackButtonAction triggers a router.navigateWithoutSaving change with correct scenario", async () => { + test("User had part questions > navigateBack triggers a router.navigateWithoutSaving change with correct scenario", async () => { //Arrange const { wrapper } = setupMocks({ mountOptionsMockData: { @@ -248,7 +248,7 @@ describe("vehicle-parts.vue", () => { (c) => c(wrapper.vm) ); - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); //Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( @@ -257,7 +257,7 @@ describe("vehicle-parts.vue", () => { ); }); - test("User did not have part questions > BackButtonAction triggers a router.navigateWithoutSaving change with correct scenario", async () => { + test("User did not have part questions > navigateBack triggers a router.navigateWithoutSaving change with correct scenario", async () => { //Arrange const { wrapper } = setupMocks({ mountOptionsMockData: { @@ -294,7 +294,7 @@ describe("vehicle-parts.vue", () => { (c) => c(wrapper.vm) ); - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); //Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index d90f5c0b6..0f8c73a88 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -467,7 +467,6 @@ export default { }, // Can't use `this` because navigateForward is also called from quote navigateBack(vm) { - console.log("HIIII") const self = vm ?? this; const partsOrQuestions = ( self.$store.getters.pageData(fmgPageValues.PART_QUESTIONS) ?? diff --git a/src/mixins/vehicle-questions-mixin.spec.js b/src/mixins/vehicle-questions-mixin.spec.js index 5ab49bc1f..4bfa9285c 100644 --- a/src/mixins/vehicle-questions-mixin.spec.js +++ b/src/mixins/vehicle-questions-mixin.spec.js @@ -2243,7 +2243,7 @@ describe("vehicle-questions-mixin", () => { }); }); - describe("backButtonAction", () => { + describe("navigateBack", () => { // TODO KO test.todo( "current page is quote, there are no questions, and we don't have their vin => go to estimate" @@ -2254,7 +2254,7 @@ describe("vehicle-questions-mixin", () => { const { wrapper } = setupMocks({ fmgPage: fmgPageValues.QUOTE, hasVin: true }); // Act - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( @@ -2269,7 +2269,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.hasCapabilityQuestions = jest.fn().mockReturnValue(true); // Act - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( @@ -2285,7 +2285,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.hasChildPartQuestions = jest.fn().mockReturnValue(true); // Act - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( @@ -2303,7 +2303,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.hasCapabilityQuestions = jest.fn().mockReturnValue(true); // Act - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( @@ -2321,7 +2321,7 @@ describe("vehicle-questions-mixin", () => { wrapper.vm.hasCapabilityQuestions = jest.fn().mockReturnValue(true); // Act - wrapper.vm.backButtonAction(); + wrapper.vm.navigateBack(); // Assert expect(wrapper.vm.$router.navigateWithoutSaving).toHaveBeenCalledWith( diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index c991087d0..1c060b082 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -238,7 +238,7 @@ const routingTable = function (store) { destinationFmgPageValue: fmgPageValues.ADDRESS_LOOKUP, }, { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS , + scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE, }, ],