feat(carousel): add new product images and update carousel item details

This commit is contained in:
2026-07-23 12:23:48 -03:00
parent ea0bd4a956
commit ca1cacc9ea
10 changed files with 43 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -586,6 +586,7 @@
<ng-template #productCarouselItem let-product let-index="index">
<div class="carousel-product" [attr.data-carousel-index]="index">
<span class="carousel-product__mock-id">ITEM {{ product.id }}</span>
<app-product-column-with-image
[imageUrl]="product.imageUrl"
[title]="product.title"

View File

@@ -20,9 +20,25 @@
}
.carousel-product {
position: relative;
width: clamp(15rem, 30vw, 18rem);
height: 100%;
&__mock-id {
position: absolute;
top: 0.75rem;
left: 0.75rem;
z-index: 2;
padding: 0.35rem 0.55rem;
color: #fff;
font-size: 0.7rem;
font-weight: 700;
line-height: 1;
letter-spacing: 0.08em;
background: rgb(20 20 20 / 82%);
border-radius: 999px;
}
app-product-column-with-image {
display: block;
height: 100%;

View File

@@ -171,8 +171,13 @@ describe('ReutilizablesTestPageComponent', () => {
expect(carouselDemo?.querySelector('app-carousel')).not.toBeNull();
expect(carouselItems).toHaveLength(6);
expect(productImages).toHaveLength(6);
expect(productImages?.[0].getAttribute('src')).toContain('/images/pantalon-scuba.png');
expect(productImages?.[1].getAttribute('src')).toContain('/images/zapatillas-running.png');
expect(productImages?.[0].getAttribute('src')).toContain('/images/carousel-mochila-roja.webp');
expect(productImages?.[1].getAttribute('src')).toContain(
'/images/carousel-auriculares-amarillos.webp',
);
expect(
new Set(Array.from(productImages ?? [], (image) => image.getAttribute('src'))).size,
).toBe(6);
});
it('renders the modal showcase and opens the confirm demos from the buttons', async () => {

View File

@@ -101,51 +101,51 @@ export class ReutilizablesTestPageComponent {
protected readonly carouselProducts: CarouselProductMock[] = [
{
id: 1,
title: 'Pantalón scuba negro',
originalPrice: 95000,
title: '01 · Mochila roja',
originalPrice: 85000,
discount: 20,
transferPrice: 74800,
imageUrl: '/images/pantalon-scuba.png',
transferPrice: 68000,
imageUrl: '/images/carousel-mochila-roja.webp',
},
{
id: 2,
title: 'Zapatillas running azul',
title: '02 · Auriculares amarillos',
originalPrice: 120000,
discount: 15,
transferPrice: 98000,
imageUrl: '/images/zapatillas-running.png',
transferPrice: 102000,
imageUrl: '/images/carousel-auriculares-amarillos.webp',
},
{
id: 3,
title: 'Pantalón urbano',
originalPrice: 89000,
title: '03 · Reloj verde',
originalPrice: 96000,
discount: 10,
transferPrice: 78500,
imageUrl: '/images/pantalon-scuba.png',
transferPrice: 86400,
imageUrl: '/images/carousel-reloj-verde.webp',
},
{
id: 4,
title: 'Zapatillas deportivas',
title: '04 · Cámara violeta',
originalPrice: 135000,
discount: null,
transferPrice: 128000,
imageUrl: '/images/zapatillas-running.png',
imageUrl: '/images/carousel-camara-violeta.webp',
},
{
id: 5,
title: 'Pantalón clásico',
originalPrice: 102000,
title: '05 · Zapatillas naranjas',
originalPrice: 110000,
discount: 25,
transferPrice: 75000,
imageUrl: '/images/pantalon-scuba.png',
transferPrice: 82500,
imageUrl: '/images/carousel-zapatillas-naranjas.webp',
},
{
id: 6,
title: 'Zapatillas training',
title: '06 · Campera azul',
originalPrice: 142000,
discount: 12,
transferPrice: 121000,
imageUrl: '/images/zapatillas-running.png',
imageUrl: '/images/carousel-campera-azul.webp',
},
];