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()
|
||||
}
|
||||
});
|
||||
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 address = getRandomString(10, 50);
|
||||
const address2 = getRandomString(0, 50);
|
||||
|
|
@ -354,7 +378,8 @@ describe('contactDetails.vue', () => {
|
|||
address,
|
||||
address2,
|
||||
city,
|
||||
isVehicleProtected
|
||||
isVehicleProtected,
|
||||
provider
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -245,11 +245,14 @@ export default {
|
|||
};
|
||||
useMainStore().updateContactInfo(contactInfo);
|
||||
|
||||
const provider = useMainStore().serviceLocation.provider;
|
||||
|
||||
useMainStore().updateServiceLocation({
|
||||
address: this.address,
|
||||
address2: this.address2,
|
||||
city: this.city,
|
||||
isVehicleProtected: this.isVehicleProtected || 'false'
|
||||
isVehicleProtected: this.isVehicleProtected || 'false',
|
||||
provider
|
||||
});
|
||||
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ export default {
|
|||
};
|
||||
}
|
||||
|
||||
this.mainStore.saveServiceLocation({
|
||||
this.mainStore.updateServiceLocation({
|
||||
state: this.state,
|
||||
zipCode: this.zipCode,
|
||||
zipCodeCtu: this.zipCodeCtu,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
groupName="chooseShop"
|
||||
textPosition="text-start"
|
||||
isRequired
|
||||
validationRules="option-required" />
|
||||
validationRules="provider-required" />
|
||||
<span class="service-zip-prompt">
|
||||
{{ serviceZipPrompt }}
|
||||
</span>
|
||||
|
|
@ -116,7 +116,7 @@ import errorMessages from '@/constants/error-messages';
|
|||
import { defineRule } from 'vee-validate';
|
||||
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';
|
||||
|
||||
|
|
|
|||
|
|
@ -1842,7 +1842,7 @@ export const useMainStore = defineStore({
|
|||
this.order.serviceLocation.zipCodeCtu = serviceLocationInfo.zipCodeCtu ?? this.order.serviceLocation.zipCodeCtu;
|
||||
this.order.serviceLocation.appointmentType = serviceLocationInfo.appointmentType ?? this.order.serviceLocation.appointmentType;
|
||||
this.order.serviceLocation.isVehicleProtected = serviceLocationInfo.isVehicleProtected ?? this.order.serviceLocation.isVehicleProtected;
|
||||
this.updateServiceLocationProvider(serviceLocationInfo.provider)
|
||||
this.updateServiceLocationProvider(serviceLocationInfo.provider);
|
||||
this.order.serviceLocation.tpaSearchRadius = serviceLocationInfo.tpaSearchRadius;
|
||||
},
|
||||
updateAppointmentType(appointmentType) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue