From 307e7d2fbb7092ebebbdf2a1c8c912b170a1c8b5 Mon Sep 17 00:00:00 2001
From: saumyaChaturvedi123
<108388239+saumyaChaturvedi123@users.noreply.github.com>
Date: Wed, 5 Apr 2023 17:20:57 +0530
Subject: [PATCH 1/2] SSR-365
Steering text to appear for state MA
---
.../steering-text/steering-text.spec.js | 45 +++++++++++++++++++
.../steering-text/steering-text.vue | 37 +++++++++++++++
.../coverage-statement/coverage-statement.vue | 9 ++--
3 files changed, 88 insertions(+), 3 deletions(-)
create mode 100644 src/iss-components/steering-text/steering-text.spec.js
create mode 100644 src/iss-components/steering-text/steering-text.vue
diff --git a/src/iss-components/steering-text/steering-text.spec.js b/src/iss-components/steering-text/steering-text.spec.js
new file mode 100644
index 00000000..bcce201f
--- /dev/null
+++ b/src/iss-components/steering-text/steering-text.spec.js
@@ -0,0 +1,45 @@
+import { shallowMount } from "@vue/test-utils";
+import steeringTextModal from "./steering-text";
+import { createApp } from 'vue';
+import { createPinia } from "pinia";
+import App from '@/App.vue';
+
+describe("steering-text.vue", () => {
+ test("Should display steering text from CMS for state MA", async () => {
+ // Act
+
+ const wrapper = shallowMount(steeringTextModal, {
+ mixins: [mockMixin],
+ props: {
+ cmsWidgetName: "MASteeringTextWidget",
+ },
+ attachTo: document.body,
+ });
+ expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["BodyText"]));
+ });
+
+
+});
+
+const vueApp = createApp(App);
+const pinia = createPinia();
+vueApp.use(pinia);
+///////////////
+// Constants //
+///////////////
+
+const mockMixin = {
+ methods: {
+ getCmsContent: jest.fn((widgetName, cmsFieldName) => {
+ return mockCmsContent[cmsFieldName];
+ }),
+ },
+};
+
+
+const mockCmsContent = {
+ BodyText: "MASteeringText",
+
+};
+
+
diff --git a/src/iss-components/steering-text/steering-text.vue b/src/iss-components/steering-text/steering-text.vue
new file mode 100644
index 00000000..1906c3f1
--- /dev/null
+++ b/src/iss-components/steering-text/steering-text.vue
@@ -0,0 +1,37 @@
+
+