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

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

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

Synced Dec 3, 22:00 UTC

test: expose mocked admin-provision result for initial authorization diagnosis

davoodmehraban89 committed Oct 11, 2026 at 20:19 UTC 40235ccde48900338d3e393e2da5bbf49377c7e9
1 file changed +1
scripts/admin-provisioning.spec.js
+1
@@ -20,6 +20,7 @@ test('central administrator provisions account via server-only endpoint, with no
20 await page.locator('#admin-new-username').fill('sample.user');
21 await page.locator('#admin-new-password').fill('VeryStrong!Password12');
22 await page.locator('#admin-create-submit').click();
23 + console.log('PROVISION_DEBUG',await page.evaluate(()=>({status:document.getElementById('admin-create-status').textContent,role:currentUser?.role,calls:window.__adminCalls.length,pw:!!document.getElementById('admin-new-password').value,overlay:document.getElementById('modal-admin-create-user').className})));
24 await expect(page.locator('#modal-admin-create-user')).not.toHaveClass(/active/);
25 const result=await page.evaluate(()=>({calls:window.__adminCalls,cleared:document.getElementById('admin-new-password').value}));
26 expect(result.calls).toHaveLength(1);