From 6ad069f4e9f5553c7887926f6f0eb2cc1ac7d869 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 13 Nov 2026 00:45:35 -0500 Subject: [PATCH] Bind viewport regression to the declared service-tier field --- tests/textual/test_application_actions_in_the_running_app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/textual/test_application_actions_in_the_running_app.py b/tests/textual/test_application_actions_in_the_running_app.py index bacfbba45..6aafecb7d 100644 --- a/tests/textual/test_application_actions_in_the_running_app.py +++ b/tests/textual/test_application_actions_in_the_running_app.py @@ -1,4 +1,5 @@ """Textual-facing: application actions (help, settings screen, command palette, sidebar buttons, tab close) run through Textual screens and keep the session, its draft and the saved settings.""" +from agent_comms.config_options import ServiceTierConfigOption from agent_comms.nominal.field_codec import FieldCodec from toad.forms.editors import ChoicesEditor from toad.launch_binding import AgentAttached @@ -189,12 +190,12 @@ def call(self, request): button = dialog.query_one(ApplyCommandButton) await ui.until(lambda: not button.disabled, why="the command values to be accepted") await ui.until_clickable(button, why="the fixed create control to remain visible before scrolling") - lower = next(reversed(dialog.form.values.values())).editor + lower = dialog.form.values[ServiceTierConfigOption.declared_field().name].editor lower.scroll_visible(animate=False, immediate=True) assert isinstance(lower, ChoicesEditor) await ui.step() await ui.textual[1].click(lower, offset=(3, 1)) - await ui.until(lambda: lower.expanded, why="the scrolled lower field to open its actual choices") + await ui.until(lambda: lower.expanded, why="the scrolled service-tier field to open its actual choices") await ui.press('escape') assert dialog.query_one(CommandFormScroll).scroll_y > 0 await ui.until_clickable(button, why="the fixed create control to remain visible after scrolling")