Files
agent-zero/tests/test_projects_editor_webui.py
linkliti a4beae645e fix(webui): let settings, secrets and editor textareas resize
The shared settings stylesheet forces resize: none on every textarea and animates all properties, so the Global LiteLLM parameters and model config Additional parameters fields, the secrets and variables fields, and the agent editor and project edit forms had no vertical grip and dragging fought the transition. The affected textareas carry the shared resizable-textarea class, which re-enables the vertical grip and drops the all-properties transition so dragging follows the pointer.

Validation: pytest tests/test_settings_resizable_textareas.py tests/test_projects_editor_webui.py (4 passed); tests/test_agent_editor_webui.py (8 passed, tooltip failure pre-exists on the clean tree, proven by stash run)
2026-11-28 13:35:53 +03:00

22 lines
939 B
Python

import re
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
BASIC_DATA = PROJECT_ROOT / "webui" / "components" / "projects" / "project-edit-basic-data.html"
EDITORS = [
PROJECT_ROOT / "webui" / "components" / "projects" / "project-edit-instructions.html",
PROJECT_ROOT / "webui" / "components" / "projects" / "project-edit-secrets.html",
PROJECT_ROOT / "webui" / "components" / "projects" / "project-edit-file-structure.html",
]
def test_project_form_textareas_keep_a_vertical_resize_grip() -> None:
markup = BASIC_DATA.read_text(encoding="utf-8")
rule = re.search(r"\.projects-form-textarea \{([^}]*)\}", markup)
assert rule, "the shared textarea rule is missing"
assert "resize: vertical" in rule.group(1)
assert "transition: none" in rule.group(1)
for editor in EDITORS:
assert 'class="projects-form-textarea"' in editor.read_text(encoding="utf-8"), editor.name