feat(web): maestros de clientes, proveedores y artículos (lista, formulario con pestañas, extensiones por cliente)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b759c7bce7
commit
9f003ee4bf
30 files changed
+1553
-23
No files matched your search
@@ -4,6 +4,8 @@ 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';
|
||||
import { MASTER_PATHS } from './features/masters/master-paths';
|
||||
import { MASTER_SCREENS } from './features/masters/master-screens';
|
||||
|
||||
const shell = routes.find((r) => r.path === '')!;
|
||||
const children = shell.children!;
|
||||
@@ -38,10 +40,18 @@ describe('rutas', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('las pantallas que no son documentos (maestros) siguen como "no disponible"', () => {
|
||||
const route = children.find((r) => r.path === 'socios/clientes')!;
|
||||
expect(route.children).toBeUndefined();
|
||||
expect(route.loadComponent).toBeDefined();
|
||||
it('cada maestro ofrece lista, "nuevo" y "ver/editar" por su clave de texto', async () => {
|
||||
for (const path of MASTER_PATHS) {
|
||||
const route = children.find((r) => r.path === path.slice(1))!;
|
||||
expect(route.children?.map((c) => c.path), path).toEqual(['', 'nuevo', ':key']);
|
||||
expect(route.canActivate, path).toContain(permissionGuard);
|
||||
const screen = await (route.resolve!['screen'] as () => Promise<{ path: string }>)();
|
||||
expect(screen.path).toBe(path);
|
||||
}
|
||||
});
|
||||
|
||||
it('la lista de rutas de maestros del enrutador coincide con las pantallas', () => {
|
||||
expect([...MASTER_PATHS].sort()).toEqual(MASTER_SCREENS.map((s) => s.path).sort());
|
||||
});
|
||||
|
||||
it('la página de componentes está restringida a desarrollo y no está en el menú', () => {
|
||||
|
||||
Reference in new issue
Block a user