CSR-628 Add license-plate-lookup tests

This commit is contained in:
Katie 2022-05-31 15:09:23 -04:00
parent 10c0177719
commit e9bc0caf69
2 changed files with 3 additions and 4 deletions

View file

@ -317,7 +317,6 @@ describe("address-lookup.vue", () => {
function setupMocks(mountOptions, { isZipServiceable = true, lookupVinbyAddressResponse }) { function setupMocks(mountOptions, { isZipServiceable = true, lookupVinbyAddressResponse }) {
store.commit(storeMutations.RESET_STATE); store.commit(storeMutations.RESET_STATE);
console.log(isZipServiceable)
const wrapper = shallowMount(addressLookup, getMountOptions({ const wrapper = shallowMount(addressLookup, getMountOptions({
...mountOptions, ...mountOptions,
actionList: [ actionList: [

View file

@ -220,19 +220,18 @@ export default {
return store.getters.order.customer.emailAddress; return store.getters.order.customer.emailAddress;
}, },
getServiceZipFromStore() { getServiceZipFromStore() {
return store.getters.order.serviceLocation.zip; return store.getters.order.serviceLocation.zipCode;
}, },
backButtonAction() { backButtonAction() {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
async forwardButtonAction() { async forwardButtonAction() {
//Call zip validation services //Call zip validation services
const registrationZipValidationPromise = this.validateZip(this.registrationZip); const registrationZipValidationPromise = this.validateZip(this.registrationZip);
const serviceZipValidationPromise = this.serviceZip ? this.validateZip(this.serviceZip) : null; const serviceZipValidationPromise = this.serviceZip ? this.validateZip(this.serviceZip) : null;
const registrationZipValidationResults = await registrationZipValidationPromise; const registrationZipValidationResults = await registrationZipValidationPromise;
const serviceZipValidationResults = serviceZipValidationPromise !== null ? (await serviceZipValidationPromise) : registrationZipValidationResults; const serviceZipValidationResults = serviceZipValidationPromise !== null ? (await serviceZipValidationPromise) : registrationZipValidationResults;
//Handle service zip validations //Handle service zip validations
if (!serviceZipValidationResults.data.isServiceable) { if (!serviceZipValidationResults.data.isServiceable) {
this.$refs.funnelFooter.removeLoader(); this.$refs.funnelFooter.removeLoader();
@ -255,6 +254,7 @@ export default {
this.isCarIdDifferent = false; this.isCarIdDifferent = false;
return; return;
}); });
this.isCarIdDifferent = this.isCarIdDifferent =
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId; vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;