CSR-1012 remove isServiceable from service-location

This commit is contained in:
Matt Caimi 2023-03-07 13:56:07 -05:00
parent af8f7eafd6
commit 1f9a7d1def
4 changed files with 1 additions and 27 deletions

View file

@ -65,7 +65,6 @@ const mockMixin = {
if (zip === "43235" || zip === "55555") {
return Promise.resolve({
containsMilitaryBase: false,
isServiceable: true,
isValid: true,
state: "OH",
zipCodeCtu: "01820",
@ -74,7 +73,6 @@ const mockMixin = {
return Promise.resolve({
containsMilitaryBase: false,
isServiceable: false,
isValid: false,
state: null,
zipCodeCtu: null,
@ -130,7 +128,6 @@ beforeEach(() => {
serviceLocation: {
zipCode: "43235",
state: "OH",
isServiceable: true,
},
},
payment: {
@ -226,7 +223,6 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = {
zipCode: "61606",
state: "IL",
isServiceable: true,
};
const serviceZipCodeComponent = wrapper.findComponent({
@ -249,7 +245,6 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = {
zipCode: "61606",
state: "IL",
isServiceable: true,
};
const mobileLocationQuestions = {
@ -369,13 +364,11 @@ describe("service-location.vue", () => {
wrapper.vm.serviceZipCodeQuestion = {
zipCode: "61606",
state: "IL",
isServiceable: true,
};
const newServiceZipCodeInfo = {
state: "OH",
zipCode: "43081",
isServiceable: true,
};
// Act

View file

@ -48,7 +48,6 @@ export default {
city: this.getServiceCityFromStore(),
state: this.getServiceStateFromStore(),
zipCode: this.getServiceZipCodeFromStore(),
isServiceable: false,
isZipServiceableMobile: null,
isZipServiceableInShop: null,
mobileFeePart: null,
@ -87,7 +86,6 @@ export default {
return {
state: this.state,
zipCode: this.zipCode,
isServiceable: this.isServiceable,
};
},
set: function (newValue) {
@ -97,7 +95,6 @@ export default {
this.state = newValue.state;
this.zipCode = newValue.zipCode;
this.isServiceable = newValue.isServiceable;
},
},
mobileLocationQuestions: {
@ -151,9 +148,6 @@ export default {
getServiceZipCodeFromStore() {
return store.getters.order.serviceLocation.zipCode;
},
getIsServiceableFromStore() {
return store.getters.order.serviceLocation.isServiceable;
},
resetMobileFeePart(serviceZipCode) {
getPricedMobileFeePart(serviceZipCode).then((pricedMobileFeePart) => {
this.mobileFeePart = pricedMobileFeePart;

View file

@ -45,7 +45,6 @@ const mockMixin = {
if (zip === "43235") {
return {
containsMilitaryBase: false,
isServiceable: true,
isValid: true,
state: "OH",
zipCodeCtu: "01820",
@ -55,7 +54,6 @@ const mockMixin = {
if (zip === "61606") {
return {
containsMilitaryBase: false,
isServiceable: true,
isValid: true,
state: "IL",
zipCodeCtu: "01526",
@ -64,7 +62,6 @@ const mockMixin = {
return {
containsMilitaryBase: false,
isServiceable: false,
isValid: false,
state: null,
zipCodeCtu: null,
@ -78,7 +75,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "",
zipCode: "",
isServiceable: undefined,
};
// Arrange
@ -101,7 +97,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "OH",
zipCode: "43235",
isServiceable: true,
};
const wrapper = mount(serviceZipModalQuestion, {
@ -123,7 +118,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "IL",
zipCode: "61606",
isServiceable: true,
};
const zip = "43235";
@ -142,7 +136,7 @@ describe("service-zip-modal-question.vue", () => {
wrapper.vm.internalModel.zipCode = zip;
await wrapper.vm.setZipCode();
let expectedEmit = [[{ isServiceable: true, state: "OH", zipCode: "43235" }]];
let expectedEmit = [[{ state: "OH", zipCode: "43235" }]];
// Assert
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
@ -153,7 +147,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "IL",
zipCode: "61606",
isServiceable: true,
};
const zip = "";
@ -181,7 +174,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "IL",
zipCode: "61606",
isServiceable: true,
};
const zip = "11111";
@ -209,7 +201,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "IL",
zipCode: "61606",
isServiceable: true,
};
const zip = "";
@ -238,7 +229,6 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = {
state: "IL",
zipCode: "61606",
isServiceable: true,
};
const zip = "123";

View file

@ -54,7 +54,6 @@ export default {
default: () => ({
state: "",
zipCode: "",
isServiceable: null,
}),
},
linkWidgetName: String,
@ -104,7 +103,6 @@ export default {
return {
state: modelToCopy.state,
zipCode: modelToCopy.zipCode,
isServiceable: modelToCopy.isServiceable,
};
},
@ -145,7 +143,6 @@ export default {
this.focusOnZipInput();
} else {
this.internalModel.state = zipCodeData.state;
this.internalModel.isServiceable = zipCodeData.isServiceable;
// Update the page level model
this.$emit("update:modelValue", this.internalModel);