refactor(web): pantallas y formularios separados por módulo (ventas, compras, inventario)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b0b8afc87
commit
c5368c7ad0
10 files changed
+358
-311
No files matched your search
@@ -4,13 +4,15 @@ import { type ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ActivatedRoute, Router, convertToParamMap, provideRouter } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { LAYOUTS, hasFolio, headerKeysOf } from './document-layouts';
|
||||
import { purchaseRequestLayout } from './compras/compras.layouts';
|
||||
import { hasFolio, headerKeysOf } from './document-layouts';
|
||||
import { transferRequestLayout } from './inventario/inventario.layouts';
|
||||
import { createPayload, updatePayload, validateLayout } from './document-model';
|
||||
import { DocumentFormPage } from './document-form.page';
|
||||
import { DOCUMENT_SCREENS } from './document-screens';
|
||||
|
||||
describe('modelo de los formularios sin socio', () => {
|
||||
const transfer = LAYOUTS.transferRequest;
|
||||
const transfer = transferRequestLayout;
|
||||
|
||||
it('cada pantalla tiene su formulario, declarado por ella', () => {
|
||||
expect(DOCUMENT_SCREENS.every((s) => s.layout)).toBe(true);
|
||||
@@ -71,7 +73,7 @@ describe('modelo de los formularios sin socio', () => {
|
||||
});
|
||||
|
||||
it('la solicitud de compra marca al solicitante como usuario (ReqType 12) solo si lo indica', () => {
|
||||
const l = LAYOUTS.purchaseRequest;
|
||||
const l = purchaseRequestLayout;
|
||||
expect(l.beforeCreate!({ Requester: 'manager' })).toEqual({ Requester: 'manager', ReqType: 12 });
|
||||
expect(l.beforeCreate!({ Requester: '' })).toEqual({ Requester: '' });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user