Merge pull request #1480 from Safelite/feature/skiener/CSR-1452
CSR-1452 | Multiple bug fixes
This commit is contained in:
commit
b07e24ee1e
5 changed files with 30 additions and 13 deletions
|
|
@ -133,7 +133,6 @@ export default {
|
||||||
suppressError: Boolean,
|
suppressError: Boolean,
|
||||||
useTextForValue: Boolean,
|
useTextForValue: Boolean,
|
||||||
valueToLogType: String,
|
valueToLogType: String,
|
||||||
additionalButtonData: Object,
|
|
||||||
isSmallQuestionText: Boolean,
|
isSmallQuestionText: Boolean,
|
||||||
customButtonQuestionId: String,
|
customButtonQuestionId: String,
|
||||||
logDisplayedValuesEvent: {
|
logDisplayedValuesEvent: {
|
||||||
|
|
@ -256,7 +255,7 @@ export default {
|
||||||
buttonFooterCopy: answer.buttonFooterCopy ?? answer.buttonFooterCopy,
|
buttonFooterCopy: answer.buttonFooterCopy ?? answer.buttonFooterCopy,
|
||||||
buttonImage: answer.buttonImage ?? answer.AnswerImageUrl,
|
buttonImage: answer.buttonImage ?? answer.AnswerImageUrl,
|
||||||
buttonImageId: answer.buttonImageId ?? answer.ImageId,
|
buttonImageId: answer.buttonImageId ?? answer.ImageId,
|
||||||
additionalButtonData: answer.additionalButtonData ?? answer.additionalButtonData,
|
additionalButtonData: answer.additionalButtonData,
|
||||||
groupName: this.formatString(this.groupName),
|
groupName: this.formatString(this.groupName),
|
||||||
value:
|
value:
|
||||||
answer.value ??
|
answer.value ??
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,7 @@
|
||||||
v-model="selectedWipers"
|
v-model="selectedWipers"
|
||||||
isMultiSelect
|
isMultiSelect
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="checkbox-required"
|
validationRules="checkbox-required" />
|
||||||
:additionalButtonData="additionalButtonData" />
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="wipersOffered === wipersOfferedStrings.FRONT" class="wiper-options">
|
<div v-else-if="wipersOffered === wipersOfferedStrings.FRONT" class="wiper-options">
|
||||||
<p class="price">+${{ wipersModal.totalFrontPrice }}</p>
|
<p class="price">+${{ wipersModal.totalFrontPrice }}</p>
|
||||||
|
|
|
||||||
|
|
@ -186,18 +186,21 @@ describe("shop-question.vue", () => {
|
||||||
buttonLabel: "Westerville",
|
buttonLabel: "Westerville",
|
||||||
buttonLabelSubCopy: "5 mi",
|
buttonLabelSubCopy: "5 mi",
|
||||||
value: "003335",
|
value: "003335",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "760 Dearborn Park Ln, Worthington, OH 43085",
|
buttonBodyCopy: "760 Dearborn Park Ln, Worthington, OH 43085",
|
||||||
buttonLabel: "Worthington",
|
buttonLabel: "Worthington",
|
||||||
buttonLabelSubCopy: "10.5 mi",
|
buttonLabelSubCopy: "10.5 mi",
|
||||||
value: "001820",
|
value: "001820",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "5015 N High St, Columbus, OH 43214",
|
buttonBodyCopy: "5015 N High St, Columbus, OH 43214",
|
||||||
buttonLabel: "Columbus",
|
buttonLabel: "Columbus",
|
||||||
buttonLabelSubCopy: "11.5 mi",
|
buttonLabelSubCopy: "11.5 mi",
|
||||||
value: "003343",
|
value: "003343",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
@ -414,6 +417,10 @@ describe("shop-question.vue", () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
displayedAnswers.forEach(
|
||||||
|
(answer) => (answer.additionalButtonData = wrapper.vm.additionalButtonData)
|
||||||
|
);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await wrapper.setProps({
|
await wrapper.setProps({
|
||||||
shopProviderData: shopQuestionInitialData,
|
shopProviderData: shopQuestionInitialData,
|
||||||
|
|
@ -445,42 +452,49 @@ describe("shop-question.vue", () => {
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.vm.answers.length).toBe(6);
|
expect(wrapper.vm.answers.length).toBe(6);
|
||||||
|
console.log(wrapper.vm.answers);
|
||||||
expect(wrapper.vm.answers).toEqual([
|
expect(wrapper.vm.answers).toEqual([
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "4403 Executive Pkwy, Westerville, OH 43081",
|
buttonBodyCopy: "4403 Executive Pkwy, Westerville, OH 43081",
|
||||||
buttonLabel: "Westerville",
|
buttonLabel: "Westerville",
|
||||||
buttonLabelSubCopy: "5 mi",
|
buttonLabelSubCopy: "5 mi",
|
||||||
value: "003335",
|
value: "003335",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "760 Dearborn Park Ln, Worthington, OH 43085",
|
buttonBodyCopy: "760 Dearborn Park Ln, Worthington, OH 43085",
|
||||||
buttonLabel: "Worthington",
|
buttonLabel: "Worthington",
|
||||||
buttonLabelSubCopy: "10.5 mi",
|
buttonLabelSubCopy: "10.5 mi",
|
||||||
value: "001820",
|
value: "001820",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "5015 N High St, Columbus, OH 43214",
|
buttonBodyCopy: "5015 N High St, Columbus, OH 43214",
|
||||||
buttonLabel: "Columbus",
|
buttonLabel: "Columbus",
|
||||||
buttonLabelSubCopy: "11.5 mi",
|
buttonLabelSubCopy: "11.5 mi",
|
||||||
value: "003343",
|
value: "003343",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "1670 Harmon Ave, Columbus, OH 43223",
|
buttonBodyCopy: "1670 Harmon Ave, Columbus, OH 43223",
|
||||||
buttonLabel: "Columbus",
|
buttonLabel: "Columbus",
|
||||||
buttonLabelSubCopy: "16 mi",
|
buttonLabelSubCopy: "16 mi",
|
||||||
value: "006747",
|
value: "006747",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "3938 Powell Rd, Powell, OH 43065",
|
buttonBodyCopy: "3938 Powell Rd, Powell, OH 43065",
|
||||||
buttonLabel: "Powell",
|
buttonLabel: "Powell",
|
||||||
buttonLabelSubCopy: "16.5 mi",
|
buttonLabelSubCopy: "16.5 mi",
|
||||||
value: "003341",
|
value: "003341",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
buttonBodyCopy: "4580 W Broad St, Columbus, OH 43228",
|
buttonBodyCopy: "4580 W Broad St, Columbus, OH 43228",
|
||||||
buttonLabel: "Columbus",
|
buttonLabel: "Columbus",
|
||||||
buttonLabelSubCopy: "19.5 mi",
|
buttonLabelSubCopy: "19.5 mi",
|
||||||
value: "003342",
|
value: "003342",
|
||||||
|
additionalButtonData: wrapper.vm.additionalButtonData,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
v-model="selectedProviderNumber"
|
v-model="selectedProviderNumber"
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="option-required"
|
validationRules="option-required" />
|
||||||
:additionalButtonData="additionalButtonData" />
|
|
||||||
<textLink
|
<textLink
|
||||||
v-if="displaySeeMoreLocationsLink"
|
v-if="displaySeeMoreLocationsLink"
|
||||||
ref="showMoreShopsLink"
|
ref="showMoreShopsLink"
|
||||||
|
|
@ -156,6 +155,7 @@ export default {
|
||||||
buttonLabel: city,
|
buttonLabel: city,
|
||||||
buttonLabelSubCopy: `${distanceInMiles} mi`,
|
buttonLabelSubCopy: `${distanceInMiles} mi`,
|
||||||
buttonBodyCopy: `${streetAddress}, ${city}, ${state} ${zipCode}`,
|
buttonBodyCopy: `${streetAddress}, ${city}, ${state} ${zipCode}`,
|
||||||
|
additionalButtonData: this.additionalButtonData,
|
||||||
value: shopProvider.providerNumber,
|
value: shopProvider.providerNumber,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2267,13 +2267,18 @@ export const actions = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const validateResponse = await globalMethods.callHttpClient({
|
const validateResponse = await globalMethods
|
||||||
method: endpoints.ValidatePromo.method,
|
.callHttpClient({
|
||||||
endpoint: endpoints.ValidatePromo.url,
|
method: endpoints.ValidatePromo.method,
|
||||||
payload: requestObject,
|
endpoint: endpoints.ValidatePromo.url,
|
||||||
logApiCall: true,
|
payload: requestObject,
|
||||||
pageNameToLog: pageNameToLog,
|
logApiCall: true,
|
||||||
});
|
pageNameToLog: pageNameToLog,
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
// Validate promo will return 4xx errors when an invalid promo
|
||||||
|
return error;
|
||||||
|
});
|
||||||
|
|
||||||
if (validateResponse?.data?.serverData) {
|
if (validateResponse?.data?.serverData) {
|
||||||
context.commit(
|
context.commit(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue