diff --git a/src/common-components/funnel-footer/funnel-footer.spec.js b/src/common-components/funnel-footer/funnel-footer.spec.js index 791cd0961..1c173b6be 100644 --- a/src/common-components/funnel-footer/funnel-footer.spec.js +++ b/src/common-components/funnel-footer/funnel-footer.spec.js @@ -9,29 +9,22 @@ 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(()=> { + + global.document.querySelector = jest.fn().mockImplementation(()=> { return r; }); const wrapper = mount(funnelFooter, { - propsData: { - footer: true - }, }); // Assert const link = wrapper.find("a"); + 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"); }); @@ -64,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 c93501177..7df1b3994 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -1,54 +1,41 @@ 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 72b9c21cb..937109111 100644 --- a/src/common-components/funnel-sub-header/funnel-sub-header.vue +++ b/src/common-components/funnel-sub-header/funnel-sub-header.vue @@ -35,12 +35,16 @@ export default { }, props: { hasBackButton: Boolean, - backButtonAccessibleText: String, - hasSubText: Boolean + backButtonAccessibleText: String }, components: { buttonBack, }, + computed: { + hasSubText(){ + return this.subText.length > 0; + } + }, methods: { clickEvent() { this.$emit("click-event"); diff --git a/src/common-components/vehicle-banner/vehicle-banner.vue b/src/common-components/vehicle-banner/vehicle-banner.vue index 0c164717c..0409c1903 100644 --- a/src/common-components/vehicle-banner/vehicle-banner.vue +++ b/src/common-components/vehicle-banner/vehicle-banner.vue @@ -19,7 +19,6 @@ export default { }, data() { return { - vehicleImageSrc: '', genericVehicleImage: '', carUnmatchedVehicleIcon: '', truckUnmatchedVehicleIcon: '', diff --git a/src/layouts/address-poc/address-poc.vue b/src/layouts/address-poc/address-poc.vue index 1c10e927d..8bb42a659 100644 --- a/src/layouts/address-poc/address-poc.vue +++ b/src/layouts/address-poc/address-poc.vue @@ -5,20 +5,93 @@ -
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+
+
- - + An accurate match may not have have been located. Please verify your address before continuing
+
+
+ An accurate match could not be located. Please re-enter your street address before continuing +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index ed8318673..e20892105 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -48,18 +48,19 @@






@@ -673,19 +674,6 @@ />
-
-
-

Links

-
-
-
-
-

-

-

- -
-

Typography

@@ -925,16 +913,6 @@ />
-
-
-

Funnel Footer

-
-
-
-
- -
-
@@ -948,9 +926,7 @@ import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; import funnelHeader from "@/common-components/funnel-header/funnel-header"; import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-button-horizontal"; import checkbox from "@/ux-components/checkbox/checkbox"; -import buttonQuestion from "@/common-components/button-question/button-question"; import textLink from "@/ux-components/text-link/text-link"; -import funnelFooter from "@/common-components/funnel-footer/funnel-footer"; export default { name: "App", components: { @@ -963,9 +939,7 @@ export default { listButtonHorizontal, checkbox, funnelHeader, - buttonQuestion, - textLink, - funnelFooter + textLink }, data() { return { diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js index 49df756c2..949f4811b 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.spec.js +++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js @@ -1,6 +1,7 @@ // Components import vehicleDamage from "@/layouts/vehicle-damage/vehicle-damage.vue"; import funnelHeader from "@/common-components/funnel-header/funnel-header"; +import funnelFooter from "@/common-components/funnel-footer/funnel-footer"; import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-question/replace-options-question"; @@ -144,7 +145,7 @@ describe("vehicle-damage.vue", () => { describe("vehicle-damage.vue", () => { test("Call invalidation, ResetPartsAndDeps should be called", async () => { - + //Arrange const { wrapper } = setupMocks({}); @@ -221,6 +222,10 @@ function setupMocks({ damageLocationQuestion.methods = { initializeComponent: jest.fn(), + }; + + funnelFooter.methods = { + initializeComponent: jest.fn(), } const mountOptions = getMountOptions(mountOptionsMockData); @@ -252,5 +257,11 @@ function setupMocks({ damageLocationQuestionWrapper.vm.initializeComponent = damageLocationQuestion.methods.initializeComponent; + const funnelFooterWrapper = wrapper.findComponent({ + name: "funnelFooter", + }); + + funnelFooterWrapper.vm.initializeComponent = funnelFooter.methods.initializeComponent; + return { wrapper, apiPromise }; } diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 1261c1f26..71b14ace9 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -1,11 +1,8 @@