Merge branch 'develop' into feature/kroell/INSR-8094
This commit is contained in:
commit
258b5ae20b
5 changed files with 34 additions and 6 deletions
|
|
@ -330,6 +330,30 @@ describe('contactDetails.vue', () => {
|
||||||
navigate: jest.fn()
|
navigate: jest.fn()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const provider = {
|
||||||
|
address: {
|
||||||
|
city: getRandomString(4, 20),
|
||||||
|
state: getRandomString(2, 2),
|
||||||
|
streetAddress: getRandomString(10, 50),
|
||||||
|
zipCode: getRandomInt(10000, 99999).toString(),
|
||||||
|
zipCodeCtu: getRandomInt(10000, 99999).toString()
|
||||||
|
},
|
||||||
|
companyName: getRandomString(5, 15),
|
||||||
|
phoneNumber: getRandomInt(1000000000, 9999999999).toString(),
|
||||||
|
providerNumber: getRandomInt(100000, 999999).toString()
|
||||||
|
}
|
||||||
|
const mainInitialState = {
|
||||||
|
order: {
|
||||||
|
serviceLocation: {
|
||||||
|
provider
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mountOptions.global.plugins = [createTestingPinia({
|
||||||
|
initialState: {
|
||||||
|
main: mainInitialState
|
||||||
|
}
|
||||||
|
})];
|
||||||
const wrapper = shallowMount(contactDetails, mountOptions);
|
const wrapper = shallowMount(contactDetails, mountOptions);
|
||||||
const address = getRandomString(10, 50);
|
const address = getRandomString(10, 50);
|
||||||
const address2 = getRandomString(0, 50);
|
const address2 = getRandomString(0, 50);
|
||||||
|
|
@ -354,7 +378,8 @@ describe('contactDetails.vue', () => {
|
||||||
address,
|
address,
|
||||||
address2,
|
address2,
|
||||||
city,
|
city,
|
||||||
isVehicleProtected
|
isVehicleProtected,
|
||||||
|
provider
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -245,11 +245,14 @@ export default {
|
||||||
};
|
};
|
||||||
useMainStore().updateContactInfo(contactInfo);
|
useMainStore().updateContactInfo(contactInfo);
|
||||||
|
|
||||||
|
const provider = useMainStore().serviceLocation.provider;
|
||||||
|
|
||||||
useMainStore().updateServiceLocation({
|
useMainStore().updateServiceLocation({
|
||||||
address: this.address,
|
address: this.address,
|
||||||
address2: this.address2,
|
address2: this.address2,
|
||||||
city: this.city,
|
city: this.city,
|
||||||
isVehicleProtected: this.isVehicleProtected || 'false'
|
isVehicleProtected: this.isVehicleProtected || 'false',
|
||||||
|
provider
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ export default {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mainStore.saveServiceLocation({
|
this.mainStore.updateServiceLocation({
|
||||||
state: this.state,
|
state: this.state,
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
zipCodeCtu: this.zipCodeCtu,
|
zipCodeCtu: this.zipCodeCtu,
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
groupName="chooseShop"
|
groupName="chooseShop"
|
||||||
textPosition="text-start"
|
textPosition="text-start"
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="option-required" />
|
validationRules="provider-required" />
|
||||||
<span class="service-zip-prompt">
|
<span class="service-zip-prompt">
|
||||||
{{ serviceZipPrompt }}
|
{{ serviceZipPrompt }}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -116,7 +116,7 @@ import errorMessages from '@/constants/error-messages';
|
||||||
import { defineRule } from 'vee-validate';
|
import { defineRule } from 'vee-validate';
|
||||||
import { required } from '@/helpers/validation-rules';
|
import { required } from '@/helpers/validation-rules';
|
||||||
|
|
||||||
defineRule('option-required', required(errorMessages.PROVIDER_REQUIRED));
|
defineRule('provider-required', required(errorMessages.PROVIDER_REQUIRED));
|
||||||
|
|
||||||
const SERVICE_ZIP_QUESTION_REF_NAME = 'serviceZipCodeQuestion';
|
const SERVICE_ZIP_QUESTION_REF_NAME = 'serviceZipCodeQuestion';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1842,7 +1842,7 @@ export const useMainStore = defineStore({
|
||||||
this.order.serviceLocation.zipCodeCtu = serviceLocationInfo.zipCodeCtu ?? this.order.serviceLocation.zipCodeCtu;
|
this.order.serviceLocation.zipCodeCtu = serviceLocationInfo.zipCodeCtu ?? this.order.serviceLocation.zipCodeCtu;
|
||||||
this.order.serviceLocation.appointmentType = serviceLocationInfo.appointmentType ?? this.order.serviceLocation.appointmentType;
|
this.order.serviceLocation.appointmentType = serviceLocationInfo.appointmentType ?? this.order.serviceLocation.appointmentType;
|
||||||
this.order.serviceLocation.isVehicleProtected = serviceLocationInfo.isVehicleProtected ?? this.order.serviceLocation.isVehicleProtected;
|
this.order.serviceLocation.isVehicleProtected = serviceLocationInfo.isVehicleProtected ?? this.order.serviceLocation.isVehicleProtected;
|
||||||
this.updateServiceLocationProvider(serviceLocationInfo.provider)
|
this.updateServiceLocationProvider(serviceLocationInfo.provider);
|
||||||
this.order.serviceLocation.tpaSearchRadius = serviceLocationInfo.tpaSearchRadius;
|
this.order.serviceLocation.tpaSearchRadius = serviceLocationInfo.tpaSearchRadius;
|
||||||
},
|
},
|
||||||
updateAppointmentType(appointmentType) {
|
updateAppointmentType(appointmentType) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue