feat(web): fila del flete (gastos adicionales) y toolbar de ancho completo; la configuración de pantallas se carga en diferido

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 16:09:06 -05:00
1 parent d3ab97cd2e
commit d6c127627f
14 files changed
+360 -27

No files matched your search

+14 -1
View File
@@ -2,6 +2,7 @@ import { MENU } from '@basic-erp/sap-types';
import { describe, expect, it } from 'vitest';
import { routes } from './app.routes';
import { permissionGuard } from './core/auth/guards';
import { DOCUMENT_PATHS } from './features/documents/document-paths';
import { DOCUMENT_SCREENS } from './features/documents/document-screens';
const shell = routes.find((r) => r.path === '')!;
@@ -21,7 +22,19 @@ describe('rutas', () => {
for (const screen of DOCUMENT_SCREENS) {
const route = children.find((r) => r.path === screen.path.slice(1))!;
expect(route.children?.map((c) => c.path), screen.path).toEqual(['', 'nuevo', ':docEntry']);
expect(route.data?.['screen']).toBe(screen);
expect(route.resolve?.['screen'], screen.path).toBeDefined(); // la configuración se carga al abrir la pantalla
}
});
it('la lista de rutas de documento del enrutador coincide con las pantallas', () => {
expect([...DOCUMENT_PATHS].sort()).toEqual(DOCUMENT_SCREENS.map((s) => s.path).sort());
});
it('el resolver entrega la pantalla de su ruta', async () => {
for (const path of ['/ventas/ordenes', '/inventario/entradas']) {
const route = children.find((r) => r.path === path.slice(1))!;
const screen = await (route.resolve!['screen'] as () => Promise<{ path: string }>)();
expect(screen.path).toBe(path);
}
});