refactor: split tenant and lease page modules

This commit is contained in:
nessar committed 2026-08-17 14:18:14 +02:00
1 parent ebfc62a5e2
commit 3ca8514231
27 files changed
+1199 -1143

No files matched your search

@@ -0,0 +1,24 @@
import { TestBed } from '@angular/core/testing';
import { TenantCard } from './tenant-card';
describe('TenantCard', () => {
it('rejects files larger than the upload limit before emitting', () => {
const fixture = TestBed.createComponent(TenantCard);
fixture.componentRef.setInput('tenant', {
id: 'tenant-1',
firstName: 'Camille',
lastName: 'Martin',
email: 'camille@example.com',
phone: '',
address: '',
});
const file = new File(['identity'], 'archive.zip');
Object.defineProperty(file, 'size', { value: 250 * 1024 * 1024 + 1 });
const input = document.createElement('input');
Object.defineProperty(input, 'files', { value: { item: () => file } });
fixture.componentInstance.selectFile({ target: input } as unknown as Event);
expect(fixture.componentInstance.uploadError()).toContain('250 Mo');
});
});