diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue
index 1f99a38bc..a6d181ddd 100644
--- a/src/layouts/license-plate-lookup/license-plate-lookup.vue
+++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue
@@ -26,24 +26,21 @@
@@ -107,18 +104,6 @@ export default {
// Call the "next" function to complete the transition to this page.
next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
- vm.noServiceZipWidget = {
- headline: resultMap.cmsContent.NoServiceZipWidget.HeadlineText,
- copy: resultMap.cmsContent.NoServiceZipWidget.BodyText,
- };
- vm.noMatchAlertWidget = {
- headline: resultMap.cmsContent.NoMatchAlertWidget.HeadlineText,
- copy: resultMap.cmsContent.NoMatchAlertWidget.BodyText
- };
- vm.matchedDifferentVehicleAlertWidget = {
- headline: resultMap.cmsContent.MatchedDifferentVehicleAlertWidget.HeadlineText,
- copy: resultMap.cmsContent.MatchedDifferentVehicleAlertWidget.BodyText
- };
});
},
props: {
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index 893e7d572..b84e2fbfa 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -24,10 +24,9 @@
/>
@@ -99,9 +97,9 @@ export default ({
},
methods: {
- initializeComponent(
- windshieldAvailableReplacementOptions){
+ initializeComponent(windshieldAvailableReplacementOptions){
this.windshieldAvailableReplacementOptions = windshieldAvailableReplacementOptions;
+ this.$refs.replaceOptionsQuestion.initializeComponent(windshieldAvailableReplacementOptions);
},
getWindshieldOptions(selectedWindshieldDamageType, selectedWindshieldChipCount, selectedWindshieldReplaceOptions){
// ONLY UPDATE THE NEW VALUE IF IT IS TRUTHY (NOT NULL)
diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue
index d4c3e164a..25291d218 100644
--- a/src/layouts/vehicle-parts/vehicle-parts.vue
+++ b/src/layouts/vehicle-parts/vehicle-parts.vue
@@ -9,8 +9,7 @@
@@ -74,13 +73,6 @@ export default {
FeatureQuestionWidget: resultMap.cmsContent.FeatureQuestionWidget,
})
);
-
- // Set alertData for the page alert. These use props so we don't call
- // initializeComponent here.
- vm.alertWidgetData = {
- copy: resultMap.cmsContent.AlertWidget.BodyText,
- headline: resultMap.cmsContent.AlertWidget.HeadlineText,
- };
});
},
data() {
diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js
index be6dc8df7..8072f8d73 100644
--- a/src/ux-components/alert/alert.spec.js
+++ b/src/ux-components/alert/alert.spec.js
@@ -3,28 +3,40 @@ import alert from "./alert";
describe("alert.vue", () => {
- it("Should set isMultiParagraph to true if alertCopy is an array of strings", async () => {
+ it("Should add class 'alert-dismissible' if isDismissible is true", async () => {
// Arrange
const wrapper = shallowMount(alert, {
propsData: {
- alertCopy: ["one", "two"]
+ isDismissible: true
},
+ mixins: [mockMixin]
});
+ const wrapperDiv = wrapper.find('div');
+
// Assert
- expect(wrapper.vm.isMultiParagraph).toBe(true);
+ expect(wrapperDiv.classes()).toContain('alert-dismissible')
});
- it("Should set isMultiParagraph to false if alertCopy is a single string", async () => {
+ it("Should add specified alert class", async () => {
// Arrange
const wrapper = shallowMount(alert, {
propsData: {
- alertCopy: "three"
+ alertClass: 'warning'
},
+ mixins: [mockMixin]
});
+ const wrapperDiv = wrapper.find('div');
+
// Assert
- expect(wrapper.vm.isMultiParagraph).toBe(false);
+ expect(wrapperDiv.classes()).toContain('warning')
});
});
+
+const mockMixin = {
+ methods: {
+ getCmsContent: jest.fn()
+ }
+}
\ No newline at end of file
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index 5b27f385a..9b76789f1 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -5,12 +5,7 @@
:class="[isDismissible ? 'alert-dismissible' : '', this.alertClass]"
>