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:
Nick Shirokov
2026-03-21 19:28:01 +03:00
parent f9c3792528
commit 4cfcaaaa1c
@@ -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 {