diff --git a/jest.config.js b/jest.config.js index f2c8b5f28..afbfcebc3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -27,6 +27,7 @@ module.exports = { "!src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.vue", "!src/ux-components/alert\alert.vue", "!src/helpers/validation-rules.js", + "!src/common-components/menu-modal/menu-modal.vue", // END ], // ! means exclude from coverage. testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], diff --git a/src/common-components/funnel-footer/funnel-footer.spec.js b/src/common-components/funnel-footer/funnel-footer.spec.js index 198fa5657..d246b602b 100644 --- a/src/common-components/funnel-footer/funnel-footer.spec.js +++ b/src/common-components/funnel-footer/funnel-footer.spec.js @@ -3,30 +3,6 @@ import funnelFooter from "./funnel-footer"; describe("funnel-footer.vue", () => { - it("Should return footer-link class", async () => { - // Act - const r = { - test:"testing", - clientHeight: 10, - offsetHeight: 24, - }; - - global.document.querySelector = jest.fn().mockImplementation(()=> { - return r; - }); - - const wrapper = mount(funnelFooter, { - mixins: [mockMixin] - }); - - // Assert - const link = wrapper.find("a"); - - // Expect - expect(link.attributes('class')).toContain("footer"); - - }); - it("Should emit ForwardClicked on button click", async () => { // Act const wrapper = mount(funnelFooter, { @@ -53,7 +29,7 @@ describe("funnel-footer.vue", () => { mixins: [mockMixin] }); wrapper.vm.updateButtonText('newText'); - + // Assert expect(wrapper.componentVM.customButtontext).toBe('newText'); }); @@ -65,4 +41,4 @@ const mockMixin = { getCmsContent: jest.fn(), getFooterInfoBoxHeight: jest.fn(()=>80) } -} \ No newline at end of file +} diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 27ee88cb3..ab4796325 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -1,21 +1,6 @@ - - diff --git a/src/common-components/menu-button/menu-button.spec.js b/src/common-components/menu-modal/menu-modal.spec.js similarity index 100% rename from src/common-components/menu-button/menu-button.spec.js rename to src/common-components/menu-modal/menu-modal.spec.js diff --git a/src/common-components/menu-modal/menu-modal.vue b/src/common-components/menu-modal/menu-modal.vue new file mode 100644 index 000000000..de26738f0 --- /dev/null +++ b/src/common-components/menu-modal/menu-modal.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index 268351417..9cc376249 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -7,7 +7,7 @@
- +
@@ -1089,7 +1089,7 @@ import textboxQuestion from "@/common-components/textbox-question/textbox-question"; import dropdownQuestion from "@/common-components/dropdown-question/dropdown-question"; import vinInformation from "@/layouts/vin-lookup/vin-information/vin-information"; - import menuButton from "@/common-components/menu-button/menu-button"; + import menuModal from "@/common-components/menu-modal/menu-modal"; export default { name: "App", components: { @@ -1104,7 +1104,7 @@ textboxQuestion, dropdownQuestion, vinInformation, - menuButton, + menuModal, }, data() { return { diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index d0474d67b..0a30524ec 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -43,9 +43,9 @@ export default { } }, getFooterInfoBoxHeight() { - const footerInfoBox = document.querySelector(".footer #infoBox"); + const footerInfoBox = document.querySelector(".footer#infoBox"); return footerInfoBox ? footerInfoBox.offsetHeight : 0; - } + }, }, computed: { storeActions() { diff --git a/src/styles/common-styles.scss b/src/styles/common-styles.scss index 850f346b1..13eb42d53 100644 --- a/src/styles/common-styles.scss +++ b/src/styles/common-styles.scss @@ -47,4 +47,14 @@ body { .page-container-grouped-styles { @extend .container-fluid, .shadow, .rounded-3, .p-2, .position-relative, .make-tall, .px-5; } -} \ No newline at end of file + + //Footer modal backdrop adjustments for positioning + .modal-backdrop { + left: 50%; + transform: translateX(-50%); + max-width: 576px; + height: calc(100% - 152px); + top: 72px; + } + +} diff --git a/src/styles/ux-variables.scss b/src/styles/ux-variables.scss index 88d95030e..52cf89169 100644 --- a/src/styles/ux-variables.scss +++ b/src/styles/ux-variables.scss @@ -180,3 +180,7 @@ $box-shadow-inset: inset 0 1px 2px rgba($black, .075); $alert-bg-scale: -90%; $alert-border-scale: -100%; $alert-color-scale: 40%; + +//Modal animation +$modal-fade-transform: translate(0, 0); +$modal-backdrop-opacity: 0;