add bitacora page, self-hosted fonts/icons, review fixes for the install package

This commit is contained in:
Roberto Treviño Cervantes
2026-10-30 11:19:34 -06:00
parent 8c63ed83ac
commit f4d2a3e85f
39 changed files with 275 additions and 721 deletions
@@ -2,8 +2,10 @@ import { TestBed } from '@angular/core/testing';
import { FileDropzone } from './file-dropzone';
describe('FileDropzone', () => {
function createFixture() {
function createFixture(keepSelection = true) {
const fixture = TestBed.createComponent(FileDropzone);
fixture.componentRef.setInput('accept', ['xlsx', 'csv', 'json', 'pdf']);
fixture.componentRef.setInput('keepSelection', keepSelection);
fixture.detectChanges();
return fixture;
}
@@ -81,7 +83,27 @@ describe('FileDropzone', () => {
expect(emitted.at(-1)).toEqual([]);
});
it('honors a custom accept input, keeping pdf available by default', () => {
it('without keepSelection emits only each new batch and lists nothing', () => {
const fixture = createFixture(false);
const compiled = fixture.nativeElement as HTMLElement;
const component = fixture.componentInstance;
const emitted: File[][] = [];
component.filesChange.subscribe((files) => emitted.push(files));
const drop = (files: File[]) =>
component.onDrop({ preventDefault: () => undefined, dataTransfer: { files } } as unknown as DragEvent);
const first = new File(['a'], 'uno.csv');
const second = new File(['b'], 'dos.csv');
drop([first]);
drop([second]);
drop([new File(['x'], 'malo.docx')]);
fixture.detectChanges();
expect(emitted).toEqual([[first], [second]]);
expect(compiled.querySelectorAll('.file-row')).toHaveLength(0);
});
it('honors a custom accept input', () => {
const fixture = createFixture();
expect(fixture.componentInstance.allowedExtensions.has('pdf')).toBe(true);