Skip to content

Commit

Permalink
test(core): Fix e2e test for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed May 11, 2021
1 parent 4fc749d commit 1fb3620
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/core/e2e/order.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,11 @@ describe('Orders resolver', () => {

expect(order.state).toBe('PaymentSettled');
expect(order.payments?.length).toBe(2);
expect(omit(order.payments![1], ['id'])).toEqual({
expect(
omit(order.payments?.find(p => p.method === singleStageRefundablePaymentMethod.code)!, [
'id',
]),
).toEqual({
amount: orderTotalWithTax - PARTIAL_PAYMENT_AMOUNT,
metadata: {},
method: singleStageRefundablePaymentMethod.code,
Expand Down Expand Up @@ -2042,7 +2046,7 @@ describe('Orders resolver', () => {
SettlePayment.Mutation,
SettlePayment.Variables
>(SETTLE_PAYMENT, {
id: order.payments![0].id,
id: order.payments!.find(p => p.method === partialPaymentMethod.code)!.id,
});

paymentGuard.assertSuccess(settlePayment);
Expand Down

0 comments on commit 1fb3620

Please sign in to comment.