From 293c94640723c1a5a3ea2ea8e4d862c8b506725a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 22 Feb 2023 15:02:17 -0500 Subject: [PATCH] Added unit test for rext-block changes --- .../text-block/text-block.spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/digital-components/text-block/text-block.spec.js b/src/digital-components/text-block/text-block.spec.js index 3cd229449..170a91876 100644 --- a/src/digital-components/text-block/text-block.spec.js +++ b/src/digital-components/text-block/text-block.spec.js @@ -10,6 +10,18 @@ describe("modal.vue", () => { expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Text"])); }); + it("Should display the custom text when it is passed in", async () => { + // Act + const wrapper = shallowMount(TextBlock, { + mixins: [mockMixin], + props: { + customText: "customText" + } + }); + + expect(wrapper.html()).toEqual(expect.stringContaining("customText")); + }); + it("Should contain the typeStyle class as defined by the prop", async () => { // Act const wrapper = shallowMount(TextBlock, { @@ -18,6 +30,7 @@ describe("modal.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["typeStyle"])); }); + it("Should contain the justifyText class as defined by the prop", async () => { // Act const wrapper = shallowMount(TextBlock, { @@ -26,6 +39,7 @@ describe("modal.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["justifyText"])); }); + it("Should contain the fontWeight class as defined by the prop", async () => { // Act const wrapper = shallowMount(TextBlock, { @@ -34,6 +48,7 @@ describe("modal.vue", () => { }); expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["fontWeight"])); }); + }); ///////////////