سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 20:45 UTC
Add failing ELI-4 enterprise organization UX coverage
davoodmehraban89 committed
Sep 30, 2026 at 09:02 UTC
ee091bd73f47c963b8299c432314fcf700fe290d
2 files changed
+15
-1
.github/workflows/quality.yml
+1
-1
@@ -55,4 +55,4 @@ jobs:
55
- name: Real DOM smoke
56
run: |
57
python3 -m http.server 4173 >/tmp/finora-http.log 2>&1 &
58
- 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 --reporter=line --workers=1
58
+ 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 --reporter=line --workers=1
scripts/enterprise-org-ux.spec.js
new
+14
@@ -0,0 +1,14 @@
1
+const {test,expect}=require('@playwright/test');
2
+
3
+test('ELI-4 enterprise organization UX exposes typed tree and capacity dashboard',async({page})=>{
4
+ const errs=[];page.on('pageerror',e=>errs.push(String(e)));
5
+ await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
6
+ await page.waitForFunction(()=>typeof window.finoraCanManageOrganization==='function');
7
+ expect(await page.evaluate(()=>typeof window.renderEnterpriseOrganizationTree)).toBe('function');
8
+ expect(await page.evaluate(()=>typeof window.refreshEnterpriseOrganizationDashboard)).toBe('function');
9
+ expect(await page.evaluate(()=>{
10
+ currentUser={id:'module-admin',isOrganizationOwner:false,modulePermissions:[{module_key:'accounting',capabilities:['configure']}],commercialModules:['accounting']};
11
+ return finoraCanManageOrganization();
12
+ })).toBe(false);
13
+ expect(errs.filter(x=>!x.includes('ResizeObserver'))).toEqual([]);
14
+});