Files
dtic-DIIAA/servicios/nexxa/test/ui/04_dashboard_y_registro.json
T
2026-10-05 03:45:46 -03:00

70 lines
2.5 KiB
JSON

{
"nombre": "Dashboard con estados AHORA y últimas 24 h, Por key y Registro filtrable (P337/Fase 2), solo lectura",
"produccion": true,
"acciones": [
{
"tipo": "click",
"selector": "button[data-section=dashboard]"
},
{
"tipo": "esperar",
"segundos": 2
},
{
"tipo": "js",
"retorna": true,
"espera": "^6 estados con [1-9]\\d* keys; [45] contadores 24 h$",
"codigo": "var s=document.querySelectorAll('#stats-ahora .stat'); var n=0; s.forEach(function(x){n+=parseInt(x.querySelector('.stat-value').textContent,10)}); return s.length+' estados con '+n+' keys; '+document.querySelectorAll('#stats-24h .stat').length+' contadores 24 h'"
},
{
"tipo": "js",
"retorna": true,
"espera": "^por key [1-9]\\d*$",
"codigo": "return 'por key '+document.querySelectorAll('#por-key tbody tr').length"
},
{
"tipo": "js",
"retorna": true,
"espera": "^textos ok$",
"codigo": "var crudos=Array.prototype.filter.call(document.querySelectorAll('#actividad-lista tbody td:nth-child(3)'),function(x){return /\\s(dispensada|liberada|pausada|renovada|agotada)$/.test(x.textContent)}); return crudos.length?'crudos: '+crudos[0].textContent:'textos ok'"
},
{
"tipo": "captura",
"destino": "/home/rmonla/Documentos/GitHub/dtic-GEMMA/_temp/p337/ui_dashboard.png"
},
{
"tipo": "click",
"selector": "[data-ir-registro]"
},
{
"tipo": "esperar",
"segundos": 2
},
{
"tipo": "js",
"retorna": true,
"espera": "^Registro: [1-9]\\d* fila\\(s\\)$",
"codigo": "return document.getElementById('page-title').textContent+': '+document.querySelectorAll('#registro-lista tbody tr').length+' fila(s)'"
},
{
"tipo": "captura",
"destino": "/home/rmonla/Documentos/GitHub/dtic-GEMMA/_temp/p337/ui_registro.png"
},
{
"tipo": "js",
"retorna": true,
"espera": "^filtro [a-z-]+$",
"codigo": "var t=document.querySelector('#registro-lista tbody tr td:nth-child(3)').textContent; var sel=document.getElementById('reg-evento'); var o=Array.prototype.find.call(sel.options,function(x){return x.text===t}); sel.value=o.value; sel.dispatchEvent(new Event('change')); return 'filtro '+o.value"
},
{
"tipo": "esperar",
"segundos": 2
},
{
"tipo": "js",
"retorna": true,
"espera": "^filtrado [1-9]\\d* todas iguales$",
"codigo": "var c=Array.prototype.map.call(document.querySelectorAll('#registro-lista tbody tr td:nth-child(3)'),function(x){return x.textContent}); return 'filtrado '+c.length+(c.every(function(x){return x===c[0]})?' todas iguales':' mezcladas')"
}
]
}