Tests ADN / test (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: GEMMA <noreply@gemma.dtic>
64 lines
2.2 KiB
JSON
64 lines
2.2 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; 4 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": "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')"
|
|
}
|
|
]
|
|
} |