From ff4562f4797dcbee38b65a59dba5a850d369128c Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Sun, 5 Jun 2022 15:25:13 -0300 Subject: [PATCH 01/25] =?UTF-8?q?fix:=20Se=20agreg=C3=B3=20la=20traducci?= =?UTF-8?q?=C3=B3n=20de=20la=20cateogria=20del=20elemento=20de=20ingles=20?= =?UTF-8?q?a=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_product-card.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/_product-card.html b/src/views/_product-card.html index f3126b5..42da919 100644 --- a/src/views/_product-card.html +++ b/src/views/_product-card.html @@ -11,7 +11,13 @@
{{ product.name }}

- {{ product.type }} + + {% if product.type == 'home' %} + Hogar + {% elif product.type == 'electronics'%} + Electrónicos + {% endif %} +

$ {{ product.price }}

From c540dfba6db7e5dd5dfa7e031b017c5e9faf025b Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Sun, 5 Jun 2022 15:30:28 -0300 Subject: [PATCH 02/25] =?UTF-8?q?fix:=20Se=20cambi=C3=B3=20l=C3=B3gica=20d?= =?UTF-8?q?el=20test=20unitario=20acorde=20a=20los=20cambios=20del=20fron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/ui/product-card.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/ui/product-card.spec.js b/tests/unit/ui/product-card.spec.js index 666b300..1a6b996 100644 --- a/tests/unit/ui/product-card.spec.js +++ b/tests/unit/ui/product-card.spec.js @@ -41,7 +41,7 @@ describe('Tarjeta de producto', () => { }); document.body.innerHTML = html; - expect(getByText(document.body, 'home')).toBeVisible(); + expect(getByText(document.body, 'Hogar')).toBeVisible(); }); test('Deberia tener el precio del producto', async () => { From d3e1dc2862d28d97ce0244acea01f1ba891aee7f Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Sun, 5 Jun 2022 20:33:32 -0300 Subject: [PATCH 03/25] =?UTF-8?q?feat:=20Se=20agreg=C3=B3=20l=C3=B3gica=20?= =?UTF-8?q?para=20notificar=20si=20el=20carrito=20est=C3=A1=20vac=C3=ADo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cart.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/cart.html b/src/views/cart.html index 2c70a21..36f31e3 100644 --- a/src/views/cart.html +++ b/src/views/cart.html @@ -6,12 +6,17 @@
{% for product in products %} {{ productCard.productCard(product) }} - {% endfor %} + {% endfor %}
+ +{% if (products.length == 0)%} +

No posee productos en el carritos

+{% else %}
Total $ {{ cart.total }}
+{% endif %} {% endblock %} From b43085fd8a149238d9935dbb90a2e34710389b16 Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Sun, 5 Jun 2022 20:45:57 -0300 Subject: [PATCH 04/25] =?UTF-8?q?feat:=20creaci=C3=B3n=20del=20footer=20co?= =?UTF-8?q?n=20los=20datos=20de=20contacto=20en=20la=20p=C3=A1gina=20princ?= =?UTF-8?q?ipal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/home.html b/src/views/home.html index 83ee750..5f6d1a9 100644 --- a/src/views/home.html +++ b/src/views/home.html @@ -16,4 +16,14 @@ _pagination.pagination(pagination.totalPages, pagination.currentPage) }} +
+
+
+ Teléfono: 221 624 2881
+ Dirección: Camino Parque Centenario & Calle 507, La Plata, Provincia de Buenos Aires
+ shopp@gmail.com
+ +
+
+
{% endblock %} From 0784076b8d95da6a53ac812be08ea55dfa5ff259 Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Mon, 6 Jun 2022 16:57:25 -0300 Subject: [PATCH 05/25] =?UTF-8?q?fix:=20se=20modific=C3=B3=20la=20estructu?= =?UTF-8?q?ra=20del=20footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/home.html b/src/views/home.html index 5f6d1a9..971bb4c 100644 --- a/src/views/home.html +++ b/src/views/home.html @@ -17,13 +17,18 @@ }}
-
-
- Teléfono: 221 624 2881
- Dirección: Camino Parque Centenario & Calle 507, La Plata, Provincia de Buenos Aires
- shopp@gmail.com
- -
-
+
+ +
+
+
+
{% endblock %} From e5aa645988e9fe67f4171558fd2864a92dd5efe2 Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Mon, 6 Jun 2022 16:58:29 -0300 Subject: [PATCH 06/25] feat: se agregaron estilos para el footer --- src/public/css/style.css | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/public/css/style.css b/src/public/css/style.css index 0a86094..0f5e509 100644 --- a/src/public/css/style.css +++ b/src/public/css/style.css @@ -25,3 +25,40 @@ body { list-style: none; display: flex; } + +footer{ + width: 100%; + padding: 50px 0px; +} + +.container_footer{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: 1200px; + margin: auto; + margin-top: 10px; +} + +.box__footer{ + display: flex; + flex-direction: column; + padding: 40px; + +} + +.box__footer h2{ + margin-bottom: 30px; + color: #343434; + font-weight: 700; +} + +.box__footer p{ + margin-top: 10px; + color: #7a7a7a; + font-weight: 600; +} + +.box__footer p:hover{ + opacity: 0.8; +} \ No newline at end of file From 9f68793fdcb418a4b0f9d13997624b8152c9b5ea Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Mon, 6 Jun 2022 17:00:20 -0300 Subject: [PATCH 07/25] =?UTF-8?q?feat:=20se=20agreg=C3=B3=20el=20footer=20?= =?UTF-8?q?en=20la=20vista=20del=20carrito?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cart.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/views/cart.html b/src/views/cart.html index 2c70a21..a10d0c7 100644 --- a/src/views/cart.html +++ b/src/views/cart.html @@ -14,4 +14,17 @@ Total $ {{ cart.total }} +
+ +
+
+
+
{% endblock %} From 45eb73f01d86e86e86d5845d583478adb09a0f83 Mon Sep 17 00:00:00 2001 From: marinazottig Date: Tue, 7 Jun 2022 10:47:04 -0300 Subject: [PATCH 08/25] =?UTF-8?q?Fix:=20se=20elimin=C3=B3=20el=20bot=C3=B3?= =?UTF-8?q?n=20anterior=20en=20la=20primera=20p=C3=A1gina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_pagination.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/_pagination.html b/src/views/_pagination.html index 4bde4b5..484339b 100644 --- a/src/views/_pagination.html +++ b/src/views/_pagination.html @@ -2,7 +2,9 @@ From a10ce0bb8e2d62770728e699b28c9d186969993b Mon Sep 17 00:00:00 2001 From: Macarena Drago Date: Tue, 7 Jun 2022 11:17:34 -0300 Subject: [PATCH 10/25] feat:Se agrego la descripcion de cada producto --- fixtures/products.json | 12 ++++++++++++ src/models/product.js | 4 ++++ src/views/_product-card.html | 1 + 3 files changed, 17 insertions(+) diff --git a/fixtures/products.json b/fixtures/products.json index 6c8111a..3d0da31 100644 --- a/fixtures/products.json +++ b/fixtures/products.json @@ -3,72 +3,84 @@ "discount": 5, "name": "Placard", "price": 50000, + "description":"Placard de algarrobo de 1.90 x 0.30 x 2.5", "type": "home" }, { "discount": 10, "name": "Mesa", "price": 25000, + "description":"Mesa de pino de 1.60 x 0.80", "type": "home" }, { "discount": 0, "name": "Silla", "price": 5000, + "description":"Silla de pino 'confy', ideal para el estudiante", "type": "home" }, { "discount": 0, "name": "Mesa de Luz", "price": 8000, + "description":"Mesa de pino de 1.60 x 0.80", "type": "home" }, { "discount": 0, "name": "Sillon", "price": 85000, + "description":"Sillon sofa 2 cuerpos", "type": "home" }, { "discount": 0, "name": "Cama", "price": 45000, + "description":"Cama dos plazas king", "type": "home" }, { "discount": 0, "name": "Rack TV", "price": 25000, + "description":"Rack TV nordico ", "type": "home" }, { "discount": 0, "name": "TV", "price": 55000, + "description":"Smart TV 45 pulgadas", "type": "electronics" }, { "discount": 0, "name": "PS4", "price": 75000, + "description":"Sony PS4 edición Destiny - Incluye destiny 2 de regalo", "type": "electronics" }, { "discount": 0, "name": "PS5", "price": 175000, + "description":"Nueva PS5 con 3 juegos de regalo. Edición física", "type": "electronics" }, { "discount": 0, "name": "Barra de sonido", "price": 35000, + "description": "Barra de sonido Skull Candy con bluetoth de última generación", "type": "electronics" }, { "discount": 0, "name": "Laptop", "price": 350000, + "description": "Laptop MSI de 15.2 pulgadas, intel core I7, 16 GB de ram y placa de video Nvidia GTX 1660", "type": "electronics" } ] diff --git a/src/models/product.js b/src/models/product.js index 1ec4c23..3fe8c26 100644 --- a/src/models/product.js +++ b/src/models/product.js @@ -26,6 +26,10 @@ const Product = db.define( allowNull: false, values: ProductType.types, }, + description : { + type: Sequelize.STRING, + allowNull: false, + }, discount: { type: Sequelize.NUMBER, allowNull: false, diff --git a/src/views/_product-card.html b/src/views/_product-card.html index 42da919..f6a9bdb 100644 --- a/src/views/_product-card.html +++ b/src/views/_product-card.html @@ -19,6 +19,7 @@
{{ product.name }}
{% endif %}

+

{{ product.description }}

$ {{ product.price }}

{% if (product.discount > 0) %} From 80a7bf444b3810d5f8c00c3190854c60890202aa Mon Sep 17 00:00:00 2001 From: Macarena Drago Date: Tue, 7 Jun 2022 11:32:53 -0300 Subject: [PATCH 11/25] fix: Se corrigio error en product.js que daba fallas en test --- src/models/product.js | 7 ++++--- tests/unit/models/product.spec.js | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/models/product.js b/src/models/product.js index 3fe8c26..446b3a4 100644 --- a/src/models/product.js +++ b/src/models/product.js @@ -89,8 +89,9 @@ const createProduct = ({ price = 0.0, type = ProductType.HOME, discount = 0.0, + description ='', } = {}) => { - return Product.create({ name, price, type, discount }); + return Product.create({ name, price, type, discount, description }); }; /** @@ -101,12 +102,12 @@ const createProduct = ({ */ const updateProduct = async ( id, - { name = '', price = 0.0, type = ProductType.HOME, discount = 0.0 } = {} + { name = '', price = 0.0, type = ProductType.HOME, discount = 0.0, description='' } = {} ) => { const product = await findById(id); if (product != null) { - return product.update({ name, price, type, discount }); + return product.update({ name, price, type, discount, description }); } return null; }; diff --git a/tests/unit/models/product.spec.js b/tests/unit/models/product.spec.js index 85b6190..0bcd298 100644 --- a/tests/unit/models/product.spec.js +++ b/tests/unit/models/product.spec.js @@ -10,6 +10,7 @@ test('Crear producto', async () => { price: 50000.0, type: ProductType.HOME, name: 'Placard', + description:'test', }; // Creamos el producto @@ -18,6 +19,7 @@ test('Crear producto', async () => { expect(product.price).toBe(productData.price); expect(product.type).toBe(productData.type); expect(product.name).toBe(productData.name); + expect(product.description).toBe(productData.description); }); test('Crear producto sin tipo', async () => { @@ -32,7 +34,7 @@ test('Crear producto sin tipo', async () => { expect(product.price).toBe(productData.price); expect(product.type).toBe(ProductType.HOME); expect(product.name).toBe(productData.name); -}); + }); test('Listar productos sin resultados', async () => { const products = await ProductModel.getAll(); From da907977ab8dbeb854b269652901fd2d3cd5aaa4 Mon Sep 17 00:00:00 2001 From: JoaquinPamphile <75822530+JoaquinPamphile@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:39:40 -0300 Subject: [PATCH 12/25] =?UTF-8?q?Build:=20correcci=C3=B3n=20de=20package.j?= =?UTF-8?q?son=20para=20poder=20realizar=20el=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d7d237d..7c20194 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "src/index.js", "scripts": { "db:fixture": "node ./fixtures/index.js", - "start": "node ./src/index.js", + "start": "node.fixtures/index.js && node ./src/index.js", "dev": "nodemon ./src/index.js -e js,css,html", "test": "jest", "test:coverage": "jest --collectCoverage", From 2a441e37358c01ad6d10d53e47a2013ba73c5b35 Mon Sep 17 00:00:00 2001 From: JoaquinPamphile <75822530+JoaquinPamphile@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:53:30 -0300 Subject: [PATCH 13/25] =?UTF-8?q?Build:=20correcci=C3=B3n=20de=20par=C3=A1?= =?UTF-8?q?metro=20"start"=20para=20el=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c20194..b0163b9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "src/index.js", "scripts": { "db:fixture": "node ./fixtures/index.js", - "start": "node.fixtures/index.js && node ./src/index.js", + "start": "node ./fixtures/index.js && node ./src/index.js", "dev": "nodemon ./src/index.js -e js,css,html", "test": "jest", "test:coverage": "jest --collectCoverage", From 64ea432824a45fedf2279bbc45a9c62b77be39d9 Mon Sep 17 00:00:00 2001 From: Macarena Drago Date: Mon, 13 Jun 2022 20:58:58 -0300 Subject: [PATCH 14/25] =?UTF-8?q?Build:=20se=20cambi=C3=B3=20el=20orden=20?= =?UTF-8?q?de=20las=20dependencias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 16 ++++------------ package.json | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9c8f7b..0611860 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "body-parser": "^1.20.0", "cypress": "^9.7.0", + "detect-port": "^1.3.0", "express": "^4.18.1", "jest-environment-jsdom": "^28.1.0", "morgan": "^1.10.0", @@ -23,7 +24,6 @@ "@testing-library/dom": "^8.13.0", "@testing-library/jest-dom": "^5.16.4", "babel-jest": "^28.1.0", - "detect-port": "^1.3.0", "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-jest": "^26.1.5", @@ -2214,7 +2214,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/address/-/address-1.2.0.tgz", "integrity": "sha512-tNEZYz5G/zYunxFm7sfhAxkXEuLj3K6BKwv6ZURlsF6yiUQ65z0Q2wZW9L5cPUl9ocofGvXOdFYbFHp0+6MOig==", - "dev": true, "engines": { "node": ">= 10.0.0" } @@ -3954,7 +3953,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", - "dev": true, "dependencies": { "address": "^1.0.1", "debug": "^2.6.0" @@ -3971,7 +3969,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -3979,8 +3976,7 @@ "node_modules/detect-port/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/diff-sequences": { "version": "27.5.1", @@ -14399,8 +14395,7 @@ "address": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/address/-/address-1.2.0.tgz", - "integrity": "sha512-tNEZYz5G/zYunxFm7sfhAxkXEuLj3K6BKwv6ZURlsF6yiUQ65z0Q2wZW9L5cPUl9ocofGvXOdFYbFHp0+6MOig==", - "dev": true + "integrity": "sha512-tNEZYz5G/zYunxFm7sfhAxkXEuLj3K6BKwv6ZURlsF6yiUQ65z0Q2wZW9L5cPUl9ocofGvXOdFYbFHp0+6MOig==" }, "agent-base": { "version": "6.0.2", @@ -15714,7 +15709,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", - "dev": true, "requires": { "address": "^1.0.1", "debug": "^2.6.0" @@ -15724,7 +15718,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -15732,8 +15725,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, diff --git a/package.json b/package.json index d7d237d..5cb1842 100644 --- a/package.json +++ b/package.json @@ -33,14 +33,14 @@ "morgan": "^1.10.0", "nunjucks": "^3.2.3", "sequelize": "^6.19.0", - "sqlite3": "^5.0.8" + "sqlite3": "^5.0.8", + "detect-port": "^1.3.0" }, "devDependencies": { "@lhci/cli": "^0.9.0", "@testing-library/jest-dom": "^5.16.4", "@testing-library/dom": "^8.13.0", "babel-jest": "^28.1.0", - "detect-port": "^1.3.0", "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-jest": "^26.1.5", From d75c68db6694878e602ca4cb577599e0a604b77a Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Fri, 17 Jun 2022 11:38:44 -0300 Subject: [PATCH 15/25] =?UTF-8?q?fix:=20Se=20ingrement=C3=B3=20la=20perfor?= =?UTF-8?q?mance=20de=20la=20aplicaci=C3=B3n=20de=20un=2089%=20a=20un=2096?= =?UTF-8?q?%=20al=20declarar=20el=20tama=C3=B1o=20predefindo=20de=20las=20?= =?UTF-8?q?im=C3=A1genes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_product-card.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/_product-card.html b/src/views/_product-card.html index f6a9bdb..9e3fed2 100644 --- a/src/views/_product-card.html +++ b/src/views/_product-card.html @@ -5,6 +5,7 @@ src="https://via.placeholder.com/150" alt="foto de un {{ product.name }}" width="150px" + height="150px" class="rounded" loading="async" /> From 13fa2a9d65ed8b45368680310724b620a0f70294 Mon Sep 17 00:00:00 2001 From: Macarena Drago Date: Fri, 17 Jun 2022 12:55:41 -0300 Subject: [PATCH 16/25] fix: Se aumento el porcentaje de accesibilidad mejorando el contraste de background y texto --- src/public/css/style.css | 12 ++++++++++-- src/views/_pagination.html | 4 ++-- src/views/_product-card.html | 6 +++--- src/views/cart.html | 8 ++++---- src/views/home.html | 6 +++--- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/public/css/style.css b/src/public/css/style.css index 0f5e509..44daa24 100644 --- a/src/public/css/style.css +++ b/src/public/css/style.css @@ -49,16 +49,24 @@ footer{ .box__footer h2{ margin-bottom: 30px; - color: #343434; + color:black; font-weight: 700; } .box__footer p{ margin-top: 10px; - color: #7a7a7a; + color: black; font-weight: 600; } .box__footer p:hover{ opacity: 0.8; +} + +p { + color: black; +} + +.black { + color: black; } \ No newline at end of file diff --git a/src/views/_pagination.html b/src/views/_pagination.html index 6c3abdb..34219ab 100644 --- a/src/views/_pagination.html +++ b/src/views/_pagination.html @@ -3,7 +3,7 @@ diff --git a/src/views/_product-card.html b/src/views/_product-card.html index 9e3fed2..fb480b7 100644 --- a/src/views/_product-card.html +++ b/src/views/_product-card.html @@ -12,7 +12,7 @@
{{ product.name }}

- + {% if product.type == 'home' %} Hogar {% elif product.type == 'electronics'%} @@ -24,7 +24,7 @@

{{ product.name }}

$ {{ product.price }}

{% if (product.discount > 0) %} -

{{ product.discount }} %

+

{{ product.discount }} %

{% endif %}
@@ -33,7 +33,7 @@
{{ product.name }}
{% if (not product.CartProduct ) %}
- +
{% else %}
diff --git a/src/views/cart.html b/src/views/cart.html index 2f4a6ec..c6d03a5 100644 --- a/src/views/cart.html +++ b/src/views/cart.html @@ -14,7 +14,7 @@

No posee productos en el carritos

{% else %}
-
+
Total $ {{ cart.total }}
@@ -23,9 +23,9 @@

No posee productos en el carritos

diff --git a/src/views/home.html b/src/views/home.html index 971bb4c..5a0d2f5 100644 --- a/src/views/home.html +++ b/src/views/home.html @@ -21,9 +21,9 @@
From 06280f5ecfcc8ba1fcbf5dc5bd3c6c7fb0c90362 Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Tue, 21 Jun 2022 09:56:40 -0300 Subject: [PATCH 17/25] =?UTF-8?q?fix:=20Se=20increment=C3=B3=20el=20porcen?= =?UTF-8?q?taje=20de=20Best=20Practices=20modificando=20la=20resoluci?= =?UTF-8?q?=C3=B3n=20de=20las=20im=C3=A1genes=20de=20los=20productos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_product-card.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/_product-card.html b/src/views/_product-card.html index fb480b7..3c7c06c 100644 --- a/src/views/_product-card.html +++ b/src/views/_product-card.html @@ -2,10 +2,11 @@
foto de un {{ product.name }} From 7d8fd8af8233c8fa1e44e35169db9f2507604e63 Mon Sep 17 00:00:00 2001 From: marinazottig Date: Tue, 21 Jun 2022 23:58:17 -0300 Subject: [PATCH 18/25] =?UTF-8?q?fix:=20Arregl=C3=A9=20el=20problema=20con?= =?UTF-8?q?=20los=20duplicados=20de=20ID=20en=20la=20accesibilidad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_nav.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/_nav.html b/src/views/_nav.html index 35e7308..2e028ed 100644 --- a/src/views/_nav.html +++ b/src/views/_nav.html @@ -11,14 +11,14 @@ aria-describedby="search-btn">
- Carrito + Carrito
From cb78bb6e22173a7da8ff6151a82d5f2aa248cce6 Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Wed, 22 Jun 2022 21:36:52 -0300 Subject: [PATCH 19/25] =?UTF-8?q?build:=20Modificaci=C3=B3n=20de=20changel?= =?UTF-8?q?og=20con=20nueva=20versi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b5fc7c..3da7faf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,3 +18,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [unreleased]: https://github.com/frlp-utn-ingsoft/shopp/compare/v1.0.0...HEAD [1.0.0]: https://github.com/frlp-utn-ingsoft/shopp/releases/tag/v1.0.0 + +## [1.2.6] - 2022-06-22 + +### Added +Footer con datos de contacto +Descripción de todos los producto + + +### Fixed: +Se añadió la traducción de las categorías +Se anadió el mensaje de carrito vacío +Se eliminó el botón anterior de la primer página +Se eliminó el botón siguiente de la última página +Se corrigió el bug del package de deploy +Se corrigieron las dependencias a utilizar + +### Metrics: +Performance inicial: 87% / Performance final: 100% +Accessibility inicial: 91% / Accessibility final: 100% +Best Practices inicial: 83% / Best Practices final: 100% +SEO inicial: 92% / SEO final: 92% From d7a17a5df83495d1a87c3b055b39bcc1c475cac9 Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Sun, 3 Jul 2022 11:34:48 -0300 Subject: [PATCH 20/25] =?UTF-8?q?feat:=20Se=20agreg=C3=B3=20el=20test=20pa?= =?UTF-8?q?ra=20corroborar=20que=20el=20tipo=20de=20producto=20est=C3=A9?= =?UTF-8?q?=20traducido=20al=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/ui/product-card.spec.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/unit/ui/product-card.spec.js b/tests/unit/ui/product-card.spec.js index 1a6b996..f4f47cf 100644 --- a/tests/unit/ui/product-card.spec.js +++ b/tests/unit/ui/product-card.spec.js @@ -128,4 +128,17 @@ describe('Tarjeta de producto', () => { getByTestId(document.body, 'discount'); }).toThrowError(TestingLibraryElementError) }); + test('Deberia tener el tipo de producto traducido al español', async () => { + const product = { + name: 'Placard', + type: 'home', + price: 50000, + }; + const html = renderProduct(product); + document.body.innerHTML = html; + + const btn = getByText(document.body, 'Hogar'); + expect(btn).toBeVisible(); + + }); }); From 057e47ab28732b95ea078c33cddc6fba0dcecbcc Mon Sep 17 00:00:00 2001 From: JoaquinPamphile Date: Sun, 3 Jul 2022 13:11:04 -0300 Subject: [PATCH 21/25] =?UTF-8?q?feat:=20Se=20agreg=C3=B3=20un=20apartado?= =?UTF-8?q?=20en=20test=20e2e=20para=20corroborar=20que=20el=20mensaje=20d?= =?UTF-8?q?e=20carrito=20vac=C3=ADo=20aparezca?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/e2e/specs/cart.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/e2e/specs/cart.spec.js b/tests/e2e/specs/cart.spec.js index a70de47..e9e9d34 100644 --- a/tests/e2e/specs/cart.spec.js +++ b/tests/e2e/specs/cart.spec.js @@ -53,4 +53,14 @@ describe('Cart', () => { cy.get('.product:nth-child(2) [data-testid="discount"]') .should('have.text', '10 %') }); + + it('Deberia mostrar un mensaje si el carrito no contiene ningín Item', () => { + cy.visit('/cart'); + + cy.get('h2').should( + 'contain.text', + 'No posee productos en el carrito' + ); + }); + }); From e5475f58e9d50f465c78f2b2a145fcbe0fd6f971 Mon Sep 17 00:00:00 2001 From: Macarena Drago Date: Sun, 3 Jul 2022 17:38:00 -0300 Subject: [PATCH 22/25] feat: Se creo el test unitario para verificar que cada producto cuente con su descripcion --- tests/unit/ui/product-card.spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/unit/ui/product-card.spec.js b/tests/unit/ui/product-card.spec.js index f4f47cf..b039bf8 100644 --- a/tests/unit/ui/product-card.spec.js +++ b/tests/unit/ui/product-card.spec.js @@ -141,4 +141,18 @@ describe('Tarjeta de producto', () => { expect(btn).toBeVisible(); }); + + + test('Deberia tener la descripcion del producto', async () => { + const html = renderProduct({ + name: 'Placard', + type: 'home', + price: 100, + description: 'ejemplo', + }); + document.body.innerHTML = html; + + expect(getByText(document.body, 'ejemplo')).toBeVisible(); + }); + }); From d9d700fb2d7c874f8a6d98ddd6fb96db73296c0e Mon Sep 17 00:00:00 2001 From: marinazottig Date: Sun, 3 Jul 2022 17:43:31 -0300 Subject: [PATCH 23/25] =?UTF-8?q?Feat:=20se=20agreg=C3=B3=20el=20test=20un?= =?UTF-8?q?itariopara=20corroborar=20que=20en=20la=20primera=20pantalla=20?= =?UTF-8?q?no=20aparezca=20el=20bot=C3=B3n=20anterior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/ui/pagination.spec.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/unit/ui/pagination.spec.js b/tests/unit/ui/pagination.spec.js index a8badfd..451c8c1 100644 --- a/tests/unit/ui/pagination.spec.js +++ b/tests/unit/ui/pagination.spec.js @@ -4,7 +4,7 @@ const utils = require('../../ui-utils.js') -const { getByText } = require('@testing-library/dom'); +const { getByText, TestingLibraryElementError } = require('@testing-library/dom'); require('@testing-library/jest-dom'); function renderPagination(pagination) { @@ -85,4 +85,18 @@ describe('Paginación', () => { expect(prevLink).toBeVisible(); expect(prevLink.getAttribute('href')).toBe(`?page=${pagination.currentPage - 1}`); }); + + test('No debería mostrarse el boton anterior en la primera página', async () => { + const pagination = { + totalPages: 10, + currentPage: 1 + } + const html = renderPagination(pagination); + + document.body.innerHTML = html; + + expect(() => { + getByText(document.body, '< Anterior');}).toThrowError(TestingLibraryElementError); + }); + }); From a6dc527cd16f9204d92bdbc4f61a0a19ca0c0adf Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Tue, 5 Jul 2022 21:13:51 -0300 Subject: [PATCH 24/25] Feat: Se crearon los test para testear la existencia del footer en home y en cart --- tests/e2e/specs/cart.spec.js | 8 ++++++++ tests/e2e/specs/home.spec.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/e2e/specs/cart.spec.js b/tests/e2e/specs/cart.spec.js index e9e9d34..9ed2b6f 100644 --- a/tests/e2e/specs/cart.spec.js +++ b/tests/e2e/specs/cart.spec.js @@ -63,4 +63,12 @@ describe('Cart', () => { ); }); + it('Debería contener el footer', () => { + cy.visit('/cart'); + cy.get('footer').should( + 'contain.text', + 'shopp@gmail.com' + ); + }); + }); diff --git a/tests/e2e/specs/home.spec.js b/tests/e2e/specs/home.spec.js index 56e5703..3ae4f56 100644 --- a/tests/e2e/specs/home.spec.js +++ b/tests/e2e/specs/home.spec.js @@ -44,4 +44,12 @@ describe('Home Test', () => { .should('contain.text', '5 %'); }); + it('Debería contener el footer', () => { + cy.visit('/home'); + cy.get('footer').should( + 'contain.text', + 'shopp@gmail.com' + ); + }); + }); From 3cb229ffca3f8ec07d1e6f49ce5a4975775a6716 Mon Sep 17 00:00:00 2001 From: Gianfranco Carzolio Date: Tue, 5 Jul 2022 21:18:39 -0300 Subject: [PATCH 25/25] =?UTF-8?q?Fix:=20Se=20corrigi=C3=B3=20error=20en=20?= =?UTF-8?q?el=20test=20de=20footer=20en=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/e2e/specs/home.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/home.spec.js b/tests/e2e/specs/home.spec.js index 3ae4f56..0ffdce7 100644 --- a/tests/e2e/specs/home.spec.js +++ b/tests/e2e/specs/home.spec.js @@ -45,7 +45,7 @@ describe('Home Test', () => { }); it('Debería contener el footer', () => { - cy.visit('/home'); + cy.visit('/'); cy.get('footer').should( 'contain.text', 'shopp@gmail.com'