From 8ee995253881352f7c0165714ed99e4442c65b33 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 9 Mar 2023 13:50:31 -0500 Subject: [PATCH] Fixed mobile-location-modal-questions tests --- .../service-location-helper.spec.js | 11 ++++-- .../mobile-location-modal-questions.spec.js | 34 ------------------- 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js index 345e4c807..bb841e327 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js @@ -48,10 +48,13 @@ describe("service-location-helper.js", () => { it("Should return null if no service zip code is passed in", async () => { // Arrange const serviceZipCode = null; + const serviceType = "Replace"; + const parentAccountNumber = 167132 + const billToAccountNumber = 1234 const expected = null; // Act - const result = await getPricedMobileFeePart(serviceZipCode); + const result = await getPricedMobileFeePart(serviceZipCode, serviceType, parentAccountNumber, billToAccountNumber); // Assert expect(result).toEqual(expected); @@ -60,6 +63,10 @@ describe("service-location-helper.js", () => { it("Should return the priced mobile fee part", async () => { // Arrange const serviceZipCode = "43235"; + const serviceType = "Replace"; + const parentAccountNumber = 167132 + const billToAccountNumber = 1234 + const expected = { partNumber: "MOBILE FEE", description: "MOBILE FEE", @@ -70,7 +77,7 @@ describe("service-location-helper.js", () => { }; // Act - const result = await getPricedMobileFeePart(serviceZipCode); + const result = await getPricedMobileFeePart(serviceZipCode, serviceType, parentAccountNumber, billToAccountNumber); // Assert expect(result).toEqual(expected); diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js index d90f68b1f..eb9d507db 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.spec.js @@ -300,40 +300,6 @@ describe("mobile-location-modal-questions.vue", () => { // Assert expect(wrapper.vm.displayInvalidZipAlert).toBe(true); }); - - it("Should clear the internal model when resetModel is called", async () => { - // Arrange - const mobileLocationQuestions = { - addressQuestions: { - streetAddress: "555 Some St", - apartmentNumberOrBusinessName: "Apt 1", - city: "Funkytown", - state: "OH", - zipCode: "55555", - }, - isVehicleProtected: true, - serviceZipCode: "55555", - }; - - const { wrapper } = setupMocks({ - mixins: [mockMixin], - props: { - modelValue: mobileLocationQuestions, - }, - mountOptions: { - attachTo: document.body, - }, - }); - - // Act - wrapper.vm.resetModel(); - - // Assert - expect(wrapper.vm.internalModel.addressQuestions.streetAddress).toEqual(""); - expect(wrapper.vm.internalModel.addressQuestions.apartmentNumberOrBusinessName).toEqual(""); - expect(wrapper.vm.internalModel.addressQuestions.city).toEqual(""); - expect(wrapper.vm.internalModel.isVehicleProtected).toEqual(null); - }); }); function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) {