سامانه صدور فاکتور و حسابداری
test: retire legacy request builder DOM assertion
davoodmehraban89 committed
Oct 1, 2026 at 22:36 UTC
2d73cbe0d8129b7c4e77644149cffcc7af9699fd
1 file changed
+1
-2
scripts/platform-office.spec.js
+1
-2
@@ -1,6 +1,6 @@
1
const {test,expect}=require('@playwright/test');
2
3
-test('modular launcher, office and request builder render from licensed modules',async({page})=>{
3
+test('modular launcher and office surfaces render from licensed modules',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(()=>window.FINORA_MODULE_CATALOG&&typeof window.officeRender==='function'&&typeof window.requestsRender==='function');
@@ -9,7 +9,6 @@ test('modular launcher, office and request builder render from licensed modules'
9
expect(await page.evaluate(()=>hasLicensedModule('office_automation'))).toBe(true);expect(await page.evaluate(()=>hasLicensedModule('accounting'))).toBe(false);
10
await page.evaluate(()=>{switchView('view-office');officeRender('registries')});await expect(page.locator('#view-office')).toContainText('دفاتر دبیرخانه و شمارهگذاری');await expect(page.locator('#view-office')).toContainText('اتمیک');
11
await page.evaluate(()=>{switchView('view-office');officeRender('new')});await expect(page.locator('#office-files')).toHaveAttribute('accept',/application\/pdf/);await expect(page.locator('#view-office')).toContainText('OCR-ready');
12
- await page.evaluate(()=>{switchView('view-requests');requestsRender('types');addRequestField()});await expect(page.locator('#request-field-builder input.form-control')).toHaveCount(1);await expect(page.locator('#view-requests')).toContainText('فرمساز');
12
await page.evaluate(()=>{adminUsersCache=[{id:'platform-smoke',email:'platform@example.test',role:'admin',lic:{plan:'lifetime',status:'active',starts_at:'2026-01-01',ends_at:'2099-01-01',max_companies:1,modules:['office_automation','requests_workflow']}}];openLicenseEditModal('platform-smoke')});await expect(page.locator('#modal-license-modules')).toContainText('لایسنس کامل ERP');await expect(page.locator('#license-module-grid input[value="transport"]')).toBeDisabled();await expect(page.locator('#license-module-grid input[value="office_automation"]')).toBeChecked();
13
expect(errs.filter(x=>!x.includes('ResizeObserver'))).toEqual([]);
14
});