test(inventory): align F5 source guards with F7 simple UX
This commit is contained in:
@@ -32,7 +32,7 @@ test('F5.1 canonical hierarchy starts at Departamento and Area is no longer root
|
||||
assert.match(migration, /SET can_be_root=false/);
|
||||
});
|
||||
|
||||
test('Authoritative manual creation keeps Area physical and stores Company plus concession on Yacimiento', () => {
|
||||
test('Historical authoritative endpoint keeps the former Yacimiento Company plus concession contract for compatibility', () => {
|
||||
const structure = source('src/asset-master/inventory-structure.service.ts');
|
||||
const dto = source('src/asset-master/dto/create-inventory-structure.dto.ts');
|
||||
|
||||
@@ -66,27 +66,35 @@ test('F5.1 Finding Catalog defaults to associated findings and exposes all items
|
||||
assert.match(panel, /Esta clasificación todavía no tiene Hallazgos asociados/);
|
||||
});
|
||||
|
||||
test('Authoritative Configuration presents exact physical relationships and technical families', () => {
|
||||
test('F7 Inventory Configuration exposes only simple types, containment and fields', () => {
|
||||
const configPage = source('../web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx');
|
||||
|
||||
assert.match(configPage, /El Área sólo tiene Nombre y pertenece obligatoriamente a un Departamento/);
|
||||
assert.match(configPage, /Tipo de concesión/);
|
||||
assert.match(configPage, /Empresa relacionada/);
|
||||
assert.match(configPage, /Yacimiento → Instalación/);
|
||||
assert.match(configPage, /Instalación → Subinstalación/);
|
||||
assert.match(configPage, /installationFamilies\.map/);
|
||||
assert.match(configPage, /subinstallationFamilies\.map/);
|
||||
assert.match(configPage, /Hallazgos asociados/);
|
||||
assert.match(configPage, /Tipos y campos/);
|
||||
assert.match(configPage, /Departamento → Área → Yacimiento → Instalación → Subinstalación/);
|
||||
assert.match(configPage, /Un Área puede estar vinculada a varias Empresas/);
|
||||
assert.match(configPage, /Cada Yacimiento elige una sola Empresa operadora/);
|
||||
assert.match(configPage, /Tipos de Instalación/);
|
||||
assert.match(configPage, /Tipos de Subinstalación/);
|
||||
assert.match(configPage, /Puede estar dentro de/);
|
||||
assert.match(configPage, /\{ value: 'TEXT', label: 'Texto' \}/);
|
||||
assert.match(configPage, /\{ value: 'NUMBER', label: 'Número' \}/);
|
||||
assert.match(configPage, /\{ value: 'DATE', label: 'Fecha' \}/);
|
||||
assert.match(configPage, /\{ value: 'BOOLEAN', label: 'Sí \/ No' \}/);
|
||||
assert.doesNotMatch(configPage, /Hallazgos asociados/);
|
||||
});
|
||||
|
||||
test('Authoritative Web creation exposes Departamento as root and Yacimiento as operational owner', () => {
|
||||
test('F7 Web creation keeps the fixed hierarchy and asks only the required simple context', () => {
|
||||
const createPage = source('../web-v2/src/pages/InventoryCreatePage.tsx');
|
||||
const configPage = source('../web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx');
|
||||
|
||||
assert.match(createPage, /kind: 'DEPARTAMENTO'/);
|
||||
assert.match(createPage, /AREA:'Departamento'/);
|
||||
assert.match(createPage, /Empresa relacionada/);
|
||||
assert.match(createPage, /Tipo de concesión/);
|
||||
assert.match(createPage, /Datos opcionales/);
|
||||
assert.match(configPage, /<strong>Departamento<\/strong>/);
|
||||
assert.match(configPage, /<strong>Yacimiento<\/strong>/);
|
||||
assert.match(createPage, /AREA: 'Departamento'/);
|
||||
assert.match(createPage, /YACIMIENTO: 'Área'/);
|
||||
assert.match(createPage, /INSTALACION: 'Yacimiento'/);
|
||||
assert.match(createPage, /SUBINSTALACION: 'Instalación'/);
|
||||
assert.match(createPage, /listCompaniesForInventoryArea/);
|
||||
assert.match(createPage, /Empresa operadora/);
|
||||
assert.match(createPage, /ALTA RÁPIDA/);
|
||||
assert.doesNotMatch(createPage, /Tipo de concesión/);
|
||||
assert.match(configPage, /Departamento → Área → Yacimiento → Instalación → Subinstalación/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user