From f93a1560a591d253127ce10da65b489cba0371c1 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Thu, 12 Mar 2026 12:50:18 +0300 Subject: [PATCH] fix(web-test): don't treat small data forms as error modals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit checkErrorsScript falsely classified small forms (e.g. register record form opened by "Установить статус") as error modals because they had < 100 elements + a pressDefault button + staticText. Added input field check — forms with editInput elements are data entry forms, not errors. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/scripts/dom.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.claude/skills/web-test/scripts/dom.mjs b/.claude/skills/web-test/scripts/dom.mjs index b931d4ca..27fd6a2c 100644 --- a/.claude/skills/web-test/scripts/dom.mjs +++ b/.claude/skills/web-test/scripts/dom.mjs @@ -905,12 +905,16 @@ export function checkErrorsScript() { } // Single-button modal: error dialog with pressDefault + staticText + // Skip forms with input fields — those are data entry forms (e.g. register record), + // not error dialogs. Real error modals only have staticText + buttons. if (!result.confirmation) { for (const [fn, buttons] of Object.entries(formButtons)) { const p = 'form' + fn + '_'; const elCount = document.querySelectorAll('[id^="' + p + '"]').length; if (elCount > 100) continue; if (buttons.length !== 1 || !buttons[0].classList.contains('pressDefault')) continue; + const hasInputs = document.querySelectorAll('input.editInput[id^="' + p + '"]').length > 0; + if (hasInputs) continue; const texts = [...document.querySelectorAll('[id^="' + p + '"].staticText')] .filter(el => el.offsetWidth > 0) .map(el => el.innerText?.trim())