From 55cef3a7e931f89977d6b02d213ad620b4fd2844 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Fri, 9 Jan 2026 19:50:52 +0000 Subject: [PATCH] Enhance UI navigation handling in test_web_ui.py: Add `wait_for_nav` calls for smooth transitions between sections, ensuring reliable element interactions. --- tests/ui/test_web_ui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ui/test_web_ui.py b/tests/ui/test_web_ui.py index d5c77b0..ab43f67 100644 --- a/tests/ui/test_web_ui.py +++ b/tests/ui/test_web_ui.py @@ -49,6 +49,7 @@ def test_update_prompt(page: Page, server: str): page.goto(auth_url) # Navigate to prompt section + wait_for_nav(page) page.click("[data-section='prompt']") page.wait_for_selector("#prompt.active") @@ -62,6 +63,7 @@ def test_update_prompt(page: Page, server: str): page.click(f"#prompt button:has-text('{t('ui.prompt.save')}')") # Verify it updated + wait_for_nav(page) page.click("[data-section='prompt']") page.wait_for_selector("#prompt.active") expect(page.locator("#prompt textarea[name='system_content']")).to_have_value("Test system prompt") @@ -103,6 +105,7 @@ def test_navigation_sections(page: Page, server: str): # Navigate to each section sections = ["workflow", "prompt", "settings", "translations"] for section in sections: + wait_for_nav(page) page.click(f"[data-section='{section}']") page.wait_for_timeout(100) expect(page.locator(f"#{section}")).to_have_class(re.compile(r"active"))