diff --git a/src/fmg-components/address-questions/address-questions.spec.js b/src/fmg-components/address-questions/address-questions.spec.js index 5267bb89c..6be242d14 100644 --- a/src/fmg-components/address-questions/address-questions.spec.js +++ b/src/fmg-components/address-questions/address-questions.spec.js @@ -602,6 +602,24 @@ function setupMocks({ if (props) resultingMountOptions.propsData = props; + if (isShallowMount) { + resultingMountOptions.global.stubs = { + ...(resultingMountOptions.global.stubs ?? {}), + textboxQuestion: { + template: ``, + methods: { + handleChange: jest.fn(), + }, + }, + dropdownQuestion: { + template: ``, + methods: { + handleChange: jest.fn(), + }, + }, + }; + } + const wrapper = isShallowMount ? shallowMount(addressQuestions, resultingMountOptions) : mount(addressQuestions, resultingMountOptions); diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 7acd0f4f0..4226b014c 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -371,6 +371,12 @@ export default { self.addressModel.state = state; self.addressModel.zipCode = zipCode; + this.$refs.autocomplete.handleChange(streetNumber); + this.$refs.apartmentNumberOrBusinessName.handleChange(route); + this.$refs.city.handleChange(city); + this.$refs.state.handleChange(state); + this.$refs.zipCode.handleChange(zipCode); + if (!this.displayVerificationWarning) { this.displayVerificationWarning = place.partial_match || !isAddressComplete; }