mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-15 07:15:17 +03:00
e05c0a4a61
clickElement({row,column}) теперь работает не только на SpreadsheetDocument,
но и на гридах формы (динамические списки, табчасти). Маршрутизация:
spreadsheet приоритет (backward-compat), без spreadsheet — первый видимый
грид; явный table='Имя' форсит конкретный грид.
Поддержка:
- row: number — индекс в текущем DOM окне (виртуализация — документировано)
- row: { Колонка: значение } — фильтр по нормализованному содержимому
- scroll: true | number — reveal-loop через PageDown пока строка не найдена
или DOM не перестал меняться (с лимитом)
- Автоматический горизонтальный скролл к колонке за viewport
(учитывает frozen-колонки .gridBoxFix)
- Post-scroll visibility check — throw вместо ложного success
readTable обогащён полем hasMore: { above?, below } — единственный
надёжный сигнал виртуализации. total/shown остаются как DOM-окно
(backward-compat) с честным описанием в SKILL.md.
Общий хелпер scrollHorizontallyByKey вынесен в engine/core/, переиспользуется
spreadsheet'ом и грид-click'ом. DOM-логика (findGridCellScript,
findFocusCellScript, snapshotGridScript, resolveCellTargetScript) живёт
в dom/grid.mjs — engine только оркестрирует.
Покрытие: новый 18-cell-click.test.mjs (7 шагов: spreadsheet
regression-guard, catalog dblclick, табчасть, hasMore, 2 error-paths,
cleanup). Расширен 05-table.test.mjs проверкой hasMore.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
95 lines
2.4 KiB
JavaScript
95 lines
2.4 KiB
JavaScript
// web-test dom v1.16 — facade re-exporting injectable DOM scripts from dom/
|
|
// Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
|
/**
|
|
* Facade: re-exports DOM selector & semantic mapping script generators.
|
|
* Внутренности живут в dom/*. Публичный набор имён неизменен.
|
|
*
|
|
* All functions return JavaScript strings for page.evaluate().
|
|
* They produce clean semantic structures — no DOM IDs or CSS classes leak out.
|
|
* Only non-default property values are included to minimize response size.
|
|
*/
|
|
|
|
export {
|
|
detectFormScript,
|
|
readFormScript,
|
|
findClickTargetScript,
|
|
findFieldButtonScript,
|
|
resolveFieldsScript,
|
|
detectNewFormScript,
|
|
findSearchInputScript,
|
|
findNamedButtonScript,
|
|
findCompareTypeRadioScript,
|
|
isFormVisibleScript,
|
|
findPatternInputIdScript,
|
|
isTypeDialogScript,
|
|
isNotInListCloudVisibleScript,
|
|
clickShowAllInNotInListCloudScript,
|
|
findChildFormByButtonScript,
|
|
readTypeDialogVisibleRowsScript,
|
|
} from './dom/forms.mjs';
|
|
|
|
export {
|
|
findFirstGridCellCoordsScript,
|
|
findColumnFirstCellCoordsScript,
|
|
readFieldSelectorInfoScript,
|
|
pickFieldInSelectorDropdownScript,
|
|
readFilterDialogInfoScript,
|
|
findFilterBadgeCloseScript,
|
|
findFirstFilterBadgeCloseScript,
|
|
} from './dom/filter.mjs';
|
|
|
|
export {
|
|
isInputFocusedScript,
|
|
isInputFocusedInGridScript,
|
|
findOpenPopupScript,
|
|
} from './dom/edit-state.mjs';
|
|
|
|
export {
|
|
readEddScript,
|
|
isEddVisibleScript,
|
|
clickEddItemViaDispatchScript,
|
|
clickShowAllInEddScript,
|
|
} from './dom/edd.mjs';
|
|
|
|
export { getFormStateScript } from './dom/form-state.mjs';
|
|
|
|
export {
|
|
resolveGridScript,
|
|
readTableScript,
|
|
countGridRowsScript,
|
|
isTreeGridScript,
|
|
findGridHeadCenterCoordsScript,
|
|
getSelectedOrLastRowIndexScript,
|
|
findGridCellScript,
|
|
findFocusCellScript,
|
|
snapshotGridScript,
|
|
resolveCellTargetScript,
|
|
} from './dom/grid.mjs';
|
|
|
|
export {
|
|
sortFieldKeysByColindexScript,
|
|
findCellCoordsByFieldsScript,
|
|
findNextCellCoordsByKeyScript,
|
|
findCheckboxAtPointScript,
|
|
findRowCommitClickCoordsScript,
|
|
getGridEditCheckScript,
|
|
readActiveGridCellScript,
|
|
getElementCenterCoordsByIdScript,
|
|
} from './dom/grid-edit.mjs';
|
|
|
|
export {
|
|
readSectionsScript,
|
|
readTabsScript,
|
|
switchTabScript,
|
|
readCommandsScript,
|
|
navigateSectionScript,
|
|
openCommandScript,
|
|
} from './dom/nav.mjs';
|
|
|
|
export {
|
|
readSubmenuScript,
|
|
clickPopupItemScript,
|
|
} from './dom/submenu.mjs';
|
|
|
|
export { checkErrorsScript } from './dom/errors.mjs';
|