refactor: address loading review findings (#18)

This commit is contained in:
nessar committed 2026-08-17 14:18:15 +02:00
1 parent ec3319494b
commit 0f68a91c5d
26 files changed
+607 -364

No files matched your search

@@ -41,6 +41,23 @@ describe('TenantCard', () => {
expect(fixture.nativeElement.textContent).toContain('Envoi : 50 %');
});
it('falls back to indeterminate upload feedback when no total is available', () => {
const fixture = TestBed.createComponent(TenantCard);
fixture.componentRef.setInput('tenant', {
id: 'tenant-1',
firstName: 'Camille',
lastName: 'Martin',
email: 'camille@example.com',
phone: '',
address: '',
});
fixture.componentRef.setInput('uploading', true);
fixture.detectChanges();
expect(fixture.nativeElement.textContent).toContain('Envoi…');
expect(fixture.nativeElement.querySelector('mat-progress-bar')).not.toBeNull();
});
it('shows progress only on the selected attachment download', () => {
const fixture = TestBed.createComponent(TenantCard);
fixture.componentRef.setInput('tenant', {