Updated unit tests - remove console.logs
This commit is contained in:
parent
7cb8ef3043
commit
e550865333
3 changed files with 23 additions and 28 deletions
|
|
@ -404,7 +404,7 @@ describe("schedule.vue...", () => {
|
|||
routeCode: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
wrapper.setData({
|
||||
selectedTimeSlotInfo: selectedTimeSlotInfo,
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ describe("time-slot-modal-question.vue", () => {
|
|||
wrapper.vm.$refs.timeSlots.closeModal = jest.fn();
|
||||
|
||||
await wrapper.setData({
|
||||
selectedRouteCode: routeCode
|
||||
})
|
||||
selectedRouteCode: routeCode,
|
||||
});
|
||||
|
||||
//Act
|
||||
wrapper.vm.setSelectedTimeSlot();
|
||||
|
|
@ -176,7 +176,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
const dropOffWidgetName = "Dropoff";
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `test${ RouteCodeFlags.ALL_DAY_DROP_OFF }`,
|
||||
routeCode: `test${RouteCodeFlags.ALL_DAY_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -184,7 +184,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -196,9 +196,6 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
},
|
||||
});
|
||||
|
||||
|
||||
console.log(wrapper.vm.selectedRouteCode)
|
||||
|
||||
//Assert
|
||||
expect(wrapper.vm.supplementalInformationBlock).toEqual(
|
||||
mockCmsContent[dropOffWidgetName]["BodyText"]
|
||||
|
|
@ -210,7 +207,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
const overnightDropOffCmsWidgetName = "Overnight";
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `test${ RouteCodeFlags.OVERNIGHT_DROP_OFF }`,
|
||||
routeCode: `test${RouteCodeFlags.OVERNIGHT_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -218,7 +215,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -247,7 +244,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
const jobMinMinutes = 50;
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `test${ RouteCodeFlags.ALL_DAY_DROP_OFF }`,
|
||||
routeCode: `test${RouteCodeFlags.ALL_DAY_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -255,7 +252,7 @@ describe("time-slot-modal-question.vue Supplemental information", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -299,7 +296,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `Test${ RouteCodeFlags.ALL_DAY_DROP_OFF }`,
|
||||
routeCode: `Test${RouteCodeFlags.ALL_DAY_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -307,8 +304,8 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
propsData: {
|
||||
|
|
@ -336,13 +333,13 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
mockCmsContent[sameDayDropOffCmsWidgetName]["FooterText"]
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
test("Correct disclaimer information should be retrieved, Dropoff regular", async () => {
|
||||
//Arrange
|
||||
const dropOffWidgetName = "Dropoff";
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `Test${ RouteCodeFlags.ALL_DAY_DROP_OFF }`,
|
||||
routeCode: `Test${RouteCodeFlags.ALL_DAY_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -350,7 +347,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -367,13 +364,13 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
mockCmsContent[dropOffWidgetName]["FooterText"]
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
test("Correct disclaimer information should be retrieved, Dropoff overnight", async () => {
|
||||
//Arrange
|
||||
const overnightDropOffCmsWidgetName = "Overnight";
|
||||
const modelValue = {
|
||||
timeSlot: {
|
||||
routeCode: `Test${ RouteCodeFlags.OVERNIGHT_DROP_OFF }`,
|
||||
routeCode: `Test${RouteCodeFlags.OVERNIGHT_DROP_OFF}`,
|
||||
date: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
|
|
@ -381,7 +378,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -412,7 +409,7 @@ describe("time-slot-modal-list-button-question.vue Disclaimer", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -449,7 +446,7 @@ describe("time-slot-modal-question.vue Duration", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -493,7 +490,7 @@ describe("time-slot-modal-question.vue Duration", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -525,7 +522,7 @@ describe("time-slot-modal-question.vue Duration", () => {
|
|||
jobMinMinutes: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
@ -554,7 +551,7 @@ describe("time-slot-modal-question.vue Duration", () => {
|
|||
endTime: null,
|
||||
},
|
||||
isPremiumAppointment: null,
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = setupMocks({
|
||||
customMountOptions: {
|
||||
|
|
|
|||
|
|
@ -157,12 +157,10 @@ export default {
|
|||
return this.$refs[this.modalName];
|
||||
},
|
||||
supplementalInformationBlock() {
|
||||
console.log(this.selectedRouteCode)
|
||||
let appointmentTypeCmsWidgetName;
|
||||
if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) {
|
||||
return null;
|
||||
} else if (this.appointmentType === AppointmentTypeStrings.MOBILE) {
|
||||
|
||||
appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes(
|
||||
PREMIUM_TIME_SLOT_ID_FLAG
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue