From 6958cc558bc9b9d4164b9a0f9131c7e7e2cb47d2 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Thu, 5 Mar 2026 08:58:21 +0300 Subject: [PATCH] perf(web-test): detect .confirm notification for early exit in clickElement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .confirm CSS selector to the server-response waitForSelector in clickElement. 1C web client shows notifications (Изменение/Проведение) as .confirm elements after write/post operations. This allows early exit instead of waiting the full 10s timeout. Записать: 14s → 2.6s. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/scripts/browser.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/web-test/scripts/browser.mjs b/.claude/skills/web-test/scripts/browser.mjs index 49e36b3d..36c69f62 100644 --- a/.claude/skills/web-test/scripts/browser.mjs +++ b/.claude/skills/web-test/scripts/browser.mjs @@ -1500,7 +1500,7 @@ export async function clickElement(text, { dblclick } = {}) { // waitForSelector uses MutationObserver internally — doesn't block event loop. try { await page.waitForSelector( - '#modalSurface:not([style*="display: none"]), .balloon', + '#modalSurface:not([style*="display: none"]), .balloon, .confirm', { state: 'visible', timeout: 10000 } ); } catch {}