From d0bf754338cb2f0a04283e284c5467365d7ba408 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 15 Nov 2024 09:08:12 -0500 Subject: [PATCH] Update unit test for deleted code. --- src/layouts/confirmation/confirmation.spec.js | 134 ------------------ 1 file changed, 134 deletions(-) diff --git a/src/layouts/confirmation/confirmation.spec.js b/src/layouts/confirmation/confirmation.spec.js index 2141d0591..45347491a 100644 --- a/src/layouts/confirmation/confirmation.spec.js +++ b/src/layouts/confirmation/confirmation.spec.js @@ -559,140 +559,6 @@ describe("computed properties...", () => { // Assert expect(testValue).toEqual("Duration: Overnight"); }); - - test("NoComp should return false for shouldHideRecalibration", () => { - //Arrange - const { wrapper } = setupMocks({}); - wrapper.vm.submittedOrder = { - vehicle: { - imageUrl: "", - }, - schedule: { - endTime: "10:00", - date: "2024-09-28", - jobMaxMinutes: 120, - jobMinMinutes: 60, - routeCode: "", - }, - policy: { - isNoComp: true, - }, - serviceLocation: store.getters.order.serviceLocation, - }; - wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE; - // Act - const testValue = wrapper.vm.shouldHideRecalibration; - - // Assert - expect(testValue).toEqual(false); - }); - test("Itac should return false for shouldHideRecalibration", () => { - //Arrange - const { wrapper } = setupMocks({}); - wrapper.vm.submittedOrder = { - vehicle: { - imageUrl: "", - }, - schedule: { - endTime: "10:00", - date: "2024-09-28", - jobMaxMinutes: 120, - jobMinMinutes: 60, - routeCode: "", - }, - policy: { - isItac: true, - }, - serviceLocation: store.getters.order.serviceLocation, - }; - wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE; - // Act - const testValue = wrapper.vm.shouldHideRecalibration; - - // Assert - expect(testValue).toEqual(false); - }); - test("Not Itac/NoComp with Recal should return true for shouldHideRecalibration", async () => { - //Arrange - const { wrapper } = setupMocks({}); - const lineItems = { - glassParts: [ - { - partType: "RECALIBRATION", - }, - ], - }; - - wrapper.vm.submittedOrder = { - vehicle: { - imageUrl: "", - }, - schedule: { - endTime: "10:00", - date: "2024-09-28", - jobMaxMinutes: 120, - jobMinMinutes: 60, - routeCode: "", - }, - policy: { - isItac: false, - isNoComp: false, - }, - lineItems: { - glassParts: { - partType: "Recalibration", - }, - }, - serviceLocation: store.getters.order.serviceLocation, - }; - - wrapper.setData({ lineItems: lineItems }); - await wrapper.vm.$nextTick(); - - // Act - const testValue = wrapper.vm.shouldHideRecalibration; - - // Assert - expect(testValue).toEqual(true); - }); - test("Itac/NoComp with Recal should return false for shouldHideRecalibration", async () => { - //Arrange - const { wrapper } = setupMocks({}); - const lineItems = { - glassParts: [ - { - partType: "RECALIBRATION", - }, - ], - }; - - wrapper.vm.submittedOrder = { - vehicle: { - imageUrl: "", - }, - schedule: { - endTime: "10:00", - date: "2024-09-28", - jobMaxMinutes: 120, - jobMinMinutes: 60, - routeCode: "", - }, - policy: { - isItac: true, - isNoComp: false, - }, - serviceLocation: store.getters.order.serviceLocation, - }; - - wrapper.setData({ lineItems: lineItems }); - await wrapper.vm.$nextTick(); - - // Act - const testValue = wrapper.vm.shouldHideRecalibration; - - // Assert - expect(testValue).toEqual(false); - }); }); function setupMocks({ customMountOptions }) {