feat: implement cart icon component with quantity badge and integrate into store header for improved UI

This commit is contained in:
2026-07-02 09:27:01 -03:00
parent 8a6ed763df
commit 16eea32ce7
12 changed files with 266 additions and 36 deletions

View File

@@ -2,10 +2,13 @@ import { signal } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { provideRouter, Router } from '@angular/router';
import { of } from 'rxjs';
import { App } from './app';
import { routes } from './app.routes';
import { Tenant } from './core/services/tenant.interface';
import { TenantService } from './core/services/tenant.service';
import { CartService } from './core/services/cart/cart.service';
const tenant: Tenant = {
id: 1,
@@ -57,6 +60,13 @@ async function renderAppAt(
{
provide: TenantService,
useValue: tenantService
},
{
provide: CartService,
useValue: {
cart: signal(null).asReadonly(),
loadCart: () => of({ id: 1, items: [], subtotal: '0' })
}
}
]
}).compileComponents();