fix(web-test): route reference fields without DLB through selectValue

Reference fields with pick button (_CB) but no dropdown button (_DLB)
were going through the plain paste path, which silently failed for
non-editable fields. Now detected via hasPick flag in resolveFieldsScript
and delegated to selectValue (F4 → selection form).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-20 15:22:44 +03:00
co-authored by Claude Opus 4.6
parent ea453e5c97
commit df47128994
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -1159,6 +1159,7 @@ export function resolveFieldsScript(formNum, fields) {
const label = (titleEl?.innerText?.trim() || '').replace(/\\n/g, ' ').replace(/:$/, '');
const last = { inputId: el.id, name, label };
if (document.getElementById(p + name + '_DLB')?.offsetWidth > 0) last.hasSelect = true;
if (document.getElementById(p + name + '_CB')?.offsetWidth > 0) last.hasPick = true;
allFields.push(last);
});
// Checkboxes
@@ -1236,6 +1237,7 @@ export function resolveFieldsScript(formNum, fields) {
if (found.isCheckbox) { entry.isCheckbox = true; entry.checked = found.checked; }
if (found.isRadio) { entry.isRadio = true; entry.options = found.options; }
if (found.hasSelect) entry.hasSelect = true;
if (found.hasPick) entry.hasPick = true;
if (found._dcsCheckbox) {
entry.dcsCheckbox = { inputId: found._dcsCheckbox.inputId, checked: found._dcsCheckbox.checked };
delete found._dcsCheckbox;