diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue
index 944811780..ee9ecdbad 100644
--- a/src/common-components/button-question/button-question.vue
+++ b/src/common-components/button-question/button-question.vue
@@ -35,7 +35,6 @@
data-test="button"
:validationRules="validationRules"
:class="[suppressError ? 'alertError' : '']"
- :clearOnUnmount="clearOnUnmount"
/>
@@ -90,11 +89,7 @@ export default {
modelValue: [Array, String],
validationRules: String,
suppressError: Boolean,
- useTextForValue: Boolean,
- clearOnUnmount: {
- type: Boolean,
- default: true
- },
+ useTextForValue: Boolean
},
computed: {
formattedGroupName() {
@@ -177,7 +172,6 @@ export default {
this.selectedValues = val.value;
}
}
-
this.$emit("isCheckedChanged", val);
},
},
diff --git a/src/common-components/funnel-header/funnel-header.vue b/src/common-components/funnel-header/funnel-header.vue
index 1fa13094f..dcc997c5f 100644
--- a/src/common-components/funnel-header/funnel-header.vue
+++ b/src/common-components/funnel-header/funnel-header.vue
@@ -7,11 +7,12 @@
diff --git a/src/common-components/question-chain/question-chain.vue b/src/common-components/question-chain/question-chain.vue
index c9f6c3716..87dfaee7a 100644
--- a/src/common-components/question-chain/question-chain.vue
+++ b/src/common-components/question-chain/question-chain.vue
@@ -11,7 +11,6 @@
v-model="selectedValue"
isRequired
:validationRules="validationRules"
- :clearOnUnmount=false
/>
diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue
index f94d69826..90fa2bba9 100644
--- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue
+++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue
@@ -56,13 +56,15 @@
-
-
-
diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue
index 9abfd17d8..3949d4c41 100644
--- a/src/layouts/estimate/estimate.vue
+++ b/src/layouts/estimate/estimate.vue
@@ -11,11 +11,10 @@
+ class="vinLookupMethodHeading"
+ cmsWidgetName="AlertVinLookupQuestion"
+ alertClass=""
+ />
{
});
describe("alert", () => {
- test("when displayVehicleChangeAlert router params is true, the alert: 'vehicleChangeAlert' should be visible", () => {
+ test("when displayVehicleChangeAlert router params is true, the alert: 'vehicleChangeAlert' should be rendered", () => {
// Arrange & Act
const { wrapper } = setupMocks({
mountOptionsMockData: {
@@ -269,10 +269,10 @@ describe("vehicle-damage.vue", () => {
}
});
// Assert
- expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(true);
+ expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(true);
});
- test("when displayVehicleChangeAlert router params is false, the alert: 'vehicleChangeAlert' should not be visible", () => {
+ test("when displayVehicleChangeAlert router params is false, the alert: 'vehicleChangeAlert' should not be rendered", () => {
// Arrange & Act
const { wrapper } = setupMocks({
mountOptionsMockData: {
@@ -284,10 +284,10 @@ describe("vehicle-damage.vue", () => {
}
});
// Assert
- expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(false);
+ expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(false);
});
- test("when displayVehicleChangeAlert router params is undefined, the alert: 'vehicleChangeAlert' should not be visible", () => {
+ test("when displayVehicleChangeAlert router params is undefined, the alert: 'vehicleChangeAlert' should not be rendered", () => {
// Arrange & Act
const { wrapper } = setupMocks({
mountOptionsMockData: {
@@ -299,7 +299,7 @@ describe("vehicle-damage.vue", () => {
}
});
// Assert
- expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).isVisible()).toBe(false);
+ expect(wrapper.findComponent({ ref: 'vehicleChangeAlert' }).exists()).toBe(false);
})
});
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index b144ef2b3..7d61814f8 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -10,11 +10,10 @@
-
@@ -32,9 +31,9 @@
:selectedDamageLocations="selectedDamageLocations"
/>
diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
index 02670108c..c5d3af741 100644
--- a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
+++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue
@@ -8,9 +8,9 @@
:validationRules="windshieldDamageTypeQuestionValidationRules"
/>
@@ -30,9 +30,9 @@
isRequired
/>
diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js
index ea80be578..5a82145c0 100644
--- a/src/mixins/base-mixin.js
+++ b/src/mixins/base-mixin.js
@@ -69,7 +69,10 @@ export default {
},
dynamicStrings(){
return dynamicStrings;
- }
+ },
+ cssClassNameForCmsWidget(){
+ return "widget-name-" + this.cmsWidgetName;
+ },
},
};
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index d356d0569..8462e4436 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -2,7 +2,7 @@
{{ alertHeadline }}
@@ -54,7 +54,15 @@ export default {
alert-info (blue)
*/
alertClass: String,
- cmsWidgetName: String,
+ cmsWidgetName: {
+ type: String,
+ default(rawProps) {
+ if (!rawProps.cmsWidgetName) {
+ console.log('Error: Missing a CMS Widget Name (required field)');
+ }
+ return 'widgetUndefined';
+ },
+ },
manualHeadline: String,
manualCopy: String,
shouldScrollToOnMount: {
@@ -64,10 +72,10 @@ export default {
},
computed: {
alertHeadline(){
- return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'HeadlineText') : this.manualHeadline;
+ return this.manualHeadline ? this.manualHeadline : this.getCmsContent(this.cmsWidgetName, 'HeadlineText');
},
alertCopy(){
- return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'BodyText') : this.manualCopy;
+ return this.manualCopy ? this.manualCopy : this.getCmsContent(this.cmsWidgetName, 'BodyText');
},
splitAlertCopyForParagraphTag(){
return splitCMSCopyOnParagraphTag(this.alertCopy);
diff --git a/src/ux-components/list-button-horizontal/list-button-horizontal.vue b/src/ux-components/list-button-horizontal/list-button-horizontal.vue
index 49978aa1e..2fef5119f 100644
--- a/src/ux-components/list-button-horizontal/list-button-horizontal.vue
+++ b/src/ux-components/list-button-horizontal/list-button-horizontal.vue
@@ -78,10 +78,6 @@ export default {
validationRules: String,
selectedValues: [Array, String],
hasError: Boolean,
- clearOnUnmount: {
- type: Boolean,
- default: true
- }
},
data() {
return {
@@ -96,11 +92,9 @@ export default {
: this.selectedValues[0];
}
},
- unmounted() { // needed to clear this button's selectedValues if it is removed to keep validation in sync
- if (this.clearOnUnmount) {
- this.checkValue = false;
- this.handleCheckChange();
- }
+ unmounted() { // needed to clear this button's selectedValues if it is removed
+ this.checkValue = false;
+ this.handleCheckChange();
},
methods: {
displayLoader() {
diff --git a/src/ux-components/list-button/list-button.vue b/src/ux-components/list-button/list-button.vue
index a15675d58..6f67d6426 100644
--- a/src/ux-components/list-button/list-button.vue
+++ b/src/ux-components/list-button/list-button.vue
@@ -77,10 +77,6 @@ export default {
validationRules: String,
selectedValues: [Array, String],
hasError: Boolean,
- clearOnUnmount: {
- type: Boolean,
- default: true
- }
},
data() {
return {
@@ -95,11 +91,9 @@ export default {
: this.selectedValues[0];
}
},
- unmounted() { // needed to clear this button's selectedValues if it is removed to keep validation in sync
- if (this.clearOnUnmount) {
- this.checkValue = false;
- this.handleCheckChange();
- }
+ unmounted() { // needed to clear this button's selectedValues if it is removed
+ this.checkValue = false;
+ this.handleCheckChange();
},
methods: {
displayLoader() {
diff --git a/src/ux-components/list-card/list-card.vue b/src/ux-components/list-card/list-card.vue
index de5a1a72f..df79fd07f 100644
--- a/src/ux-components/list-card/list-card.vue
+++ b/src/ux-components/list-card/list-card.vue
@@ -89,10 +89,6 @@ export default {
selectedValues: [Array, String],
modelValue: Object,
hasError: Boolean,
- clearOnUnmount: {
- type: Boolean,
- default: true
- }
},
data() {
return {
@@ -114,11 +110,9 @@ export default {
this.checkValue = this.selectedValues == this.value || this.modelValue == this.value;
}
},
- unmounted() { // needed to clear this button's selectedValues if it is removed to keep validation in sync
- if (this.clearOnUnmount) {
- this.checkValue = false;
- this.handleCheckChange();
- }
+ unmounted() { // needed to clear this button's selectedValues if it is removed
+ this.checkValue = false;
+ this.handleCheckChange();
},
computed: {
getLabelClasses() {