Skip to content

Commit

Permalink
feat(payments-plugin): fixed e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Mar 5, 2024
1 parent ddea675 commit d842837
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,10 @@ describe('Handle pay-later methods', () => {
expect(order.state).toBe('PaymentSettled');
});

it('Should add an unusable Mollie paymentMethod (missing redirectUrl)', async () => {
const { createPaymentMethod } = await adminClient.query<
it('Should fail to add payment method without redirect url', async () => {
let error = ''
try {
const { createPaymentMethod } = await adminClient.query<
CreatePaymentMethodMutation,
CreatePaymentMethodMutationVariables
>(CREATE_PAYMENT_METHOD, {
Expand All @@ -647,6 +649,9 @@ describe('Handle pay-later methods', () => {
],
},
});
expect(createPaymentMethod.code).toBe(mockData.methodCodeBroken);
} catch(e: any) {
error = e.message
}
expect(error).toBe('The argument "redirectUrl" is required');
});
});

0 comments on commit d842837

Please sign in to comment.