Update unit test for deleted code.
This commit is contained in:
parent
08a21a22a4
commit
d0bf754338
1 changed files with 0 additions and 134 deletions
|
|
@ -559,140 +559,6 @@ describe("computed properties...", () => {
|
||||||
// Assert
|
// Assert
|
||||||
expect(testValue).toEqual("Duration: Overnight");
|
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 }) {
|
function setupMocks({ customMountOptions }) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue