Merge branch 'develop' into feature/CASH-286

This commit is contained in:
CarlNation 2025-02-24 11:13:27 -05:00 committed by GitHub
commit 2bc75cde2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 22 deletions

View file

@ -2,6 +2,7 @@ const partNumberStrings = {
// Recalibration
MOBILE_STATIC_RECAL_FEE: "RECAL MOBILE",
MOBILE_DUAL_RECAL_FEE: "RECAL MOBILEDUAL",
DONATION: "DONATION",
};
export { partNumberStrings };

View file

@ -130,10 +130,6 @@ export default {
},
methods: {
handleDonationAction(submitEvent) {
console.log(
"running handleDonationAction(), submitEvent.target.elements.amount.value: ",
submitEvent.target.elements.amount.value
);
this.selectedValue = submitEvent.target.elements.amount.value;
},
},

View file

@ -14,6 +14,19 @@ import { experimentSettings } from "@/constants/experiments";
const mockExperimentSettings = experimentSettings;
jest.mock("@/mixins/experiment-mixin.js", () => ({
methods: {
getSettingValue(settingName) {
if (settingName === mockExperimentSettings.RECAL_PRICE_REMOVE) {
return true;
}
},
hasSettingEqualTo(settingName, settingValue) {
return true;
},
},
}));
// Mock our module for promises.
jest.mock("@/helpers/layout-helper.js", () => ({
settleAllPromises: jest.fn(),
@ -572,13 +585,6 @@ function setupMocks({ customMountOptions }) {
getCmsContent: jest.fn().mockImplementation(() => {
return wordingText;
}),
getSettingValue: jest.fn((settingName) => {
if (settingName === experimentSettings.RECAL_PRICE_REMOVE) {
return "true";
}
return "false";
}),
},
},
];

View file

@ -64,7 +64,7 @@
:isItac="isItac"
:isNoComp="isNoComp" />
<div class="mt-3" v-if="displayFosterLove">
<div class="mt-3" v-if="DisplayFosterLove">
<donationBlock
cmsWidgetName="DonationWidget"
v-model="donationAmount"
@ -73,10 +73,6 @@
:showDonationError="showDonationError" />
</div>
<!-- <button type="button" @click="addDonation(3)">
Add Donation of $3
</button> -->
<hr class="mb-5" />
<div class="emailtext" v-html="ConfirmationEmailText"></div>
@ -122,6 +118,7 @@ import { partTypeStrings } from "@/constants/part-type-strings";
import { containsLineItemWithPartType } from "@/helpers/service-package-helper";
import { containsRecalParts } from "@/helpers/recal-helper.js";
import donationBlock from "@/experiment-components/donation-block.vue";
import { partNumberStrings } from "@/constants/part-number-strings";
export default {
name: "confirmation",
@ -219,7 +216,7 @@ export default {
};
const donationItems = lineItemsFromSubmittedOrder.supportingItems?.filter(
(item) => item.partNumber === "DONATION"
(item) => item.partNumber === partNumberStrings.DONATION
);
const donationAmount = donationItems?.length > 0 ? donationItems[0].sellingPrice : 0;
@ -532,13 +529,9 @@ export default {
"test",
false
).catch((error) => {
// this.$refs.navbar.removeLoader();
console.error("Error!!! error: ", error);
return error;
});
console.log("ran addDonation()... (*fake call*) donationResponse: ", donationResponse);
if (donationResponse?.status == "200") {
this.showDonationSuccess = true;
this.showDonationError = false;
@ -561,7 +554,6 @@ export default {
watch: {
donationAmount(newValue) {
newValue = parseInt(newValue);
console.log("WATCHED donationAmount changed: ", newValue);
// this.addDonation(newValue);
// TODO - when backend code is final, then remove the below and restore the line above