mirror of
https://github.com/mileswolfallen2/miles-web.git
synced 2026-12-04 15:57:47 +00:00
Add comprehensive test suite for application functionality
- Implement tests for HTTP API endpoints, ensuring correct responses and security headers. - Create configuration tests to validate loading of defaults and environment overrides. - Add tests for FEDL service to verify data handling and snapshot functionality. - Introduce GitHub service tests to check API data normalization and caching behavior. - Develop monitor service tests for network checks and uptime calculations. - Implement persistence tests to ensure database migrations are idempotent and data persists across restarts. - Add vault service tests for session management and brute-force protection mechanisms. - Include helper functions for test context creation and JSON response handling.
This commit is contained in:
1 parent
84b7a7e302
commit
c250653961
55 files changed
+8174
-226
No files matched your search
+13
-1
@@ -255,7 +255,8 @@
|
||||
|
||||
const hasSaved = localStorage.getItem('theme') !== null;
|
||||
applyTheme(currentTheme());
|
||||
if (!hasSaved) setTimeout(openPicker, 400);
|
||||
const autoPicker = !document.body.hasAttribute('data-no-design-picker');
|
||||
if (!hasSaved && autoPicker) setTimeout(openPicker, 400);
|
||||
|
||||
const btn = document.getElementById('themeToggle');
|
||||
if (btn) btn.addEventListener('click', openPicker);
|
||||
@@ -299,3 +300,14 @@
|
||||
});
|
||||
})();
|
||||
})();
|
||||
|
||||
/* Analytics beacon loader (privacy-friendly, same-origin backend). */
|
||||
(function () {
|
||||
if (window.__milesAnalyticsLoader) return;
|
||||
window.__milesAnalyticsLoader = true;
|
||||
if (window.location.protocol !== 'http:' && window.location.protocol !== 'https:') return;
|
||||
var script = document.createElement('script');
|
||||
script.src = '/analytics.js';
|
||||
script.defer = true;
|
||||
document.head.appendChild(script);
|
||||
})();
|
||||
Reference in new issue
Block a user