test(inventory): move Yacimiento creation contract to F7 Area companies
This commit is contained in:
@@ -88,14 +88,21 @@ test('F6.1 WEB Inventory searches use physical scope and never the operator snap
|
||||
}
|
||||
});
|
||||
|
||||
test('WEB creation captures Company and concession only while creating a Yacimiento', () => {
|
||||
test('F7 WEB creation selects one Area-linked Company for Yacimiento and retires concession from the simple flow', () => {
|
||||
const page = source('../web-v2/src/pages/InventoryCreatePage.tsx');
|
||||
const structure = source('src/asset-master/inventory-structure.service.ts');
|
||||
const api = source('../web-v2/src/lib/inventoryStructureApi.ts');
|
||||
const simpleStructure = source('src/asset-master/simple-inventory-structure.service.ts');
|
||||
const migration = source('src/database/migrations/1790110200000-f7-simple-inventory-context.ts');
|
||||
|
||||
assert.match(page, /requiresYacimientoContext = kind === 'YACIMIENTO'/);
|
||||
assert.match(page, /Empresa relacionada/);
|
||||
assert.match(page, /Tipo de concesión/);
|
||||
assert.match(page, /operatorCompanyId:operatorCompanyId \|\| null/);
|
||||
assert.match(page, /concessionTypeId:concessionTypeId \|\| null/);
|
||||
assert.match(structure, /Empresa, Departamento, Área y Yacimiento no llevan clasificación técnica/);
|
||||
assert.match(page, /const requiresCompany = kind === 'YACIMIENTO'/);
|
||||
assert.match(page, /listCompaniesForInventoryArea\(parentId\)/);
|
||||
assert.match(page, /Empresa operadora/);
|
||||
assert.match(page, /operatorCompanyId: operatorCompanyId \|\| null/);
|
||||
assert.doesNotMatch(page, /Tipo de concesión/);
|
||||
assert.doesNotMatch(page, /concessionTypeId/);
|
||||
assert.match(api, /inventory-structure\/simple/);
|
||||
assert.match(simpleStructure, /requireAreaCompanyRelation/);
|
||||
assert.match(simpleStructure, /INVENTORY_YACIMIENTO_COMPANY_NOT_IN_AREA/);
|
||||
assert.match(migration, /La Empresa del Yacimiento debe estar vinculada como explotadora del Área/);
|
||||
assert.match(migration, /NEW\.operational_area_id:=NEW\.parent_id/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user