CSR-1012 remove isServiceable from service-location
This commit is contained in:
parent
af8f7eafd6
commit
1f9a7d1def
4 changed files with 1 additions and 27 deletions
|
|
@ -65,7 +65,6 @@ const mockMixin = {
|
||||||
if (zip === "43235" || zip === "55555") {
|
if (zip === "43235" || zip === "55555") {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCodeCtu: "01820",
|
zipCodeCtu: "01820",
|
||||||
|
|
@ -74,7 +73,6 @@ const mockMixin = {
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: false,
|
|
||||||
isValid: false,
|
isValid: false,
|
||||||
state: null,
|
state: null,
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
|
|
@ -130,7 +128,6 @@ beforeEach(() => {
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "43235",
|
zipCode: "43235",
|
||||||
state: "OH",
|
state: "OH",
|
||||||
isServiceable: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
|
|
@ -226,7 +223,6 @@ describe("service-location.vue", () => {
|
||||||
const newServiceZipCodeQuestion = {
|
const newServiceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const serviceZipCodeComponent = wrapper.findComponent({
|
const serviceZipCodeComponent = wrapper.findComponent({
|
||||||
|
|
@ -249,7 +245,6 @@ describe("service-location.vue", () => {
|
||||||
const newServiceZipCodeQuestion = {
|
const newServiceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mobileLocationQuestions = {
|
const mobileLocationQuestions = {
|
||||||
|
|
@ -369,13 +364,11 @@ describe("service-location.vue", () => {
|
||||||
wrapper.vm.serviceZipCodeQuestion = {
|
wrapper.vm.serviceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const newServiceZipCodeInfo = {
|
const newServiceZipCodeInfo = {
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCode: "43081",
|
zipCode: "43081",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ export default {
|
||||||
city: this.getServiceCityFromStore(),
|
city: this.getServiceCityFromStore(),
|
||||||
state: this.getServiceStateFromStore(),
|
state: this.getServiceStateFromStore(),
|
||||||
zipCode: this.getServiceZipCodeFromStore(),
|
zipCode: this.getServiceZipCodeFromStore(),
|
||||||
isServiceable: false,
|
|
||||||
isZipServiceableMobile: null,
|
isZipServiceableMobile: null,
|
||||||
isZipServiceableInShop: null,
|
isZipServiceableInShop: null,
|
||||||
mobileFeePart: null,
|
mobileFeePart: null,
|
||||||
|
|
@ -87,7 +86,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
state: this.state,
|
state: this.state,
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
isServiceable: this.isServiceable,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
|
|
@ -97,7 +95,6 @@ export default {
|
||||||
|
|
||||||
this.state = newValue.state;
|
this.state = newValue.state;
|
||||||
this.zipCode = newValue.zipCode;
|
this.zipCode = newValue.zipCode;
|
||||||
this.isServiceable = newValue.isServiceable;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mobileLocationQuestions: {
|
mobileLocationQuestions: {
|
||||||
|
|
@ -151,9 +148,6 @@ export default {
|
||||||
getServiceZipCodeFromStore() {
|
getServiceZipCodeFromStore() {
|
||||||
return store.getters.order.serviceLocation.zipCode;
|
return store.getters.order.serviceLocation.zipCode;
|
||||||
},
|
},
|
||||||
getIsServiceableFromStore() {
|
|
||||||
return store.getters.order.serviceLocation.isServiceable;
|
|
||||||
},
|
|
||||||
resetMobileFeePart(serviceZipCode) {
|
resetMobileFeePart(serviceZipCode) {
|
||||||
getPricedMobileFeePart(serviceZipCode).then((pricedMobileFeePart) => {
|
getPricedMobileFeePart(serviceZipCode).then((pricedMobileFeePart) => {
|
||||||
this.mobileFeePart = pricedMobileFeePart;
|
this.mobileFeePart = pricedMobileFeePart;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ const mockMixin = {
|
||||||
if (zip === "43235") {
|
if (zip === "43235") {
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCodeCtu: "01820",
|
zipCodeCtu: "01820",
|
||||||
|
|
@ -55,7 +54,6 @@ const mockMixin = {
|
||||||
if (zip === "61606") {
|
if (zip === "61606") {
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCodeCtu: "01526",
|
zipCodeCtu: "01526",
|
||||||
|
|
@ -64,7 +62,6 @@ const mockMixin = {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: false,
|
|
||||||
isValid: false,
|
isValid: false,
|
||||||
state: null,
|
state: null,
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
|
|
@ -78,7 +75,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "",
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
isServiceable: undefined,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
@ -101,7 +97,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCode: "43235",
|
zipCode: "43235",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapper = mount(serviceZipModalQuestion, {
|
const wrapper = mount(serviceZipModalQuestion, {
|
||||||
|
|
@ -123,7 +118,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "43235";
|
const zip = "43235";
|
||||||
|
|
@ -142,7 +136,7 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
wrapper.vm.internalModel.zipCode = zip;
|
wrapper.vm.internalModel.zipCode = zip;
|
||||||
await wrapper.vm.setZipCode();
|
await wrapper.vm.setZipCode();
|
||||||
|
|
||||||
let expectedEmit = [[{ isServiceable: true, state: "OH", zipCode: "43235" }]];
|
let expectedEmit = [[{ state: "OH", zipCode: "43235" }]];
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
|
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
|
||||||
|
|
@ -153,7 +147,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "";
|
const zip = "";
|
||||||
|
|
@ -181,7 +174,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "11111";
|
const zip = "11111";
|
||||||
|
|
@ -209,7 +201,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "";
|
const zip = "";
|
||||||
|
|
@ -238,7 +229,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "123";
|
const zip = "123";
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ export default {
|
||||||
default: () => ({
|
default: () => ({
|
||||||
state: "",
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
isServiceable: null,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
|
|
@ -104,7 +103,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
state: modelToCopy.state,
|
state: modelToCopy.state,
|
||||||
zipCode: modelToCopy.zipCode,
|
zipCode: modelToCopy.zipCode,
|
||||||
isServiceable: modelToCopy.isServiceable,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -145,7 +143,6 @@ export default {
|
||||||
this.focusOnZipInput();
|
this.focusOnZipInput();
|
||||||
} else {
|
} else {
|
||||||
this.internalModel.state = zipCodeData.state;
|
this.internalModel.state = zipCodeData.state;
|
||||||
this.internalModel.isServiceable = zipCodeData.isServiceable;
|
|
||||||
|
|
||||||
// Update the page level model
|
// Update the page level model
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
this.$emit("update:modelValue", this.internalModel);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue