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 Nov 26, 2020
1 parent 6686d94 commit 079a7ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/e2e/order.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import {
GET_ORDER_BY_CODE_WITH_PAYMENTS,
} from './graphql/shop-definitions';
import { assertThrowsWithMessage } from './utils/assert-throws-with-message';
import { addPaymentToOrder, proceedToArrangingPayment } from './utils/test-order-utils';
import { addPaymentToOrder, proceedToArrangingPayment, sortById } from './utils/test-order-utils';

describe('Orders resolver', () => {
const { server, adminClient, shopClient } = createTestEnvironment({
Expand Down Expand Up @@ -747,7 +747,7 @@ describe('Orders resolver', () => {
id: orderId,
});

expect(order!.fulfillments).toEqual([
expect(order!.fulfillments?.sort(sortById)).toEqual([
{ id: f1Id, method: 'Test1', state: 'Delivered', nextStates: ['Cancelled'] },
{ id: f2Id, method: 'Test2', state: 'Cancelled', nextStates: [] },
{ id: f3Id, method: 'Test3', state: 'Delivered', nextStates: ['Cancelled'] },
Expand Down Expand Up @@ -1402,7 +1402,7 @@ describe('Orders resolver', () => {
},
},
);
expect(order!.history.items.map(pick(['type', 'data']))).toEqual([
expect(order!.history.items.sort(sortById).map(pick(['type', 'data']))).toEqual([
{
type: HistoryEntryType.ORDER_STATE_TRANSITION,
data: {
Expand Down

0 comments on commit 079a7ae

Please sign in to comment.