fix(maintenance): auto-expiry + adaptive markdown height + tests
- Auto-expiry: expired events auto-end on GET /events via task manager - Height: _estimate_markdown_height adapted to unit=8px scale with padding detection - CRITICAL-1: removed dead import remove_chart_from_position (QA finding) - CRITICAL-2: added chart alive check in ensure_banner_chart (QA finding) - CRITICAL-3: fixed test assertions update_markdown_chart → update_banner_on_dashboard - @POST contract: fixed return range [2,12] → [19,200] - Tests: 8 new tests (auto-expiry + layout height)
This commit is contained in:
@@ -11,13 +11,16 @@ const FRONTEND_URL = process.env.FRONTEND_URL || 'http://127.0.0.1:8102';
|
||||
async function globalSetup() {
|
||||
console.log(`[E2E] Pre-flight check — Backend: ${BACKEND_URL}, Frontend: ${FRONTEND_URL}`);
|
||||
|
||||
// 1. Check backend health
|
||||
// 1. Check backend health (accept 401/403 as "server is alive but needs auth")
|
||||
try {
|
||||
const healthRes = await fetch(`${BACKEND_URL}/api/health/summary`);
|
||||
if (!healthRes.ok) {
|
||||
if (healthRes.ok) {
|
||||
console.log('[E2E] Backend is healthy ✅');
|
||||
} else if (healthRes.status === 401 || healthRes.status === 403) {
|
||||
console.log(`[E2E] Backend is alive (HTTP ${healthRes.status} — auth required) ✅`);
|
||||
} else {
|
||||
throw new Error(`Backend health check failed: ${healthRes.status}`);
|
||||
}
|
||||
console.log('[E2E] Backend is healthy ✅');
|
||||
} catch (err) {
|
||||
console.error(`[E2E] Backend unreachable: ${err.message}`);
|
||||
console.error('[E2E] Make sure the stack is running: docker compose up -d');
|
||||
|
||||
Reference in New Issue
Block a user