From 21de2a47492e281d641323980a37f87a4bfbe400 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 14 Mar 2026 13:50:03 +0300 Subject: [PATCH] fix(web-test): strip dashes in fuzzy match for fillTableRow cell names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CamelCase cell IDs like "ИсходящиеБизнесПроцессПриемник" have no dashes, but user keys like "Бизнес-процесс приемник" do. The previous regex only stripped spaces, leaving the dash and causing match failure. Now strip both spaces and dashes with /[\s\-]+/g in both the Tab-loop path and the row/dblclick column-lookup path. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/web-test/scripts/browser.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude/skills/web-test/scripts/browser.mjs b/.claude/skills/web-test/scripts/browser.mjs index 7cf4026e..af6a6544 100644 --- a/.claude/skills/web-test/scripts/browser.mjs +++ b/.claude/skills/web-test/scripts/browser.mjs @@ -2342,7 +2342,7 @@ export async function fillTableRow(fields, { tab, add, row, table } = {}) { cols.push({ idx: i, text: ((t || box).innerText?.trim() || '').toLowerCase() }); }); const kl = ${JSON.stringify(key.toLowerCase())}; - const klNoSpace = kl.replace(/\\s+/g, ''); + const klNoSpace = kl.replace(/[\\s\\-]+/g, ''); let colIdx = -1; const exact = cols.find(c => c.text === kl); if (exact) colIdx = exact.idx; @@ -2515,8 +2515,8 @@ export async function fillTableRow(fields, { tab, add, row, table } = {}) { matchedKey = key; break; } - // CamelCase cell names have no spaces — try matching without spaces - const klNoSpace = kl.replace(/\s+/g, ''); + // CamelCase cell names have no spaces/dashes — try matching without spaces and dashes + const klNoSpace = kl.replace(/[\s\-]+/g, ''); if (klNoSpace && (cellLower.endsWith(klNoSpace) || cellLower.includes(klNoSpace))) { matchedKey = key; break;