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