diff --git a/api-v3/test/unit/f6-1-inspection-yacimiento-scope-review.test.ts b/api-v3/test/unit/f6-1-inspection-yacimiento-scope-review.test.ts index e4ea3e2..afc30c5 100644 --- a/api-v3/test/unit/f6-1-inspection-yacimiento-scope-review.test.ts +++ b/api-v3/test/unit/f6-1-inspection-yacimiento-scope-review.test.ts @@ -62,11 +62,17 @@ test('F6.1 operator choices are resolved at the planned timestamp', () => { assert.match(createPage, /\[areaId, plannedStartAt\]/); }); -test('F6.1 WEB keeps Area and Yacimiento as separate concepts when editing', () => { +test('F6.1 WEB keeps Area and Yacimiento as separate concepts and freezes context after creation', () => { const source = web('src/pages/InspectionVisitEditorF4Page.tsx'); assert.doesNotMatch(source, /Área \/ Yacimiento<\/span>/); assert.match(source, /Área<\/span>/); assert.match(source, /Yacimiento<\/span>/); - assert.match(source, /scopeAssetId: visit\?\.scopeAsset\?\.id \?\? null/); + assert.match(source, /Operadora<\/span>/); + assert.match(source, /visit\.operationalArea\.name[\s\S]{0,160}readOnly/); + assert.match(source, /visit\.scopeAsset\.name[\s\S]{0,160}readOnly/); + assert.match(source, /visit\.operatorCompany\.name[\s\S]{0,160}readOnly/); + assert.doesNotMatch(source, /updateInspectionVisit\(id, \{[\s\S]{0,300}scopeAssetId:/); + assert.doesNotMatch(source, /updateInspectionVisit\(id, \{[\s\S]{0,300}operationalAreaId:/); + assert.doesNotMatch(source, /updateInspectionVisit\(id, \{[\s\S]{0,300}operatorCompanyId:/); });