fix(android): align Acta flow and defer urgency to close
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 5m31s
Android CI / RC / Android · lint, tests, debug APK, release compile (pull_request) Successful in 5m30s
DH V2 CI / API · typecheck, tests, build (pull_request) Successful in 33s
DH V2 CI / WEB · typecheck, build (pull_request) Successful in 18s
Inspection planning smoke / F6.1 · real inspection create (pull_request) Failing after 1m33s
Production dependency audit / API · production dependencies (pull_request) Successful in 9s
Production dependency audit / WEB · production dependencies (pull_request) Successful in 9s
DH V2 CI / Docker / scripts contract (pull_request) Successful in 1m5s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 5m31s
Android CI / RC / Android · lint, tests, debug APK, release compile (pull_request) Successful in 5m30s
DH V2 CI / API · typecheck, tests, build (pull_request) Successful in 33s
DH V2 CI / WEB · typecheck, build (pull_request) Successful in 18s
Inspection planning smoke / F6.1 · real inspection create (pull_request) Failing after 1m33s
Production dependency audit / API · production dependencies (pull_request) Successful in 9s
Production dependency audit / WEB · production dependencies (pull_request) Successful in 9s
DH V2 CI / Docker / scripts contract (pull_request) Successful in 1m5s
This commit is contained in:
@@ -5,21 +5,18 @@ import { plainToInstance } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import { CancelInspectionActDto } from '../../src/inspection-acts/dto/cancel-inspection-act.dto';
|
||||
import { CreateInspectionActDto } from '../../src/inspection-acts/dto/create-inspection-act.dto';
|
||||
import { InspectionActUrgency } from '../../src/database/entities';
|
||||
|
||||
const ASSET_ID = '16e54e65-60cf-4739-b0d1-ccdd904fbfd5';
|
||||
|
||||
test('inspection act DTO accepts urgency, content and selected visit assets', async () => {
|
||||
test('inspection act DTO accepts content and selected visit assets without deciding urgency', async () => {
|
||||
const dto = plainToInstance(CreateInspectionActDto, {
|
||||
occurredAt: '2026-08-14T15:30:00.000Z',
|
||||
urgency: InspectionActUrgency.NON_URGENT,
|
||||
title: ' Verificación de instalación ',
|
||||
summary: ' Se inspeccionó el activo seleccionado. ',
|
||||
observations: ' Sin novedades. ',
|
||||
assetIds: [ASSET_ID],
|
||||
});
|
||||
assert.deepEqual(await validate(dto), []);
|
||||
assert.equal(dto.urgency, InspectionActUrgency.NON_URGENT);
|
||||
assert.equal(dto.title, 'Verificación de instalación');
|
||||
assert.equal(dto.summary, 'Se inspeccionó el activo seleccionado.');
|
||||
assert.equal(dto.observations, 'Sin novedades.');
|
||||
@@ -28,7 +25,6 @@ test('inspection act DTO accepts urgency, content and selected visit assets', as
|
||||
test('inspection act DTO rejects duplicate assets', async () => {
|
||||
const dto = plainToInstance(CreateInspectionActDto, {
|
||||
occurredAt: '2026-08-14T15:30:00.000Z',
|
||||
urgency: InspectionActUrgency.NON_URGENT,
|
||||
title: 'Acta',
|
||||
summary: 'Contenido',
|
||||
assetIds: [ASSET_ID, ASSET_ID],
|
||||
|
||||
Reference in New Issue
Block a user