diff --git a/src/common-components/funnel-footer/funnel-footer.spec.js b/src/common-components/funnel-footer/funnel-footer.spec.js index a4c127a3e..b6833ef7e 100644 --- a/src/common-components/funnel-footer/funnel-footer.spec.js +++ b/src/common-components/funnel-footer/funnel-footer.spec.js @@ -9,10 +9,7 @@ describe("funnel-footer.vue", () => { const r = { test:"testing", clientHeight: 10, - classList: { - add: jest.fn(() => ''), - remove: jest.fn() - }, + offsetHeight: 24, }; global.document.getElementById = jest.fn().mockImplementation(()=> { @@ -27,10 +24,7 @@ describe("funnel-footer.vue", () => { console.log(wrapper.html()); // Expect - expect(link.attributes('class')).toContain("footer-link"); - expect(global.document.getElementById).toBeCalled(); - expect(r.classList.add).toBeCalledWith("justify-content-end"); - expect(r.classList.remove).toBeCalledWith("justify-content-start"); + expect(link.attributes('class')).toContain("footer"); }); @@ -63,32 +57,4 @@ describe("funnel-footer.vue", () => { expect(input.attributes("class")).toContain("btn-primary"); }); - it("Should return class justify-content-end if paddingHeight < 80px", async () => { - - global.document.getElementById = jest.fn().mockImplementation(()=> { - return { - test:"testing", - clientHeight: 10, - classList: { - add: jest.fn(), - remove: jest.fn() - } - } - }); - - // Act - const wrapper = mount(funnelFooter, { - propsData: { - footer: true - }, - }); - const infoBox = document.getElementById('infoBox'); - // Assert - const stacked = wrapper.find("#stacked"); - wrapper.vm.paddingHeight = 100; - - // Expect - expect(stacked.attributes('class')).toContain("justify-content-end"); - }); - }); diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 56e483b6d..424e524fc 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -16,10 +16,10 @@