Added unit test for rext-block changes

This commit is contained in:
Leah Schumann 2023-02-22 15:02:17 -05:00
parent 8af9381771
commit 293c946407

View file

@ -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"]));
});
});
///////////////