This commit is contained in:
CarlNation 2024-09-10 06:32:09 -04:00
parent 1131f3b171
commit 369ed07b73
2 changed files with 109 additions and 79 deletions

View file

@ -122,7 +122,7 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
startTime: "09:00", startTime: "09:00",
@ -130,9 +130,9 @@ describe("computed properties...", () => {
date: "2023-01-01", date: "2023-01-01",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -146,7 +146,7 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
startTime: "09:00", startTime: "09:00",
@ -154,9 +154,9 @@ describe("computed properties...", () => {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE; wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE;
@ -171,7 +171,7 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
startTime: "09:00", startTime: "09:00",
@ -179,9 +179,9 @@ describe("computed properties...", () => {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF; wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF;
@ -196,7 +196,7 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
startTime: "09:00", startTime: "09:00",
@ -204,9 +204,9 @@ describe("computed properties...", () => {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.IN_SHOP; wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.IN_SHOP;
@ -221,16 +221,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
endTime: "10:00", endTime: "10:00",
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE; wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.MOBILE;
// Act // Act
@ -244,16 +244,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
endTime: "10:00", endTime: "10:00",
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF; wrapper.vm.submittedOrder.serviceLocation.appointmentType = AppointmentTypeStrings.DROP_OFF;
@ -268,16 +268,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
endTime: "10:00", endTime: "10:00",
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -301,16 +301,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2023-01-01", date: "2023-01-01",
endTime: "10:00", endTime: "10:00",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -324,16 +324,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
startTime: "09:00", startTime: "09:00",
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -347,16 +347,16 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
endTime: "10:00", endTime: "10:00",
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -404,15 +404,15 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -427,15 +427,15 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
}, },
serviceLocation: store.getters.order.serviceLocation serviceLocation: store.getters.order.serviceLocation,
}; };
// Act // Act
@ -450,14 +450,14 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
} },
}; };
// Act // Act
@ -471,14 +471,14 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 120, jobMaxMinutes: 120,
jobMinMinutes: 60, jobMinMinutes: 60,
routeCode: "" routeCode: "",
} },
}; };
// Act // Act
@ -492,14 +492,14 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 45, jobMaxMinutes: 45,
jobMinMinutes: 30, jobMinMinutes: 30,
routeCode: "" routeCode: "",
} },
}; };
// Act // Act
@ -514,14 +514,14 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 45, jobMaxMinutes: 45,
jobMinMinutes: 30, jobMinMinutes: 30,
routeCode: RouteCodeFlags.ALL_DAY_DROP_OFF routeCode: RouteCodeFlags.ALL_DAY_DROP_OFF,
} },
}; };
// Act // Act
@ -536,14 +536,14 @@ describe("computed properties...", () => {
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
wrapper.vm.submittedOrder = { wrapper.vm.submittedOrder = {
vehicle: { vehicle: {
imageUrl: "" imageUrl: "",
}, },
schedule: { schedule: {
date: "2024-09-28", date: "2024-09-28",
jobMaxMinutes: 45, jobMaxMinutes: 45,
jobMinMinutes: 30, jobMinMinutes: 30,
routeCode: RouteCodeFlags.OVERNIGHT_DROP_OFF routeCode: RouteCodeFlags.OVERNIGHT_DROP_OFF,
} },
}; };
// Act // Act

View file

@ -186,7 +186,10 @@ export default {
}, },
ConfirmationEmailText() { ConfirmationEmailText() {
return this.getCmsContent("ConfirmationEmailWidget", "BodyText") return this.getCmsContent("ConfirmationEmailWidget", "BodyText")
?.replaceAll("{custom:submittedOrder.customer.emailAddress}", this.submittedOrder?.customer?.emailAddress) ?.replaceAll(
"{custom:submittedOrder.customer.emailAddress}",
this.submittedOrder?.customer?.emailAddress
)
?.replaceAll("{custom:MY_ACCOUNT_URL}", applicationConfig.MY_ACCOUNT) ?.replaceAll("{custom:MY_ACCOUNT_URL}", applicationConfig.MY_ACCOUNT)
?.replaceAll("{custom:CUSTOMER_PORTAL_LOGIN_TOKEN}", this.CustomerPortalLoginToken) ?.replaceAll("{custom:CUSTOMER_PORTAL_LOGIN_TOKEN}", this.CustomerPortalLoginToken)
?.replaceAll("&lt;", "<") ?.replaceAll("&lt;", "<")
@ -206,21 +209,48 @@ export default {
}, },
InShopWordingText() { InShopWordingText() {
return this.getCmsContent("InShopWordingWidget", "BodyText") return this.getCmsContent("InShopWordingWidget", "BodyText")
?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) ?.replaceAll(
?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) "{custom:submittedOrder.vehicle.year}",
?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); this.submittedOrder?.vehicle?.year
)
?.replaceAll(
"{custom:submittedOrder.vehicle.make}",
this.submittedOrder?.vehicle?.make
)
?.replaceAll(
"{custom:submittedOrder.vehicle.model}",
this.submittedOrder?.vehicle?.model
);
}, },
MobileWordingText() { MobileWordingText() {
return this.getCmsContent("MobileWordingWidget", "BodyText") return this.getCmsContent("MobileWordingWidget", "BodyText")
?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) ?.replaceAll(
?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) "{custom:submittedOrder.vehicle.year}",
?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); this.submittedOrder?.vehicle?.year
)
?.replaceAll(
"{custom:submittedOrder.vehicle.make}",
this.submittedOrder?.vehicle?.make
)
?.replaceAll(
"{custom:submittedOrder.vehicle.model}",
this.submittedOrder?.vehicle?.model
);
}, },
DropOffWordingText() { DropOffWordingText() {
return this.getCmsContent("DropOffWordingWidget", "BodyText") return this.getCmsContent("DropOffWordingWidget", "BodyText")
?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) ?.replaceAll(
?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) "{custom:submittedOrder.vehicle.year}",
?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); this.submittedOrder?.vehicle?.year
)
?.replaceAll(
"{custom:submittedOrder.vehicle.make}",
this.submittedOrder?.vehicle?.make
)
?.replaceAll(
"{custom:submittedOrder.vehicle.model}",
this.submittedOrder?.vehicle?.model
);
}, },
ServiceLocationAddress() { ServiceLocationAddress() {
return this.submittedOrder?.serviceLocation?.address; return this.submittedOrder?.serviceLocation?.address;