mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-05 01:48:44 +00:00
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)
22 lines
939 B
Python
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
|