mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-03 10:10:21 +03:00
docs(web-test): fix hierarchical list — simple filterList works
Simple filterList('text') works on hierarchical catalogs after
the search input regex fix. No need to switch view mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c6eae770f5
commit
afe760af4b
@@ -166,32 +166,17 @@ Single `clickElement(text)` only selects the row. To open — always use `{dblcl
|
|||||||
|
|
||||||
### Hierarchical lists (catalogs)
|
### Hierarchical lists (catalogs)
|
||||||
|
|
||||||
Simple search and `filterList(text, {field})` do NOT work on hierarchical catalogs —
|
For hierarchical catalogs (Контрагенты, Номенклатура, Сотрудники, etc.) use simple
|
||||||
they navigate the tree instead of filtering. For Контрагенты, Номенклатура, Сотрудники, etc.
|
search — it works correctly and flattens the view:
|
||||||
switch to flat list mode first:
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// 1. Detect: readTable returns `hierarchical: true` when rows have groups
|
await filterList('Конфетпром'); // simple search — works on hierarchical lists
|
||||||
const table = await readTable({ maxRows: 5 });
|
await clickElement('Конфетпром ООО', { dblclick: true }); // open found item
|
||||||
if (table.hierarchical) {
|
await closeForm(); // close item
|
||||||
// 2. Switch to flat mode via "Ещё" → "Режим просмотра" → "Список"
|
await unfilterList(); // restore hierarchical view
|
||||||
await clickElement('Еще');
|
|
||||||
await clickElement('Режим просмотра');
|
|
||||||
await clickElement('Список');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Now filterList works normally
|
|
||||||
await filterList('Конфетпром', { field: 'Наименование в программе' });
|
|
||||||
// ...work with results...
|
|
||||||
|
|
||||||
// 4. Clean up: switch back to hierarchical mode
|
|
||||||
await unfilterList();
|
|
||||||
await clickElement('Еще');
|
|
||||||
await clickElement('Режим просмотра');
|
|
||||||
await clickElement('Иерархический список');
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Hint: if `readTable()` returns `hierarchical: true`, always switch to flat mode before filtering.
|
Hint: if `readTable()` returns `hierarchical: true`, the list has groups.
|
||||||
|
|
||||||
### Closing forms
|
### Closing forms
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user