فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(ux): click notifications close buttons and verify transient cap without discarding errors
davoodmehraban89 committed
Oct 30, 2026 at 23:29 UTC
5b1bf802250c5bedb5a7adfda640913d61443739
1 file changed
+14
-1
tests/windows-vm-ui-interaction-audit-browser.js
+14
-1
@@ -173,9 +173,22 @@
173
unexpectedConfirm) throw Error('Escape did not restore focus to original control');
174
const modalKeyboard={roleAndLabel:true,nestedDialogIsolation:true,
175
escapeClosesWithoutConfirm:true,focusReturnsToTrigger:true};
176
+ // Notification flood: transient success/info messages should never
177
+ // cover the dashboard. Important errors remain until explicitly dismissed.
178
+ for(let n=0;n<9;n++) FINORA.Toast.info('Q01 synthetic notice '+n);
179
+ const transient=document.querySelectorAll('.toast-success, .toast-info');
180
+ if(transient.length>3)throw Error('transient notifications cover too much of the UI');
181
+ const beforeErrors=document.querySelectorAll('.toast-error').length;
182
+ FINORA.Toast.error('Q01 synthetic persistent error');
183
+ if(document.querySelectorAll('.toast-error').length!==beforeErrors+1){
184
+ throw Error('important financial error notification disappeared');
185
+ }
186
+ document.querySelectorAll('.toast .toast-close').forEach(button=>button.click());
187
+ const toastResults={transientLimit:3,importantErrorsRemain:true,
188
+ dismissButtonsWork:document.querySelectorAll('.toast').length===0};
189
const shellResults={keyboardReachableSidebarLinks:navLinks.length,
190
sidebarCollapseClickAndPersistence:true,themeToggleClickAndPersistence:true,
178
- activeRouteAriaCurrent:true,modalKeyboard};
191
+ activeRouteAriaCurrent:true,modalKeyboard,toastResults};
192
for (const route of routes) {
193
await go(route);
194
const active=[...document.querySelectorAll('#sidebarMenu [aria-current="page"]')];