Componentes:
--
- {components.length > 0 && (
- components.map((component) => (
-
-
-
{component.name}
-Marca: {component.brand} | Tipo: {component.type} | Precio: {component.price} € | Stock: {component.stock} ud.
-{component.description}
-
-
- ))
- )}
-
Componentes:
++ No se han encontrado componentes de PC. +
+ )} +Hubo un problema al cargar más componentes. Por favor, pruebe de nuevo.
)} + {components.length > 0 && hasNext && ( + + )}Descubra nuestras últimas novedades:
-
No se han encontrado componentes de PC.
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index a886ba8..21ca187 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -11,6 +11,7 @@
"bootstrap": "^5.3.8",
"isbot": "^5.1.36",
"react": "^19.2.7",
+ "react-aria": "^3.53.1",
"react-bootstrap": "^2.10.10",
"react-bootstrap-icons": "^1.11.6",
"react-dom": "^19.2.7",
@@ -545,18 +546,18 @@
}
},
"node_modules/@internationalized/date": {
- "version": "3.12.3",
- "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.3.tgz",
- "integrity": "sha512-fuLX+3ZKLsxI73y8b01EG/WjHb6gE6weCqlfawPO27kBWGMh9G1yH6Csv1uU7/cac9H2GHmOMt6CjmuQ1aia4Q==",
+ "version": "3.12.4",
+ "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.4.tgz",
+ "integrity": "sha512-M1dEn4c1U1HsSlaVR8upZtSqvXrTkHDfv18H01uCSJyjVLDxnBR38v/fMxecmlwXKR4i9HeZcmgQAPE6A+aGJQ==",
"license": "Apache-2.0",
"dependencies": {
"@swc/helpers": "^0.5.0"
}
},
"node_modules/@internationalized/number": {
- "version": "3.6.7",
- "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.7.tgz",
- "integrity": "sha512-3ji1fcrT+FPAK86UqEhB/psHixYo6niWPJtt7+qRaYFynt/BaJG8GhAPimtWUpEiVSTq8ZM8L5psMxGquiB/Vg==",
+ "version": "3.6.9",
+ "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.9.tgz",
+ "integrity": "sha512-GgWy2caO/+hV9sT/oCTWGHvbjmJMPT9kkXzoKRLnkEq7adghhR7UprhvY9sXrKfrp3NcDfhF6QQHXR1KfQbB8g==",
"license": "Apache-2.0",
"dependencies": {
"@swc/helpers": "^0.5.0"
@@ -797,9 +798,9 @@
}
},
"node_modules/@react-types/shared": {
- "version": "3.36.1",
- "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.36.1.tgz",
- "integrity": "sha512-AzsuD9OfxTOZMMvTRhlN3oHBwOmFN7tDh27LzqmHt4+uOgPhJT7ZM7/kVs/8/o0WxayMUIk3hBmCFRHv1FUoag==",
+ "version": "3.37.0",
+ "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.37.0.tgz",
+ "integrity": "sha512-VNlZuifu4tHdxWPfHvoMfKsHA9kVTCGkduv5vKVTdinm8wHFJNhyVB5RzIMiRFj0q3RKoCbP68u2zaoBSiFueg==",
"license": "Apache-2.0",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
@@ -3565,19 +3566,19 @@
}
},
"node_modules/react-aria": {
- "version": "3.51.0",
- "resolved": "https://registry.npmjs.org/react-aria/-/react-aria-3.51.0.tgz",
- "integrity": "sha512-AyWLw0XR38cFPwBu/ErgGaVrc5dupLEKmRlMXTGvFKOtbaGRQ2+yQJkjVhpdHhoRhU4+G+tJDFeHDTS8tK3bfQ==",
+ "version": "3.53.1",
+ "resolved": "https://registry.npmjs.org/react-aria/-/react-aria-3.53.1.tgz",
+ "integrity": "sha512-dikisyOjJd3D2fFrIDWmVWzqiLz5B86GzZv1zxs7xI4dVc0JIz/1Wa52I20gYvVL2WXeFXlygYsle/QcOMhtcg==",
"license": "Apache-2.0",
"dependencies": {
- "@internationalized/date": "^3.12.3",
- "@internationalized/number": "^3.6.7",
+ "@internationalized/date": "^3.12.4",
+ "@internationalized/number": "^3.6.9",
"@internationalized/string": "^3.2.10",
- "@react-types/shared": "^3.36.1",
+ "@react-types/shared": "^3.37.0",
"@swc/helpers": "^0.5.0",
"aria-hidden": "^1.2.3",
"clsx": "^2.0.0",
- "react-stately": "3.49.0",
+ "react-stately": "3.51.0",
"use-sync-external-store": "^1.6.0"
},
"peerDependencies": {
@@ -3686,15 +3687,15 @@
}
},
"node_modules/react-stately": {
- "version": "3.49.0",
- "resolved": "https://registry.npmjs.org/react-stately/-/react-stately-3.49.0.tgz",
- "integrity": "sha512-13iNq2KzBrRAzxRc+n53hgROfIistiYY/sPtIhCw1qUB7/kmo+X1xEU2uiS5zcCIrc55AUPwoHqOIIpKWSwB9A==",
+ "version": "3.51.0",
+ "resolved": "https://registry.npmjs.org/react-stately/-/react-stately-3.51.0.tgz",
+ "integrity": "sha512-YJcmkAXu2XOQP97hO/qz/cC3qv9kni3oVhwBlxWr358BHePJUpY15XwL3YSRMKxYt4EkslPqAz11JRirMfANGw==",
"license": "Apache-2.0",
"dependencies": {
- "@internationalized/date": "^3.12.3",
- "@internationalized/number": "^3.6.7",
+ "@internationalized/date": "^3.12.4",
+ "@internationalized/number": "^3.6.9",
"@internationalized/string": "^3.2.10",
- "@react-types/shared": "^3.36.1",
+ "@react-types/shared": "^3.37.0",
"@swc/helpers": "^0.5.0",
"use-sync-external-store": "^1.6.0"
},
diff --git a/frontend/package.json b/frontend/package.json
index 151c8e2..3a07f4c 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -19,6 +19,7 @@
"bootstrap": "^5.3.8",
"isbot": "^5.1.36",
"react": "^19.2.7",
+ "react-aria": "^3.53.1",
"react-bootstrap": "^2.10.10",
"react-bootstrap-icons": "^1.11.6",
"react-dom": "^19.2.7",
diff --git a/frontend/tests/integration/Components.integration.test.tsx b/frontend/tests/integration/Components.integration.test.tsx
index 9148c37..d5ad5de 100644
--- a/frontend/tests/integration/Components.integration.test.tsx
+++ b/frontend/tests/integration/Components.integration.test.tsx
@@ -1,12 +1,13 @@
import { render, screen, waitFor } from "@testing-library/react";
-import { describe, it, expect } from "vitest";
+import { describe, it, expect, vi } from "vitest";
import "@testing-library/jest-dom";
import userEvent from "@testing-library/user-event";
+import { MemoryRouter } from "react-router";
import Components, { clientLoader } from "~/routes/components";
describe("ComponentsPageIntegration", () => {
- it("check communication between frontend and backend", async () => {
+ it("renders initial components and checks load more functionality", async () => {
const user = userEvent.setup();
@@ -20,18 +21,20 @@ describe("ComponentsPageIntegration", () => {
} as any);
render(
-