test(f6.1): cover inventory merge physical candidate search

This commit is contained in:
2026-09-09 17:32:16 -03:00
parent 3dab0938d6
commit bec92f0c6d
@@ -78,11 +78,13 @@ test('F6.1 historical operational lists read Company and Area from the parent In
test('F6.1 WEB Inventory searches use physical Area and never the operator snapshot filter', () => { test('F6.1 WEB Inventory searches use physical Area and never the operator snapshot filter', () => {
const inspectionEditor = source('../web-v2/src/pages/InspectionVisitEditorF4Page.tsx'); const inspectionEditor = source('../web-v2/src/pages/InspectionVisitEditorF4Page.tsx');
const fieldDiscoveries = source('../web-v2/src/pages/FieldDiscoveriesPage.tsx'); const fieldDiscoveries = source('../web-v2/src/pages/FieldDiscoveriesPage.tsx');
const inventoryMerge = source('../web-v2/src/lib/inventoryMergeApi.ts');
for (const page of [inspectionEditor, fieldDiscoveries]) { for (const page of [inspectionEditor, fieldDiscoveries, inventoryMerge]) {
assert.match(page, /listAssets\(\{[\s\S]{0,250}operationalAreaId:/); assert.match(page, /listAssets\(\{[\s\S]{0,300}operationalAreaId:/);
assert.doesNotMatch(page, /listAssets\(\{[\s\S]{0,250}operatorCompanyId:/); assert.doesNotMatch(page, /listAssets\(\{[\s\S]{0,300}operatorCompanyId:/);
} }
assert.doesNotMatch(inventoryMerge, /source\.operatorCompany/);
}); });
test('F6.1 WEB derives the creation snapshot from the active Area operator and removes it from Inventory edits', () => { test('F6.1 WEB derives the creation snapshot from the active Area operator and removes it from Inventory edits', () => {