From 7b53f286441d905c37b6d839a4ce92301050987f Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 28 Jun 2026 20:49:44 +0300 Subject: [PATCH] =?UTF-8?q?perf(web-test):=20=D1=83=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D0=BC=D0=B8=D1=82?= =?UTF-8?q?=D1=82=D0=B5=D0=BD=D1=82=D0=BD=D1=8B=D0=B9=20~30=D1=81=20=D1=85?= =?UTF-8?q?=D1=8D=D0=BD=D0=B3=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=B2=20=D0=BC=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D1=82=D0=B8=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В selectValuesMulti перед F4 был лишний re-focus инпута (page.click), который интермиттентно упирался в Playwright-таймаут actionability (~30с), когда инпут перекрыт кнопками DLB/CB или .surface, и глотался .catch — съедая 30с до F4. Убрано: clickElement уже фокусит поле, F4 жмём сразу. Также снят дублирующий waitForStable после clickElement (он стабилизирует страницу внутри). Тест 22: 174с → ~76с, все 5 поверхностей зелёные. Открытие F4-ветки ~4с (было 30с+). Одиночный selectValue не затронут. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../web-test/scripts/engine/forms/select-value.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.claude/skills/web-test/scripts/engine/forms/select-value.mjs b/.claude/skills/web-test/scripts/engine/forms/select-value.mjs index 8818bcfe..215a7429 100644 --- a/.claude/skills/web-test/scripts/engine/forms/select-value.mjs +++ b/.claude/skills/web-test/scripts/engine/forms/select-value.mjs @@ -1,4 +1,4 @@ -// web-test forms/select-value v1.28 — Reference & composite-type value selection: selectValue (+ array multi-select), fillReferenceField, selection/type-dialog pickers. +// web-test forms/select-value v1.30 — Reference & composite-type value selection: selectValue (+ array multi-select), fillReferenceField, selection/type-dialog pickers. // Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import { @@ -682,12 +682,13 @@ async function selectValuesMulti(fieldName, values, { type } = {}) { const cloudDDVisible = () => page.evaluate(`!![...document.querySelectorAll('.cloudDD')].find(p => p.offsetWidth > 0 && p.offsetHeight > 0)`); // ── Open + detect (F4-first) ── + // clickElement already stabilizes the page internally (and leaves the field focused) — so we + // detect a new form right away, and on the F4 branch press F4 directly with NO re-focus click. + // (A page.click on the field input here can intermittently hang ~30s on Playwright's + // actionability timeout when DLB/CB buttons or a .surface overlay cover the input.) await clickElement(fieldName).catch(() => {}); - await waitForStable(baseForm); let formNum = await helperDetectNewForm(baseForm); if (formNum === null) { - const inputId = await findFieldInputId(baseForm, btn.fieldName); - if (inputId) { await page.click(`[id="${inputId}"]`).catch(() => {}); await page.waitForTimeout(200); } await page.keyboard.press('F4'); await page.waitForTimeout(ACTION_WAIT); await waitForStable(baseForm);