mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Render file action menus outside the scroll container with fixed positioning so dropdowns remain visible while file list scrolling stays intact. Deduplicate component body assets during x-component loading and add regressions for the menu, opaque header, and duplicate scoped styles.
17 lines
601 B
Python
17 lines
601 B
Python
from pathlib import Path
|
|
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def read(*parts: str) -> str:
|
|
return PROJECT_ROOT.joinpath(*parts).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_component_loader_deduplicates_body_assets() -> None:
|
|
source = read("webui", "js", "components.js")
|
|
|
|
assert 'const componentAssetSelector = "style, script, link[rel=\'stylesheet\']";' in source
|
|
assert "...doc.querySelectorAll(componentAssetSelector)" in source
|
|
assert "...Array.from(doc.body.childNodes).filter(" in source
|
|
assert "(node) => !node.matches?.(componentAssetSelector)" in source
|