mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-16 12:40:18 +00:00
test(#5413): scope resize snapshot to dropdown handler
This commit is contained in:
@@ -344,12 +344,18 @@ class TestResizeHandlerSymmetry:
|
||||
def test_resize_repositions_reasoning_dropdown(self):
|
||||
# The global resize handler must handle both composerModelDropdown AND
|
||||
# composerReasoningDropdown to keep them aligned when the window resizes.
|
||||
m = re.search(
|
||||
handlers = re.findall(
|
||||
r"window\.addEventListener\(\s*['\"]resize['\"][\s\S]*?\}\s*\)\s*;",
|
||||
UI_JS,
|
||||
)
|
||||
assert m, "window resize handler not found in ui.js"
|
||||
handler = m.group(0)
|
||||
handler = next(
|
||||
(
|
||||
block for block in handlers
|
||||
if "composerModelDropdown" in block and "_positionModelDropdown" in block
|
||||
),
|
||||
None,
|
||||
)
|
||||
assert handler, "composer model dropdown resize handler not found in ui.js"
|
||||
assert "composerReasoningDropdown" in handler, (
|
||||
"window resize handler must also re-position composerReasoningDropdown "
|
||||
"while it's open (symmetric with the existing model-dropdown branch)"
|
||||
|
||||
Reference in New Issue
Block a user