From c4e4e939a2ece1d827be7f19acdd1734c691292a Mon Sep 17 00:00:00 2001 From: Kellyarias02 Date: Sat, 30 Aug 2025 11:07:36 -0500 Subject: [PATCH] Refactor: to add test about as variants of polos and stickers --- src/lib/utils.tests.ts | 2 + src/routes/product/index.tsx | 2 +- src/routes/product/product.test.tsx | 58 +++++++++++++++++++++++++++- src/services/product.service.test.ts | 18 +++++++-- 4 files changed, 75 insertions(+), 5 deletions(-) diff --git a/src/lib/utils.tests.ts b/src/lib/utils.tests.ts index 1526f23..1ff1527 100644 --- a/src/lib/utils.tests.ts +++ b/src/lib/utils.tests.ts @@ -63,6 +63,8 @@ export const createTestProduct = (overrides?: Partial): Product => ({ categoryId: 1, isOnSale: false, features: ["Feature 1", "Feature 2"], + variants: [], + stickersVariants: [], createdAt: new Date(), updatedAt: new Date(), ...overrides, diff --git a/src/routes/product/index.tsx b/src/routes/product/index.tsx index 106efe2..791d2ed 100644 --- a/src/routes/product/index.tsx +++ b/src/routes/product/index.tsx @@ -121,7 +121,7 @@ export default function Product({ loaderData }: Route.ComponentProps) { onSelect={setSelectedMeasure} /> )} - {/* Botón de agregar al carrito */} +