test: resolve planning operators from authoritative Yacimientos
This commit is contained in:
@@ -28,7 +28,7 @@ test('F6.1 field Findings reject Inventory outside the frozen Yacimiento scope',
|
||||
assert.doesNotMatch(source, /AS "insideArea"/);
|
||||
});
|
||||
|
||||
test('F6.1 planning preserves Yacimiento and never validates Inventory ownership from Company snapshot', () => {
|
||||
test('F6.1 planning preserves Yacimiento and never validates descendant Inventory ownership', () => {
|
||||
const source = api('src/inspection-visits/inspection-visits.service.ts');
|
||||
|
||||
assert.match(source, /const nextScope = dto\.scopeAssetId === undefined \? visit\.scopeAssetId : dto\.scopeAssetId/);
|
||||
@@ -38,7 +38,6 @@ test('F6.1 planning preserves Yacimiento and never validates Inventory ownership
|
||||
assert.doesNotMatch(source, /visit\.scopeAssetId = nextAreaId/);
|
||||
assert.doesNotMatch(source, /assertAssetsMatchContext/);
|
||||
assert.doesNotMatch(source, /assertCurrentAssetsMatchContext/);
|
||||
assert.doesNotMatch(source, /asset\.operator_company_id IS DISTINCT FROM/);
|
||||
});
|
||||
|
||||
test('F6.1 creation selects actionable checklist Inventory automatically', () => {
|
||||
@@ -49,14 +48,17 @@ test('F6.1 creation selects actionable checklist Inventory automatically', () =>
|
||||
assert.match(source, /'AUTO_INCLUDED'/);
|
||||
});
|
||||
|
||||
test('F6.1 operator choices are resolved at the planned timestamp', () => {
|
||||
test('Authoritative operator choices are projected from Yacimientos of the selected Area', () => {
|
||||
const hierarchy = api('src/inspection-visits/inspection-planning-hierarchy.service.ts');
|
||||
const controller = api('src/inspection-visits/inspection-visits.controller.ts');
|
||||
const createPage = web('src/pages/InspectionVisitCreateF61Page.tsx');
|
||||
|
||||
assert.match(hierarchy, /operatorsForArea\([\s\S]*at\?: string/);
|
||||
assert.match(hierarchy, /relation\.valid_from <= \$2::timestamptz/);
|
||||
assert.match(hierarchy, /relation\.valid_until > \$2::timestamptz/);
|
||||
assert.match(hierarchy, /FROM assets yacimiento/);
|
||||
assert.match(hierarchy, /yacimiento\.parent_id=\$1::uuid/);
|
||||
assert.match(hierarchy, /yacimiento\.operator_company_id/);
|
||||
assert.match(hierarchy, /SELECT DISTINCT company\.id/);
|
||||
assert.doesNotMatch(hierarchy, /FROM area_company_relations relation/);
|
||||
assert.match(controller, /@Query\('at'\) at\?: string/);
|
||||
assert.match(createPage, /operators\?at=\$\{at\}/);
|
||||
assert.match(createPage, /\[areaId, plannedStartAt\]/);
|
||||
|
||||
Reference in New Issue
Block a user