@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / a67c07a
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 17:00 UTC

perf: improve initial page loading and extension script startup (#100)

* docs(phase0): log measured startup bottlenecks and bounded performance task before code * perf(startup): download ordered extension modules concurrently before auth bootstrap * perf(startup): remove optional CDN blocking and bust ordered bootstrap cache * test(phase0): assert concurrent ordered startup and unaffected login when CDN fails * test(startup): include slow-extension/blocked-CDN Chromium gates in Quality * fix(release): retain pinned SRI while making optional spreadsheet loading asynchronous * fix(startup): switch font after load from local JS, avoid inline handlers under strict Pages CSP * fix(startup): enable deferred font after load using CSP-compatible local listener * fix(startup): expose credential-free completion marker after initial session check * test(auth): avoid fake-admin fixture racing accelerated real session initialization * docs(phase0): record verified startup bottleneck, SRI-preserving fix and 89 Chromium passes

davoodmehraban89 committed Oct 12, 2026 at 13:00 UTC a67c07a717bffc2a8ee90c7e3cc9db55c2d05881
7 files changed +124 -8
.github/workflows/quality.yml
+1 -1
@@ -117,7 +117,7 @@ jobs:
117 - name: Real DOM smoke
118 run: |
119 python3 -m http.server 4173 >/tmp/finora-http.log 2>&1 &
120 - npx playwright test scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/branding-login.spec.js scripts/login-connectivity.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/chart-completeness.spec.js scripts/accounting-p0-journal.spec.js scripts/ux-hardening-r2.spec.js scripts/ux-keyboard-f2.spec.js scripts/phase0-dark-theme-contrast.spec.js scripts/phase0-selector-stress.spec.js scripts/phase0-invoice-persistence.spec.js scripts/phase0-modal-dashboard.spec.js scripts/accounting-document-workflow.spec.js scripts/admin-provisioning.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
120 + npx playwright test scripts/phase0-startup-performance.spec.js scripts/dom-smoke.spec.js scripts/platform-office.spec.js scripts/enterprise-license.spec.js scripts/enterprise-role.spec.js scripts/enterprise-invitation.spec.js scripts/enterprise-org-ux.spec.js scripts/identity-wave5a.spec.js scripts/identity-wave5b.spec.js scripts/identity-wave5c.spec.js scripts/branding-login.spec.js scripts/login-connectivity.spec.js scripts/shell-scroll-ownership.spec.js scripts/office-slice-c1.spec.js scripts/office-slice-c2.spec.js scripts/office-slice-c3.spec.js scripts/office-slice-c4.spec.js scripts/office-slice-c5.spec.js scripts/office-slice-c6.spec.js scripts/office-slice-c7.spec.js scripts/office-slice-c8.spec.js scripts/office-slice-c8-runtime.spec.js scripts/request-workflow-d2.spec.js scripts/request-workflow-d3b.spec.js scripts/request-workflow-d3c.spec.js scripts/request-workflow-d4a.spec.js scripts/taxpayer-print.spec.js scripts/chart-completeness.spec.js scripts/accounting-p0-journal.spec.js scripts/ux-hardening-r2.spec.js scripts/ux-keyboard-f2.spec.js scripts/phase0-dark-theme-contrast.spec.js scripts/phase0-selector-stress.spec.js scripts/phase0-invoice-persistence.spec.js scripts/phase0-modal-dashboard.spec.js scripts/accounting-document-workflow.spec.js scripts/admin-provisioning.spec.js scripts/pages-artifact.spec.js --reporter=line --workers=1
121
122 identity-wave5a-database:
123 runs-on: ubuntu-latest
PROJECT_STATE.md
+15
@@ -391,3 +391,18 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
391 - Final PR head `dfc4b21d4e7392d188acfc86b6bc2d7cf8394e3c`: Quality **`38225738789` SUCCESS**, static job `114733039452` **87/87 Chromium PASS (59.2s)**; Golden sale/receipt/purchase/payment/expense/reversal/trial/financial reports PASS; draft/posted safety PASS; three disposable DB jobs SUCCESS. Security `38225738773` SUCCESS. Real Chromium CI observed **107.4ms account, 106.3ms project, 112.5ms contract** synthetic filter latency (sample only, 5-second safety cap, NOT a contractual SLA).
392 - PR #98 squash merged to protected `main` exact SHA **`20cca7e4cf5a411022a30929a513b7cdf2d53779`**. Independent exact-main Quality **`38226518516` SUCCESS**, Security **`38226518662` SUCCESS**, Release Gate **`38226697531` SUCCESS**, gated Pages **`38226717496` SUCCESS**. Duplicate Release `38226696979` cancelled / Pages `38226704861` skipped, correctly not counted.
393 - **Acceptance state:** F0-05 enlarged **CONTROLLED_QA_PASSED / RELEASED QA GATE**; owner actual-workstation/catalog and journal-account-specific high-volume test **NOT OWNER_VERIFIED**, whole **PHASE 0 OPEN**. F0-01/02/03/04/07 real authorization and live data gates remain open; F0-08 historic PR audit complete and four specialist PRs held. Zero runtime application files changed in PR #98; no Auth/RLS/schema/migrations/production financial or identity data altered. Rollback test-only PR; no customer data rollback required. Next: owner browser/safe-invoice acceptance or separately bounded read-only #58 migration-drift audit; do not begin Phase 1 signoff prematurely.
394 +
395 +
396 +## 2026-10-12 Owner-reported Finora slow startup / Phase 0 loading performance — IN PROGRESS
397 +- **Owner request:** Live Finora takes unacceptably long to open and become usable. Diagnose real startup critical path, implement bounded performance fix, independently QA/ship; continue approved Phase 0 without declaring unfinished user-authenticated gates accepted.
398 +- **Baseline:** protected main `61cbcf3113c598022d6877e447bf8c97b4788a19`. Read AGENTS and complete PROJECT_STATE, `index.html`, `js/bootstrap.js`, `js/core.js` and `js/sync.js`. Current index declares approximately 40 non-deferred app script tags and an **external parser-blocking SheetJS CDN bundle** and external Vazirmatn CSS; `js/bootstrap.js` on DOMContentLoaded **awaits 14 script insertions sequentially** before calling `initAuthSystem()`, so network round trips delay both login panel and session restoration. For logged-in users `enterApp()` additionally awaits `fetchCurrentUser()` and **sequential paginated `pullAll()` of every collection** before rendering; not authorized to change that financial data/consistency path without separate tests.
399 +- **Bounded fix:** preserve exact extension order and Auth timing dependency, use ordered **parallel download** for dynamic extension scripts through `script.async=false` before append, await all settled only after ordered execution, and make optional Excel CDN non-parser-blocking (without breaking export/import or replacing it). Capture read-only site/CDN response timings where available. Add deterministic real Chromium startup network test simulating high-latency extension downloads, proving serial-vs-parallel critical path, exact dependency order, once-only Auth after all scripts and graceful error under blocked CDN. Ensure no actual account/tenant data is read, no altered Auth/RLS/roles, schema/ledger, no test account creation, no unapproved data migration.
400 +- **QA and release:** preserve fallback if an extension asset fails, maintain existing Quality/Golden/Playwright and Security gates, merge reviewed PR only with verified checks, confirm protected-main CI and published assets. Capture cold-start comparative behavior with synthetic throttled requests; no claim of owner ISP metric without actual owner-machine browser timings.
401 +- **Owner-visible progress:** Phase 0 OPEN. F0-01 affected-ISP sign-in, F0-02 real tenant catalog, F0-03 safe persistence, F0-04 physical print, F0-07 two-user access checks remain unverified; do not mark them passed. Rollback: revert this narrowly scoped PR and gated Pages redeploy, no data rollback.
402 +
403 +
404 +### 2026-10-12 Phase 0 startup speed correction — PR controlled browser QA PASS / PRODUCTION RELEASE PENDING
405 +- Investigated owner-reported cold-start delay from actual protected-main sources and authorized remote read-only Windows HTTP probes: `https://factoreasy.ir/` **HTTP 200 ~1.616s**, representative extension **HTTP 200 ~0.477s**, optional CDN SheetJS **HTTP 200 ~2.663s** (one measurement each; not full user-browser timings). Source `js/bootstrap.js` previously waited for **14 individual network-loaded extension modules serially** *before* calling `initAuthSystem`; `index.html` contained parser-blocking third-party XLSX script and CSS. Assets across `js/` total ~0.75 MiB (55 scripts); network round-trip waterfall is a demonstrated structural issue. Authenticated `pullAll()` still uses sequential pages for full tenant data, and its latency on the owner's ISP is **not measured**.
406 +- Fixed in [PR #100](https://github.com/davoodmehraban89/Factor-easy/pull/100): classic extension scripts now append concurrently with `async=false` set before injection (preserves execution/dependencies), wait `Promise.allSettled` before session check; credential-free `window.FinoraStartupStatus` records only extension count/failure count/load time and `authChecked`. Optional Excel CDN loads `async`; external font CSS loads nonblocking with CSP-compatible local listener and Tahoma fallback. `scripts/build-pages.mjs` continues to replace SheetJS with the pre-existing **pinned SRI** cdnjs equivalent and strict CSP, now carrying `async`; no security gate relaxation. Existing admin fake-user browser test now waits for `authChecked` before its fixture, eliminating race from faster real initialization; no user-auth data accessed.
407 +- New `scripts/phase0-startup-performance.spec.js` has two real Chromium cases: artificial **170ms per extension** latency checks all **14 requested in parallel** and ordered bootstrap still shows login; unavailable third-party Excel/font does not prevent auth screen and Excel guard remains. Exact tested PR head `278bda0836aa650d5cf1d96611e4001097433131`: **Quality `38229232737` SUCCESS**, static job **89/89 Playwright Chromium PASS (48.6s)**, extension dispatch spread **5ms** in synthetic slowed network, all 3 disposable DB jobs PASS, Golden accounting and draft/posted safety PASS, 55 JS/52 MJS syntax PASS; **Security `38229232632` SUCCESS**, SRI/CSP release-safety and CodeQL. The earlier initial PR head Security `38228347152` failed on SRI release-builder detection; corrected builder preserved SRI. Initial browser run `38228617932` had exactly one test fixture auth-initialization race (88/89; not published); corrected and rerun fully green.
408 +- **Current classification:** IMPLEMENTED / PR-HEAD_CONTROLLED_QA_PASSED; protected-main merge/Quality/Security/Release/Pages/published-asset verification **PENDING**. F0-01 affected ISP login and owner-specific post-login latency still **UNVERIFIED**, Phase 0 remains OPEN. No Supabase/Auth/RLS/roles/schema, production user, financial ledger, stored records, login permissions or external accounts modified. Rollback PR and gated Pages.
index.html
+3 -3
@@ -14,8 +14,8 @@
14 <meta name="apple-mobile-web-app-capable" content="yes" />
15 <meta name="theme-color" content="#071a48" />
16 <script src="vendor/supabase.js"></script>
17 -<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
18 -<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css" />
17 +<script async src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
18 +<link id="finora-optional-font" rel="stylesheet" media="print" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css" />
19 <style>
20 :root{--primary:#2563eb;--primary-hover:#1d4ed8;--bg:#f8fafc;--card-bg:#fff;--text:#0f172a;--text-muted:#64748b;--border:#cbd5e1;--danger:#dc2626;--success:#059669;--warning:#d97706;--sidebar-w:240px;--nav-h:70px}
21 html,body{width:100%;max-width:100%;overflow-x:hidden!important;position:relative}
@@ -901,7 +901,7 @@ body{background:#f6f9fc}
901 <script src="js/companies.js?v=20260928-integrity-v4"></script>
902 <script src="js/backup.js?v=20260928-data-v3"></script>
903 <script src="js/words.js"></script>
904 -<script src="js/bootstrap.js"></script>
904 +<script src="js/bootstrap.js?v=20261012-startup-parallel-v1"></script>
905
906 <style>
907 .form-control, textarea, select { direction: rtl; }
js/bootstrap.js
+55 -2
@@ -1,2 +1,55 @@
1 -function finoraLoadScript(src){return new Promise((resolve,reject)=>{const s=document.createElement('script');s.src=src;s.onload=resolve;s.onerror=()=>reject(new Error('Failed to load '+src));document.head.appendChild(s)})}
2 -window.addEventListener('DOMContentLoaded',async()=>{try{await finoraLoadScript('js/organization-rbac.js?v=20260930-slice-b-v1');await finoraLoadScript('js/organization-invitations.js?v=20260930-eli3-v1');await finoraLoadScript('js/organization-enterprise-ux.js?v=20260930-eli4-v1');await finoraLoadScript('js/platform-modules.js?v=20261001-platform-c6-v1');await finoraLoadScript('js/office-automation.js?v=20260930-c4-v1');await finoraLoadScript('js/request-workflow-d2.js?v=20261001-d2-v1');await finoraLoadScript('js/request-workflow-d3b.js?v=20261001-d3b-v1');await finoraLoadScript('js/request-workflow-d3c.js?v=20261001-d3c-v1');await finoraLoadScript('js/request-workflow-d4a.js?v=20261002-d4a-v1');await finoraLoadScript('js/office-rbac.js?v=20260930-slice-b-v1');await finoraLoadScript('js/office-mature.js?v=20261001-c7-v2');await finoraLoadScript('js/office-workflow.js?v=20261001-c8-task3-v3');await finoraLoadScript('js/organization-shell.js?v=20260930-eli4-v1');await finoraLoadScript('js/taxpayer-print.js?v=20261003-reference-v2')}catch(e){console.error('Finora platform extension load failed',e)}if(!currentUser)initAuthSystem();});
1 +// Phase 0 startup: download extension modules concurrently, execute in original order.
2 +// Dynamically inserted classic scripts need async=false BEFORE they are connected:
3 +// browsers may download in parallel but preserve script execution/dependencies.
4 +// Auth starts only once all extensions have finished loading or failed.
5 +const FINORA_EXTENSION_SCRIPTS=[
6 + "js/organization-rbac.js?v=20260930-slice-b-v1",
7 + "js/organization-invitations.js?v=20260930-eli3-v1",
8 + "js/organization-enterprise-ux.js?v=20260930-eli4-v1",
9 + "js/platform-modules.js?v=20261001-platform-c6-v1",
10 + "js/office-automation.js?v=20260930-c4-v1",
11 + "js/request-workflow-d2.js?v=20261001-d2-v1",
12 + "js/request-workflow-d3b.js?v=20261001-d3b-v1",
13 + "js/request-workflow-d3c.js?v=20261001-d3c-v1",
14 + "js/request-workflow-d4a.js?v=20261002-d4a-v1",
15 + "js/office-rbac.js?v=20260930-slice-b-v1",
16 + "js/office-mature.js?v=20261001-c7-v2",
17 + "js/office-workflow.js?v=20261001-c8-task3-v3",
18 + "js/organization-shell.js?v=20260930-eli4-v1",
19 + "js/taxpayer-print.js?v=20261003-reference-v2"
20 +];
21 +function finoraLoadScript(src){
22 + return new Promise((resolve,reject)=>{
23 + const script=document.createElement('script');
24 + script.async=false;
25 + script.src=src;
26 + script.onload=()=>resolve(src);
27 + script.onerror=()=>reject(new Error('Failed to load '+src));
28 + document.head.appendChild(script);
29 + });
30 +}
31 +// Optional remote font must never block authentication or application scripts.
32 +// This handler is installed from a local JS file because Pages strips inline
33 +// HTML event handlers under its strict CSP. Tahoma remains a usable fallback.
34 +const finoraFontLink=document.getElementById('finora-optional-font');
35 +if(finoraFontLink){
36 + const applyFont=()=>{finoraFontLink.media='all'};
37 + finoraFontLink.addEventListener('load',applyFont,{once:true});
38 + if(finoraFontLink.sheet)applyFont();
39 +}
40 +window.addEventListener('DOMContentLoaded',async()=>{
41 + const started=performance.now();
42 + const results=await Promise.allSettled(FINORA_EXTENSION_SCRIPTS.map(finoraLoadScript));
43 + const failed=results.flatMap((r,i)=>r.status==='rejected'?[FINORA_EXTENSION_SCRIPTS[i]]:[]);
44 + window.FinoraStartupStatus={
45 + extensionCount:FINORA_EXTENSION_SCRIPTS.length,
46 + failedExtensionCount:failed.length,
47 + extensionLoadMs:Math.round(performance.now()-started)
48 + };
49 + if(failed.length)console.error('Finora platform extension assets unavailable:',failed);
50 + // Never start a restored user session against half-loaded application modules.
51 + if(!currentUser)await initAuthSystem();
52 + // UI fixtures and diagnostics may now wait for the completed session check.
53 + // This flag contains no session/identity information.
54 + window.FinoraStartupStatus.authChecked=true;
55 +});
scripts/admin-provisioning.spec.js
+3
@@ -2,6 +2,7 @@ const {test,expect}=require('@playwright/test');
2 const BASE=process.env.FINORA_TEST_BASE_URL||'http://127.0.0.1:4173/index.html';
3 test('central administrator provisions account via server-only endpoint, with no prior signup',async({page})=>{
4 await page.goto(BASE,{waitUntil:'domcontentloaded'});
5 + await page.waitForFunction(()=>window.FinoraStartupStatus?.authChecked===true);
6 await page.evaluate(()=>{document.getElementById('auth-screen').style.display='none';});
7 await page.waitForFunction(()=>typeof adminOpenCreateUser==='function'&&typeof adminCreateUser==='function');
8 await page.evaluate(()=>{
@@ -30,6 +31,7 @@ test('central administrator provisions account via server-only endpoint, with no
31 });
32 test('invalid email/weak password are rejected client-side without invoking server',async({page})=>{
33 await page.goto(BASE,{waitUntil:'domcontentloaded'});
34 + await page.waitForFunction(()=>window.FinoraStartupStatus?.authChecked===true);
35 await page.evaluate(()=>{document.getElementById('auth-screen').style.display='none';});
36 await page.evaluate(()=>{
37 currentUser={id:'OWNER_QA',role:'admin'};
@@ -51,6 +53,7 @@ test('invalid email/weak password are rejected client-side without invoking serv
53
54 test('server-side provisioning 400 shows actionable safe Persian reason without leaking raw HTTP error',async({page})=>{
55 await page.goto(BASE,{waitUntil:'domcontentloaded'});
56 + await page.waitForFunction(()=>window.FinoraStartupStatus?.authChecked===true);
57 await page.evaluate(()=>{
58 currentUser={id:'OWNER_QA',role:'admin'};
59 document.getElementById('auth-screen').style.display='none';
scripts/build-pages.mjs
+2 -2
@@ -46,8 +46,8 @@ html=html.replace(/\s(on[a-z]+)="([^"]*)"/gi,(_,attr,body)=>{
46 });
47
48 html=html.replace(
49 - /<script\s+src="https:\/\/cdn\.jsdelivr\.net\/npm\/xlsx@0\.18\.5\/dist\/xlsx\.full\.min\.js"><\/script>/i,
50 - '<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js" integrity="sha512-r22gChDnGvBylk90+2e/ycr3RVrDi8DIOkIGNhJlKfuyQM4tIRAI062MaV8sfjQKYVGjOBaZBOA87z+IhZE9DA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>'
49 + /<script(?:\s+async)?\s+src="https:\/\/cdn\.jsdelivr\.net\/npm\/xlsx@0\.18\.5\/dist\/xlsx\.full\.min\.js"><\/script>/i,
50 + '<script async src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js" integrity="sha512-r22gChDnGvBylk90+2e/ycr3RVrDi8DIOkIGNhJlKfuyQM4tIRAI062MaV8sfjQKYVGjOBaZBOA87z+IhZE9DA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>'
51 );
52 html=html.replace(/script-src[^;]*/i,"script-src 'self' https://cdnjs.cloudflare.com");
53 // frame-ancestors is ignored in meta-delivered CSP and generates a browser error;
scripts/phase0-startup-performance.spec.js new
+45
@@ -0,0 +1,45 @@
1 +// Phase 0 startup performance: never load a real owner session or read customer data.
2 +const {test,expect}=require('@playwright/test');
3 +const BASE=process.env.FINORA_TEST_BASE_URL||'http://127.0.0.1:4173/index.html';
4 +const EXTENSIONS=[
5 + 'organization-rbac.js','organization-invitations.js','organization-enterprise-ux.js',
6 + 'platform-modules.js','office-automation.js','request-workflow-d2.js',
7 + 'request-workflow-d3b.js','request-workflow-d3c.js','request-workflow-d4a.js',
8 + 'office-rbac.js','office-mature.js','office-workflow.js',
9 + 'organization-shell.js','taxpayer-print.js'
10 +];
11 +
12 +test('F0 startup downloads ordered extension scripts concurrently and still initializes login',async({page})=>{
13 + const started=[];
14 + // Simulate an affected ISP where each file has its own network round trip.
15 + await page.route('**/js/**',async route=>{
16 + const name=new URL(route.request().url()).pathname.split('/').pop();
17 + if(!EXTENSIONS.includes(name)){await route.continue();return;}
18 + started.push({name,ms:Date.now()});
19 + await new Promise(resolve=>setTimeout(resolve,170));
20 + await route.continue();
21 + });
22 + // A failed optional third-party spreadsheet/font CDN must not hold up login.
23 + await page.route('https://cdn.jsdelivr.net/**',route=>route.abort());
24 + await page.goto(BASE,{waitUntil:'domcontentloaded'});
25 + await expect.poll(()=>page.evaluate(()=>window.FinoraStartupStatus?.extensionCount),{timeout:15000}).toBe(14);
26 + const state=await page.evaluate(()=>window.FinoraStartupStatus);
27 + expect(state.failedExtensionCount,'No local extension should fail to load').toBe(0);
28 + expect(started.map(x=>x.name).sort()).toEqual(EXTENSIONS.slice().sort());
29 + const arrivalWindow=Math.max(...started.map(x=>x.ms))-Math.min(...started.map(x=>x.ms));
30 + console.info('F0 startup extension dispatch spread browser ms:',arrivalWindow);
31 + // Old waterfall loads 14 x 170ms sequentially; parallel dispatch is bounded.
32 + expect(arrivalWindow,'extension network requests should overlap').toBeLessThan(1200);
33 + await expect(page.locator('#auth-screen')).toBeVisible();
34 + expect(await page.evaluate(()=>typeof window.finoraLoadScript)).toBe('function');
35 + expect(await page.evaluate(()=>typeof XLSX)).toBe('undefined');
36 +});
37 +
38 +test('F0 startup is independent of optional spreadsheet CDN and keeps on-demand Excel guard',async({page})=>{
39 + await page.route('https://cdn.jsdelivr.net/**',route=>route.abort());
40 + await page.goto(BASE,{waitUntil:'domcontentloaded'});
41 + await expect.poll(()=>page.evaluate(()=>window.FinoraStartupStatus?.extensionCount),{timeout:15000}).toBe(14);
42 + await expect(page.locator('#auth-screen')).toBeVisible();
43 + expect(await page.evaluate(()=>typeof window.finoraDownloadConfiguredTemplate)).toBe('function');
44 + expect(await page.evaluate(()=>typeof window.XLSX)).toBe('undefined');
45 +});