mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-14 01:44:57 +03:00
docs(web-test): document icon-only section panel limitation
navigateSection() now gives a clear error message when the section panel is in icon-only mode instead of a confusing "not found" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -388,3 +388,4 @@ On error (auto-screenshot taken):
|
||||
- **Clipboard paste** — all text fields filled via Ctrl+V (triggers 1C events properly)
|
||||
- **Cyrillic in bash** — use `cat <<'SCRIPT' | node $RUN exec -` to avoid escaping issues
|
||||
- **Non-breaking spaces** — 1C uses `\u00a0` instead of regular spaces. All matching is normalized internally
|
||||
- **Section panel display** — `navigateSection()` works with any panel position (side, top) but requires "Picture and text" or "Text" display mode. Icon-only mode is not supported — API cannot read section names from icons alone
|
||||
|
||||
@@ -320,7 +320,11 @@ export async function navigateSection(name) {
|
||||
await dismissPendingErrors();
|
||||
if (highlightMode) try { await highlight(name); await page.waitForTimeout(500); await unhighlight(); } catch {}
|
||||
const result = await page.evaluate(navigateSectionScript(name));
|
||||
if (result?.error) throw new Error(`navigateSection: "${name}" not found. Available: ${result.available?.join(', ') || 'none'}`);
|
||||
if (result?.error) {
|
||||
const avail = result.available?.filter(Boolean);
|
||||
if (avail?.length === 0) throw new Error(`navigateSection: "${name}" not found. Section panel is in icon-only mode — text labels are hidden. Switch to "Text" or "Picture and text" display mode in 1C settings (View → Section Panel → Display Mode)`);
|
||||
throw new Error(`navigateSection: "${name}" not found. Available: ${avail?.join(', ') || 'none'}`);
|
||||
}
|
||||
|
||||
await waitForStable();
|
||||
const { sections, commands } = await page.evaluate(`({
|
||||
|
||||
@@ -302,6 +302,7 @@ await closeForm({ save: false });
|
||||
- **Clipboard paste** — поля заполняются через Ctrl+V (корректно триггерит события 1С)
|
||||
- **Неразрывные пробелы** — 1С использует `\u00a0`, внутри API нормализация автоматическая
|
||||
- **Ошибки** — все функции бросают исключение при ошибке (сценарий прерывается), `try/catch` для обработки
|
||||
- **Панель разделов** — `navigateSection()` работает при любом расположении панели (сбоку, сверху), но требует режим «Картинка и текст» или «Текст». Режим «Только картинки» не поддерживается — API не может прочитать имена разделов из иконок
|
||||
|
||||
## Связанные навыки
|
||||
|
||||
|
||||
Reference in New Issue
Block a user