-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-alerts.html
More file actions
46 lines (41 loc) · 1.77 KB
/
test-alerts.html
File metadata and controls
46 lines (41 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Alertas</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="assets/alerts.css">
</head>
<body class="p-5">
<h1>Test de Sistema de Alertas</h1>
<p>Si puedes ver este contenido, el HTML se está cargando correctamente.</p>
<button class="btn btn-primary" onclick="testAlert()">Probar Alerta</button>
<div id="alertsContainer" class="alerts-container"></div>
<script src="assets/alerts.js"></script>
<script>
console.log('Test HTML cargado');
console.log('AlertSystem disponible:', !!window.AlertSystem);
function testAlert() {
console.log('Botón presionado');
if (window.AlertSystem) {
console.log('AlertSystem existe, mostrando alerta...');
window.AlertSystem.notify('Esto es una prueba', 'success', 'Test');
} else {
console.error('AlertSystem NO está disponible');
alert('ERROR: AlertSystem no está disponible');
}
}
// auto-test después de 1 segundo
setTimeout(() => {
console.log('Auto-test iniciando...');
if (window.AlertSystem) {
window.AlertSystem.notify('Auto-test ejecutado correctamente', 'info', 'Auto-test');
} else {
console.error('Auto-test falló: AlertSystem no disponible');
}
}, 1000);
</script>
</body>
</html>