From 6eada2ed48ff21bab03f8c14019ede9e49f4f7c7 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 12 Dec 2024 14:48:28 -0500 Subject: [PATCH 1/2] Use v-show instead of v-if since those fields are required. Fields are hidden to start and are shown once a google address is chosen or tab/enter is used to select first. --- src/iss-components/address-questions/address-questions.vue | 5 ++--- src/layouts/policy-holder-details/policy-holder-details.vue | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/iss-components/address-questions/address-questions.vue b/src/iss-components/address-questions/address-questions.vue index 57b9d0dc..f95924f2 100644 --- a/src/iss-components/address-questions/address-questions.vue +++ b/src/iss-components/address-questions/address-questions.vue @@ -12,14 +12,13 @@ hasIcon disableAutoFill validationRules="street-address-required" - @keydown.enter.prevent - @focusout="fillInAddress()" /> + @keydown.enter.prevent /> -
+
diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 2758f64f..165fb775 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -19,7 +19,7 @@ id="address-questions-wrapper" ref="addressQuestions" v-model="customerQuestions.addressQuestions" - includeStreetAddress2="true" /> + :includeStreetAddress2="true" /> Date: Thu, 12 Dec 2024 14:53:16 -0500 Subject: [PATCH 2/2] update test --- .../address-questions/address-questions.spec.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/iss-components/address-questions/address-questions.spec.js b/src/iss-components/address-questions/address-questions.spec.js index cf7003fa..15a1fa77 100644 --- a/src/iss-components/address-questions/address-questions.spec.js +++ b/src/iss-components/address-questions/address-questions.spec.js @@ -73,7 +73,7 @@ describe('address-questions.vue', () => { }); describe('initial state', () => { - test('Should hide addressQuestions sub-components (textbox-questions and dropdown-questions)', async () => { + test('Should hide(exists but not visible) addressQuestions sub-components (textbox-questions and dropdown-questions)', async () => { // Arrange const { wrapper } = setupMocks({}); @@ -86,9 +86,12 @@ describe('address-questions.vue', () => { // Assert expect(streetAddress.exists()).toBe(true); - expect(city.exists()).toBe(false); - expect(state.exists()).toBe(false); - expect(zipCode.exists()).toBe(false); + expect(city.exists()).toBe(true); + expect(city.isVisible(false)); + expect(state.exists()).toBe(true); + expect(state.isVisible(false)); + expect(zipCode.exists()).toBe(true); + expect(zipCode.isVisible(false)); expect(streetAddress2.exists()).toBe(false); });