diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index b535bbcdb..2f6782a40 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 @@
@@ -108,18 +105,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 da252308a..b84e2fbfa 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -24,10 +24,9 @@ />
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]" >

{{ alertHeadline }}

- -

- {{ para }} -

-
-

{{ alertCopy }}

+

{{ alertCopy }}