CSR-1804 | Unit test and formatting changes
This commit is contained in:
parent
534337b48b
commit
51f9374104
6 changed files with 28 additions and 6 deletions
|
|
@ -56,7 +56,10 @@ export default {
|
|||
additionalSuccessEventDataHandler,
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
||||
let cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
||||
if (endpoint.includes("/order/")) {
|
||||
cfDistroUrl = "https://localhost:44346";
|
||||
}
|
||||
const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" });
|
||||
const headers = {
|
||||
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import mobileLocationModalQuestions from "./mobile-location-modal-questions";
|
|||
import { mount, shallowMount } from "@vue/test-utils";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
||||
import { getBillToAccountNumber } from "../helpers/service-location-helper/service-location-helper";
|
||||
|
||||
const linkWidgetName = "linkWidgetName";
|
||||
const modalWidgetName = "modalWidgetName";
|
||||
|
|
@ -125,6 +126,9 @@ jest.mock(
|
|||
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
||||
return mockGetServiceabilityDetails(mockServiceZipCode);
|
||||
}),
|
||||
getBillToAccountNumber: jest.fn(() => {
|
||||
return "87291";
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,12 @@ import { v4 as uuidv4 } from "uuid";
|
|||
|
||||
export default {
|
||||
name: "mobile-location-modal-questions",
|
||||
emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base", "updated-bill-to-account-number"],
|
||||
emits: [
|
||||
"update:modelValue",
|
||||
"updated-mobile-fee-part",
|
||||
"updated-contains-military-base",
|
||||
"updated-bill-to-account-number",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
internalModel: deepClone(this.modelValue),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { mount, shallowMount } from "@vue/test-utils";
|
||||
import serviceZipModalQuestion from "./service-zip-modal-question";
|
||||
import { getBillToAccountNumber } from "../helpers/service-location-helper/service-location-helper";
|
||||
|
||||
jest.mock("@/digital-components/textbox-question/textbox-question", () => ({
|
||||
getCmsContent: jest.fn((widgetName, cmsFieldName) => {
|
||||
|
|
@ -51,6 +52,9 @@ jest.mock(
|
|||
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
||||
return mockGetServiceabilityDetails(mockServiceZipCode);
|
||||
}),
|
||||
getBillToAccountNumber: jest.fn((mockServiceZipCodeCtu) => {
|
||||
return "87291";
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,17 @@ import alert from "@/ux-components/alert/alert";
|
|||
import {
|
||||
getPricedMobileFeePart,
|
||||
getServiceabilityDetails,
|
||||
getBillToAccountNumber
|
||||
getBillToAccountNumber,
|
||||
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||
|
||||
export default {
|
||||
name: "service-zip-modal-question",
|
||||
emits: ["update:modelValue", "updated-mobile-fee-part", "updated-contains-military-base", "updated-bill-to-account-number"],
|
||||
emits: [
|
||||
"update:modelValue",
|
||||
"updated-mobile-fee-part",
|
||||
"updated-contains-military-base",
|
||||
"updated-bill-to-account-number",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
internalModel: this.copyModel(this.modelValue),
|
||||
|
|
|
|||
|
|
@ -2422,8 +2422,9 @@ export const actions = {
|
|||
}));
|
||||
|
||||
const order = context.getters.order;
|
||||
|
||||
var providerNumber = order.serviceLocation?.provider?.providerNumber ?? order.serviceLocation?.zipCodeCtu;
|
||||
|
||||
var providerNumber =
|
||||
order.serviceLocation?.provider?.providerNumber ?? order.serviceLocation?.zipCodeCtu;
|
||||
if (providerNumber.startsWith("00") && providerNumber.length > 5) {
|
||||
providerNumber = providerNumber.substring(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue