فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): wait for stable handler targets when live labels change
davoodmehraban89 committed
Oct 31, 2026 at 11:19 UTC
4fa895bc79e5b4ebd9c75920e27d41105a4c9825
1 file changed
+9
-3
tests/windows-vm-ui-interaction-audit-browser.js
+9
-3
@@ -763,9 +763,15 @@
763
inventory(route,'root');
764
tab.click();await wait(320);
765
}
766
- const el=clickables(target()).find(x=>
767
- handler(x)===action.handler && name(x)===action.label &&
768
- x.tagName.toLowerCase()===action.tag);
766
+ // Rendered labels can legitimately change with live counts and filters.
767
+ // Resolve by the stable inline handler + element type, then wait briefly
768
+ // for slow IndexedDB-backed tabs to finish rendering in the installed VM.
769
+ let el=null;
770
+ for(let attempt=0;attempt<12 && !el;attempt++){
771
+ el=clickables(target()).find(x=>
772
+ handler(x)===action.handler && x.tagName.toLowerCase()===action.tag);
773
+ if(!el) await wait(100);
774
+ }
775
if(!el){
776
failures.push({route,section:group.section,kind:'safe-action-vanished',
777
handler:action.handler,label:action.label});