feat(nexxa-web): dashboard con estados AHORA y últimas 24 h, Registro filtrable y estado en palabras desde el servidor (P337/F2)
Tests ADN / test (push) Canceled after 0s
Tests ADN / test (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: GEMMA <noreply@gemma.dtic>
This commit is contained in:
co-authored by
Claude Opus 5.5
GEMMA
parent
82e56aad0e
commit
9af0de60d1
@@ -28,7 +28,7 @@ module ServidorPrueba
|
||||
%w[lib_cripto lib_registro lib_tokens lib_auth lib_pools].each { |f| require File.join(org, f) }
|
||||
Nexxa::MasterKey.generar_si_falta!
|
||||
KEYS.each do |p, i|
|
||||
Nexxa::Registro.registrar(provider: p, identificador: i, cuenta_origen: 'prueba', reset_segundos: 86_400, valor: "falso-#{i}")
|
||||
Nexxa::Registro.registrar(provider: p, identificador: i, cuenta_origen: 'prueba', reset_segundos: 86_400, valor: "falso-#{i}", por: 'prueba')
|
||||
end
|
||||
USUARIOS.each { |u, (pw, perfil)| Nexxa::Auth.crear_usuario(usuario: u, password: pw, perfil: perfil) }
|
||||
tokens = individuos.to_h { |ind| [ind, Nexxa::Tokens.generar(ind)] }
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"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')"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user