Merge pull request #917 from Safelite/feature/richardson/SSR-1732
Update address questions from v-if to v-show
This commit is contained in:
commit
310759eb1e
3 changed files with 10 additions and 8 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,13 @@
|
|||
hasIcon
|
||||
disableAutoFill
|
||||
validationRules="street-address-required"
|
||||
@keydown.enter.prevent
|
||||
@focusout="fillInAddress()" />
|
||||
@keydown.enter.prevent />
|
||||
</div>
|
||||
</div>
|
||||
<transition
|
||||
name="fade"
|
||||
mode="out-in">
|
||||
<div v-if="showAllFields">
|
||||
<div v-show="showAllFields">
|
||||
<div
|
||||
v-if="includeStreetAddress2"
|
||||
class="row mt-2 mb-4">
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
id="address-questions-wrapper"
|
||||
ref="addressQuestions"
|
||||
v-model="customerQuestions.addressQuestions"
|
||||
includeStreetAddress2="true" />
|
||||
:includeStreetAddress2="true" />
|
||||
<textboxQuestion
|
||||
ref="policyHolderFirstName"
|
||||
v-model="customerQuestions.firstName"
|
||||
|
|
|
|||
Loading…
Reference in a new issue