@davoodmehraban89 / Factor-easy / commits / 1858d1a
Fork 0

سامانه صدور فاکتور و حسابداری

test(login): enforce early production handlers and safe stalled-session fallback

davoodmehraban89 committed Oct 12, 2026 at 20:32 UTC 1858d1a90170f5adf3d51be32f5a1064af6bde1d
1 file changed +4 -1
scripts/login-connectivity-check.mjs
+4 -1
@@ -7,10 +7,13 @@ assert(html.includes('id="auth-connectivity-check"'),'Missing diagnostic action'
7 assert(html.includes('id="auth-connectivity-result"'),'Missing accessible result');
8 assert(html.includes('id="auth-connectivity-result" aria-live="polite"'),'Diagnostic must announce updates without adding a conflicting global role=status');
9 assert(html.includes('js/login-connectivity.js?v=20261011-login-triage-v1'),'Missing versioned script');
10 -assert(html.includes('js/core.js?v=20261012-login-ready-v2'),'New login core must have a distinct production cache version');
10 +assert(html.includes('js/core.js?v=20261012-login-wiring-v3'),'Production login controls must use new cache version');
11 +assert(html.indexOf('js/login-connectivity.js?v=20261011-login-triage-v1')<html.indexOf('js/core.js?v=20261012-login-wiring-v3'),'Connectivity handler must be defined before controls are enabled');
12 assert(html.includes('js/bootstrap.js?v=20261012-login-ready-v2'),'Parallel bootstrap must also be cache-busted');
13 assert(html.includes('id="auth-login-button"')&&html.includes('id="auth-login-status"'),'Login control requires real readiness/progress feedback');
14 assert(core.includes('window.FinoraAppAssetsReady'),'Authenticated workspace must remain gated until all module scripts settle');
15 +assert(core.includes('FinoraLoginActionsBound'),'Production CSP action readiness must require installed event listeners');
16 +assert(core.includes('FINORA_LOGIN_READ_TIMEOUT'),'Restored-session reads must have bounded wait and visible fallback');
17 assert(core.includes('isAuthNetworkError(err)'),'Network error diagnostic not wired');
18 assert(!core.includes('اتصال اینترنت/VPN را بررسی کنید'),'Misleading VPN-only error text remains');
19 assert(diagnostic.includes("'/auth/v1/health'"),'Must test the real GoTrue health path');