@davoodmehraban89 / Factor-easy / commits / 3f14443
Fork 0

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

test: wait for organization adapter before installing mocked financial login

davoodmehraban89 committed Oct 15, 2026 at 22:03 UTC 3f14443c3576f031d40307ba18a2587fb4f2e501
1 file changed +5
scripts/accounting-document-workflow.spec.js
+5
@@ -36,6 +36,11 @@ async function installHarness(page,server){
36 async function authenticatedMockBrowser(page){
37 await page.goto(BASE,{waitUntil:'domcontentloaded'});
38 await page.waitForFunction(()=>typeof enterApp==='function'&&typeof commitSaveInvoice==='function'&&typeof pullAll==='function');
39 + // Do not install synthetic fetchCurrentUser while organization-rbac.js may still
40 + // replace it. This fixture tests FINANCIAL accounting behavior, not early login;
41 + // the dedicated Phase 0 boot tests cover startup races independently.
42 + await page.waitForFunction(()=>window.FinoraStartupStatus?.extensionsReady===true&&
43 + window.FinoraStartupStatus?.failedExtensionCount===0,null,{timeout:20000});
44 await page.evaluate(async()=>{
45 window.__FINORA_PRINT_TEST_MODE=true;
46 window.__f0Alerts=[];