mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-10 16:14:54 +03:00
feat(web-test): auto-dismiss platform dialogs in dismissPendingErrors
dismissPendingErrors() now detects and closes leftover platform dialogs (About, Support Info, Error Report) before checking for 1C error modals. This prevents action functions from failing with timeouts when a stale platform dialog blocks interaction via modalSurface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -344,6 +344,12 @@ async function checkForErrors() {
|
||||
* Returns the dismissed error object or null.
|
||||
*/
|
||||
async function dismissPendingErrors() {
|
||||
// Close leftover platform dialogs first (About, Support Info, Error Report)
|
||||
// These block all interaction via modalSurface and are invisible to 1C form detection
|
||||
try {
|
||||
const pd = await _detectPlatformDialogs();
|
||||
if (pd.length) await _closePlatformDialogs();
|
||||
} catch { /* OK */ }
|
||||
const err = await checkForErrors();
|
||||
if (!err?.modal) return null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user