@davoodmehraban89 / Factor-easy / commits / d150589
Fork 0

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

test(phase0): emit reproducible browser-side selector latency evidence

davoodmehraban89 committed Oct 12, 2026 at 07:44 UTC d15058959c5a8a50766bdf150b8354c9e9060275
1 file changed +2
scripts/phase0-selector-stress.spec.js
+2
@@ -20,6 +20,7 @@ test('F0-05 products: 1208 choices, Persian variants, keyboard and cross-tenant
20 const list=page.locator('body > .finora-combobox-list');
21 await expect(list.locator('[role="option"]')).toHaveCount(1208);
22 const elapsed=await page.evaluate(()=>{const e=document.querySelector('#stress-products').parentElement.querySelector('input');const t=performance.now();e.value='کالا آزمایشی شماره 1204';e.dispatchEvent(new Event('input',{bubbles:true}));return performance.now()-t});
23 + console.info('F0-05 product filter browser ms:',elapsed.toFixed(1));
24 expect(elapsed,'product filter took '+elapsed.toFixed(0)+'ms').toBeLessThan(5000);
25 await expect(list.locator('[role="option"]')).toHaveCount(1);
26 await expect(list).toContainText('1204');
@@ -47,6 +48,7 @@ test('F0-05 people: 1206 choices and 11-digit metadata filter with no implicit w
48 const list=page.locator('#invoice-contact-id').locator('xpath=..').locator('.finora-combobox-list');
49 await expect(list.locator('[role="option"]')).toHaveCount(1206);
50 const elapsed=await page.evaluate(()=>{const e=document.querySelector('#invoice-contact-id').parentElement.querySelector('input');const t=performance.now();e.value='09120009999';e.dispatchEvent(new Event('input',{bubbles:true}));return performance.now()-t});
51 + console.info('F0-05 contact filter browser ms:',elapsed.toFixed(1));
52 expect(elapsed,'contact filter took '+elapsed.toFixed(0)+'ms').toBeLessThan(5000);
53 await expect(list.locator('[role="option"]')).toHaveCount(1);
54 await expect(list).toContainText('شرکت توسعه هارد');