chore(checkpoint): save club core backend and pending pos fixes

This commit is contained in:
Deploy
2026-08-26 17:58:45 +02:00
parent cf3c906ed2
commit 49dfd00406
44 changed files with 2241 additions and 219 deletions

View File

@@ -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 }),
]),
);