فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(q01): preserve unique safe-control signatures across filter and tab probes

davoodmehraban89 committed Oct 31, 2026 at 09:55 UTC 1b9f8207dcea42816280e428cfb66fbb6a711a60
1 file changed +13 -7
tests/windows-vm-ui-interaction-audit-browser.js
+13 -7
@@ -614,9 +614,11 @@
614 }
615 }
616 // Queue safe navigation and filter actions for after all contexts.
617 - const safeActions=[...new Set(controls
617 + const safeActions=[...new Map(controls
618 .filter(el=>!el.disabled && (safeNavigate.test(handler(el)) || safeFilter.test(handler(el))))
619 - .map(el=>handler(el)))];
619 + .map(el=>[sig(el,route,ctx.section),{
620 + handler:handler(el),label:name(el),tag:el.tagName.toLowerCase()
621 + }])).values()];
622 if(safeActions.length) deferredSafeActions.push({
623 section:ctx.section,tabAction:ctx.tabAction,actions:safeActions
624 });
@@ -739,7 +741,7 @@
741 // after every row-scoped action prevents filters hiding edit/delete targets.
742 for(const group of deferredSafeActions){
743 for(const action of group.actions){
742 - window.__Q01_AUDIT_STAGE='safe-action:'+route+':'+action;
744 + window.__Q01_AUDIT_STAGE='safe-action:'+route+':'+action.handler;
745 await go(route);
746 if(group.tabAction){
747 const tab=clickables(target()).find(el=>handler(el)===group.tabAction);
@@ -748,15 +750,19 @@
750 continue;
751 }
752 inventory(route,'root');
751 - await press(tab,route,'root','tab');
753 + tab.click();await wait(160);
754 }
753 - const el=clickables(target()).find(x=>handler(x)===action);
755 + const el=clickables(target()).find(x=>
756 + handler(x)===action.handler && name(x)===action.label &&
757 + x.tagName.toLowerCase()===action.tag);
758 if(!el){
755 - failures.push({route,section:group.section,kind:'safe-action-vanished',handler:action});
759 + failures.push({route,section:group.section,kind:'safe-action-vanished',
760 + handler:action.handler,label:action.label});
761 continue;
762 }
763 inventory(route,group.section);
759 - await press(el,route,group.section,safeNavigate.test(action)?'navigation':'filter');
764 + await press(el,route,group.section,
765 + safeNavigate.test(action.handler)?'navigation':'filter');
766 }
767 }
768 }