Removed tests that are no longer applicable for mobile-location-modal-questions
This commit is contained in:
parent
2be5a55cac
commit
cb3bf381b5
1 changed files with 0 additions and 73 deletions
|
|
@ -128,79 +128,6 @@ describe("mobile-location-modal-questions.vue", () => {
|
||||||
expect(wrapper.vm.internalModel.isVehicleProtected).toEqual(true);
|
expect(wrapper.vm.internalModel.isVehicleProtected).toEqual(true);
|
||||||
expect(wrapper.vm.internalModel.serviceZipCode).toEqual("55555");
|
expect(wrapper.vm.internalModel.serviceZipCode).toEqual("55555");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should set mobile fee price to 0.00 when loading the page and there is no existing service zip code", async () => {
|
|
||||||
// Arrange
|
|
||||||
const mobileLocationQuestions = {
|
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: "555 Some St",
|
|
||||||
apartmentNumberOrBusinessName: "Apt 1",
|
|
||||||
city: "Funkytown",
|
|
||||||
state: "OH",
|
|
||||||
zipCode: "43235",
|
|
||||||
},
|
|
||||||
isVehicleProtected: true,
|
|
||||||
serviceZipCode: "",
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const { wrapper } = setupMocks({
|
|
||||||
mixins: [mockMixin],
|
|
||||||
|
|
||||||
props: {
|
|
||||||
modelValue: mobileLocationQuestions,
|
|
||||||
},
|
|
||||||
mountOptions: {
|
|
||||||
attachTo: document.body,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
await wrapper.vm.$nextTick();
|
|
||||||
|
|
||||||
expect(wrapper.props().modelValue.serviceZipCode).toBe("");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(wrapper.vm.mobileFee).toEqual(0.0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it.only("Should calculate the mobile fee price when loading the page and there is an existing service zip code", async () => {
|
|
||||||
// Arrange
|
|
||||||
const mobileLocationQuestions = {
|
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: "555 Some St",
|
|
||||||
apartmentNumberOrBusinessName: "Apt 1",
|
|
||||||
city: "Funkytown",
|
|
||||||
state: "OH",
|
|
||||||
zipCode: "43235",
|
|
||||||
},
|
|
||||||
isVehicleProtected: true,
|
|
||||||
serviceZipCode: "43235",
|
|
||||||
};
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const { wrapper } = setupMocks({
|
|
||||||
mixins: [mockMixin],
|
|
||||||
|
|
||||||
props: {
|
|
||||||
modelValue: mobileLocationQuestions,
|
|
||||||
},
|
|
||||||
mountOptions: {
|
|
||||||
attachTo: document.body,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
await wrapper.vm.$nextTick();
|
|
||||||
await wrapper.vm.$nextTick();
|
|
||||||
await wrapper.vm.$nextTick();
|
|
||||||
await wrapper.vm.$nextTick();
|
|
||||||
|
|
||||||
console.log(wrapper.vm.mobileFee);
|
|
||||||
|
|
||||||
expect(wrapper.props().modelValue.serviceZipCode).toBe("43235");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(wrapper.vm.mobileFee).toEqual(49.99);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) {
|
function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue