فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): preserve unique safe-control signatures across filter and tab probes
davoodmehraban89 committed
Oct 31, 2026 at 09:55 UTC
26e6b9e0137407d8ccc5715a097fc21aacfb9162
1 file changed
+13
-7
tests/windows-vm-ui-interaction-audit-browser.js
+13
-7
@@ -615,9 +615,11 @@
615
}
616
}
617
// Queue safe navigation and filter actions for after all contexts.
618
- const safeActions=[...new Set(controls
618
+ const safeActions=[...new Map(controls
619
.filter(el=>!el.disabled && (safeNavigate.test(handler(el)) || safeFilter.test(handler(el))))
620
- .map(el=>handler(el)))];
620
+ .map(el=>[sig(el,route,ctx.section),{
621
+ handler:handler(el),label:name(el),tag:el.tagName.toLowerCase()
622
+ }])).values()];
623
if(safeActions.length) deferredSafeActions.push({
624
section:ctx.section,tabAction:ctx.tabAction,actions:safeActions
625
});
@@ -742,7 +744,7 @@
744
// after every row-scoped action prevents filters hiding edit/delete targets.
745
for(const group of deferredSafeActions){
746
for(const action of group.actions){
745
- window.__Q01_AUDIT_STAGE='safe-action:'+route+':'+action;
747
+ window.__Q01_AUDIT_STAGE='safe-action:'+route+':'+action.handler;
748
await go(route);
749
if(group.tabAction){
750
const tab=clickables(target()).find(el=>handler(el)===group.tabAction);
@@ -751,15 +753,19 @@
753
continue;
754
}
755
inventory(route,'root');
754
- await press(tab,route,'root','tab');
756
+ tab.click();await wait(160);
757
}
756
- const el=clickables(target()).find(x=>handler(x)===action);
758
+ const el=clickables(target()).find(x=>
759
+ handler(x)===action.handler && name(x)===action.label &&
760
+ x.tagName.toLowerCase()===action.tag);
761
if(!el){
758
- failures.push({route,section:group.section,kind:'safe-action-vanished',handler:action});
762
+ failures.push({route,section:group.section,kind:'safe-action-vanished',
763
+ handler:action.handler,label:action.label});
764
continue;
765
}
766
inventory(route,group.section);
762
- await press(el,route,group.section,safeNavigate.test(action)?'navigation':'filter');
767
+ await press(el,route,group.section,
768
+ safeNavigate.test(action.handler)?'navigation':'filter');
769
}
770
}
771
}