diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js index c9f67bca1..65c3b9a11 100644 --- a/src/layouts/payment-method/payment-method.spec.js +++ b/src/layouts/payment-method/payment-method.spec.js @@ -113,5 +113,7 @@ function setupMocks() { const wrapper = shallowMount(customerDetails, mountOptions); + wrapper.vm.$refs.loadingModal.showModal = jest.fn(); + return { wrapper }; } diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 5a595a99b..f4972a054 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -525,6 +525,8 @@ export default { async forwardButtonAction() { this.forwardClicked = true; + this.$refs.loadingModal.showModal(); + await this.dispatchStoreAction( storeActions.SAVE_PAYMENT_METHOD_CHOICE, this.paymentMethod, @@ -575,7 +577,6 @@ export default { } }, async setupPia() { - this.$refs.loadingModal.showModal(); // we need a work order number for pia so we can pass it to safeliteHop. // this will create one in delete substatus. try {