diff --git a/jest.config.js b/jest.config.js index 633a99e67..14d2d27d3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,6 +14,9 @@ module.exports = { "!src/helpers/unit-test-helper.js", "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/reveal/**/*.vue", + "!src/layouts/payment-method/**/*.vue", + "!src/fmg-components/cart/**/*.vue", + "!src/fmg-components/add-vaps-modal-buttons/**/*.vue", "!src/ux-components/text-link/**/*.vue", "!src/layouts/vin-lookup/**/*.vue", //Temporary for Quote page testing "!src/common-components/funnel-header/menu-modal/**/*.vue", diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 9636d1d25..ffbb8fd79 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -197,6 +197,12 @@ export default { classes += "flex-column"; } break; + case "addVapsButton": + classes = "row g-4 justify-content-center mb-2"; + if (this.isWide) { + classes += " flex-column"; + } + break; case "radio": classes = "ui-radio d-flex"; break; diff --git a/src/fmg-components/add-vaps-modal-buttons/add-vaps-button/add-vaps-button.vue b/src/fmg-components/add-vaps-modal-buttons/add-vaps-button/add-vaps-button.vue new file mode 100644 index 000000000..65f4da594 --- /dev/null +++ b/src/fmg-components/add-vaps-modal-buttons/add-vaps-button/add-vaps-button.vue @@ -0,0 +1,218 @@ + + + + + diff --git a/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue new file mode 100644 index 000000000..67ec8861b --- /dev/null +++ b/src/fmg-components/add-vaps-modal-buttons/add-vaps-modal-buttons.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue new file mode 100644 index 000000000..2384eb917 --- /dev/null +++ b/src/fmg-components/cart/cart.vue @@ -0,0 +1,351 @@ + + + + + diff --git a/src/helpers/service-package-helper.js b/src/helpers/service-package-helper.js index babdbfe7e..089e2e596 100644 --- a/src/helpers/service-package-helper.js +++ b/src/helpers/service-package-helper.js @@ -11,7 +11,6 @@ export function findLineItemsWithPartType(typeToFind, itemsToSearch) { const partTypeMatches = itemsToSearch?.filter( (lineItem) => lineItem.partType.toUpperCase() === typeToFind.toUpperCase() ); - return partTypeMatches; } diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js index e657a9258..37c8c3236 100644 --- a/src/layouts/payment-method/payment-method.spec.js +++ b/src/layouts/payment-method/payment-method.spec.js @@ -4,6 +4,7 @@ import customerDetails from "@/layouts/payment-method/payment-method.vue"; // Supporting Files import { shallowMount } from "@vue/test-utils"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; +import store from "@/store"; // Mock our module for promises. jest.mock("@/helpers/layout-helper.js", () => ({ @@ -41,15 +42,22 @@ describe("payment-method.vue", () => { }); function setupMocks() { + store.getters = { + damage: {}, + lineItems: [], + }; + const wrapper = shallowMount( customerDetails, getMountOptions({ router: { - navigate: jest.fn(), navigate: jest.fn(), navigateWithSaving: jest.fn(), navigateWithoutSaving: jest.fn(), }, + store: { + getters: store.getters, + }, }) ); diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 90c3d0136..7aadf9174 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -1,17 +1,39 @@