diff --git a/src/common-components/funnel-sub-header/funnel-sub-header.spec.js b/src/common-components/funnel-sub-header/funnel-sub-header.spec.js index e2b5c4d28..417081350 100644 --- a/src/common-components/funnel-sub-header/funnel-sub-header.spec.js +++ b/src/common-components/funnel-sub-header/funnel-sub-header.spec.js @@ -14,4 +14,19 @@ describe("FunnelSubHeader.vue", () => { expect(wrapper.find("h2").text()).toContain("FunnelSubHeader Content"); wrapper.unmount(); }); + it("Should render the button inside of header if backButtonAction provided", () => { + // Act + const testFn = () => {} + const wrapper = shallowMount(FunnelSubHeader, { + propsData: { + text: "FunnelSubHeader Content", + hasBackButton: true, + backButtonAction: testFn, + }, + }); + + // Assert + expect(wrapper.find("h2").find("button").text()).toContain("FunnelSubHeader Content"); + wrapper.unmount(); + }); }); diff --git a/src/common-components/funnel-sub-header/funnel-sub-header.vue b/src/common-components/funnel-sub-header/funnel-sub-header.vue index 5e3bcc7e3..d05a9ea4d 100644 --- a/src/common-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/common-components/funnel-sub-header/funnel-sub-header.vue @@ -1,7 +1,14 @@