mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-14 22:05:22 +03:00
feat(web-test): support composite-type fields in selectValue
Add `{ type }` option to selectValue for fields that accept multiple
types (e.g. DocumentRef.*). When specified, selectValue navigates
through the type selection dialog via Ctrl+F search before opening
the value selection form. Auto-detects composite fields when type
is not specified and throws a helpful error message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
684e97e518
commit
c958f3f818
@@ -226,7 +226,7 @@ await fillFields({
|
||||
Returns `{ filled: [{ field, ok, value, method }], form: {...} }`.
|
||||
Method is one of: `'toggle'` | `'radio'` | `'paste'` | `'dropdown'` | `'form'` | `'typeahead'`
|
||||
|
||||
#### `selectValue(field, search)` → form state with `selected`
|
||||
#### `selectValue(field, search, opts?)` → form state with `selected`
|
||||
Select a value from reference field via dropdown or selection form. More reliable than `fillFields` for reference fields that need exact selection from a catalog.
|
||||
|
||||
```js
|
||||
@@ -234,6 +234,13 @@ await selectValue('Организация', 'Конфетпром');
|
||||
// result.selected = { field: 'Организация', search: 'Конфетпром', method: 'dropdown'|'form' }
|
||||
```
|
||||
|
||||
For **composite-type fields** (accepting multiple types), specify `type` to first select the type, then the value:
|
||||
```js
|
||||
await selectValue('Документ', '0000-000601', { type: 'Реализация (акт' });
|
||||
// Clears field → opens type dialog → picks type via Ctrl+F → picks value from selection form
|
||||
// result.selected = { field: 'Документ', search: '0000-000601', type: 'Реализация (акт', method: 'form' }
|
||||
```
|
||||
|
||||
Also supports DCS labels — auto-enables the paired checkbox.
|
||||
|
||||
#### `fillTableRow(fields, opts)` → form state
|
||||
|
||||
Reference in New Issue
Block a user