Skip to content

Fix cart, product and checkout #565

Fix cart, product and checkout

Fix cart, product and checkout #565

Triggered via pull request July 25, 2024 18:36
Status Failure
Total duration 51s
Artifacts

application.yml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 1 warning
src/__test__/Checkout/checkout.test.tsx > checkoutSlice > should handle initial state: src/__test__/Checkout/checkout.test.tsx#L29
AssertionError: expected { checkout: { id: -1, …(11) }, …(3) } to deeply equal { checkout: { id: 31, …(11) }, …(3) } - Expected + Received Object { "checkout": Object { "country": "US", "couponCode": "", "createdAt": "2024-07-22T01:48:05.301Z", "deliveryInfo": Object { "address": "123 Main St", "city": "Anytown", "zip": "12345", }, - "id": 31, + "id": -1, "orderDetails": Array [ Object { "id": 41, "price": 160, "quantity": 2, }, ], "paid": true, "paymentInfo": null, "status": "Pending", - "totalAmount": 160, + "totalAmount": 0, "trackingNumber": "Tr280585", "updatedAt": "2024-07-22T11:01:20.291Z", }, "error": null, "loading": false, "paying": false, } ❯ src/__test__/Checkout/checkout.test.tsx:29:39
src/__test__/Checkout/checkout.test.tsx > checkoutSlice > getOrders updates state on fulfilled: src/__test__/Checkout/checkout.test.tsx#L115
AssertionError: expected { id: -1, totalAmount: +0, …(10) } to deeply equal ObjectContaining{…} - Expected + Received - ObjectContaining { + Object { "country": "US", "couponCode": "", "createdAt": "2024-07-22T01:48:05.301Z", "deliveryInfo": Object { "address": "123 Main St", "city": "Anytown", "zip": "12345", }, - "id": 31, + "id": -1, "orderDetails": Array [ Object { "id": 41, "price": 160, "quantity": 2, }, ], "paid": true, "paymentInfo": null, "status": "Pending", - "totalAmount": 160, + "totalAmount": 0, "trackingNumber": "Tr280585", "updatedAt": "2024-07-22T11:01:20.291Z", } ❯ src/__test__/Checkout/checkout.test.tsx:115:48
src/__test__/home/productCard.test.tsx > ProductCard Component > renders the ProductCard component with product details: src/__test__/home/productCard.test.tsx#L104
AssertionError: expected 2 to be 1 // Object.is equality - Expected + Received - 1 + 2 ❯ src/__test__/home/productCard.test.tsx:104:30
build (20.x)
Process completed with exit code 1.
build (20.x)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/