feat: solicitudes de compra como documento de marketing (solicitante, válido hasta, fecha necesaria, proveedor y fecha por línea) y API de usuarios con campos limitados
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3bd976bbd
commit
c1f2cea1e1
19 files changed
+342
-62
No files matched your search
@@ -662,3 +662,22 @@ describe('LinesGrid: celdas de cuenta', () => {
|
||||
expect(cell().value).toBe('1071111010');
|
||||
});
|
||||
});
|
||||
|
||||
describe('LinesGrid: columna de fecha', () => {
|
||||
it('muestra la fecha de SAP sin hora, en un campo de fecha, y guarda la que se elige', async () => {
|
||||
await TestBed.configureTestingModule({ imports: [Host], providers: [provideHttpClient(), provideHttpClientTesting()] }).compileComponents();
|
||||
const fixture = TestBed.createComponent(Host);
|
||||
fixture.componentInstance.columns = [{ key: 'ItemCode', title: 'Artículo' }, { key: 'RequiredDate', title: 'Fecha necesaria', type: 'date' }];
|
||||
fixture.componentInstance.lines.set([{ ItemCode: 'A', RequiredDate: '2026-10-01T00:00:00Z' }]);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
const input = (fixture.nativeElement as HTMLElement).querySelector<HTMLInputElement>('input[data-r="0"][data-c="1"]')!;
|
||||
expect(input.type).toBe('date');
|
||||
expect(input.value).toBe('2026-10-01');
|
||||
input.value = '2026-11-15';
|
||||
input.dispatchEvent(new Event('change'));
|
||||
fixture.detectChanges();
|
||||
expect(fixture.componentInstance.lines()[0]['RequiredDate']).toBe('2026-11-15');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user