diff --git a/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.spec.js b/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.spec.js index ec29f8cc..8e95131d 100644 --- a/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.spec.js +++ b/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.spec.js @@ -27,13 +27,20 @@ function generateDefaultProps() { buttonLabel: testConstants.content.noInline, altText: testConstants.content.noInline, groupName: 'payment-method', - value: testConstants.names.A, - buttonImage: testConstants.images.A + value: testConstants.names.A }; } -function setupMocks(customMountOptions) { - const mountOptions = getMountOptions(customMountOptions); +function setupMocks(initialData = {}) { + const mountOptions = getMountOptions({ + router: { + navigate: jest.fn() + } + }); + + mountOptions.data = () => ( + initialData + ); const mockMixin = { methods: { @@ -58,7 +65,8 @@ describe('Payment Method Question', () => { // Arrange const props = generateDefaultProps(); const { wrapper } = setupMocks({ - propsData: props + propsData: props, + hasImage: true }); // Act