Added unit test for rext-block changes
This commit is contained in:
parent
8af9381771
commit
293c946407
1 changed files with 15 additions and 0 deletions
|
|
@ -10,6 +10,18 @@ describe("modal.vue", () => {
|
||||||
expect(wrapper.html()).toEqual(expect.stringContaining(mockCmsContent["Text"]));
|
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 () => {
|
it("Should contain the typeStyle class as defined by the prop", async () => {
|
||||||
// Act
|
// Act
|
||||||
const wrapper = shallowMount(TextBlock, {
|
const wrapper = shallowMount(TextBlock, {
|
||||||
|
|
@ -18,6 +30,7 @@ describe("modal.vue", () => {
|
||||||
});
|
});
|
||||||
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["typeStyle"]));
|
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["typeStyle"]));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should contain the justifyText class as defined by the prop", async () => {
|
it("Should contain the justifyText class as defined by the prop", async () => {
|
||||||
// Act
|
// Act
|
||||||
const wrapper = shallowMount(TextBlock, {
|
const wrapper = shallowMount(TextBlock, {
|
||||||
|
|
@ -26,6 +39,7 @@ describe("modal.vue", () => {
|
||||||
});
|
});
|
||||||
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["justifyText"]));
|
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["justifyText"]));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should contain the fontWeight class as defined by the prop", async () => {
|
it("Should contain the fontWeight class as defined by the prop", async () => {
|
||||||
// Act
|
// Act
|
||||||
const wrapper = shallowMount(TextBlock, {
|
const wrapper = shallowMount(TextBlock, {
|
||||||
|
|
@ -34,6 +48,7 @@ describe("modal.vue", () => {
|
||||||
});
|
});
|
||||||
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["fontWeight"]));
|
expect(wrapper.html()).toEqual(expect.stringContaining(mockProps["fontWeight"]));
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue