chore(checkpoint): save club core backend and pending pos fixes
This commit is contained in:
@@ -79,25 +79,25 @@ describe.skipIf(!hasDb)('F-186 POS checkout and receipts (real PostgreSQL)', ()
|
||||
],
|
||||
payments: [
|
||||
{ methodCode: 'cash', amountCents: 500, tenderedCents: 1000 },
|
||||
{ methodCode: 'card', amountCents: 700 },
|
||||
{ methodCode: 'card', amountCents: 770 },
|
||||
],
|
||||
};
|
||||
|
||||
const result = await useCase.execute(input);
|
||||
|
||||
expect(result.totalCents).toBe(1200);
|
||||
expect(result.totalCents).toBe(1270);
|
||||
expect(result.changeCents).toBe(500);
|
||||
expect(result.receiptNumber).toBe('TPV-000001');
|
||||
expect(result.receipt.items).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ name: 'Producto test', freeItem: false, totalCents: 700 }),
|
||||
expect.objectContaining({ name: 'Producto test', freeItem: false, totalCents: 770, taxCents: 70 }),
|
||||
expect.objectContaining({ name: 'Servicio libre', freeItem: true, totalCents: 500 }),
|
||||
]),
|
||||
);
|
||||
expect(result.receipt.payments).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ methodCode: 'cash', amountCents: 500, changeCents: 500 }),
|
||||
expect.objectContaining({ methodCode: 'card', amountCents: 700 }),
|
||||
expect.objectContaining({ methodCode: 'card', amountCents: 770 }),
|
||||
]),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user