mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-30 16:54:59 +00:00
Enhance UI navigation handling in test_web_ui.py: Add wait_for_nav calls for smooth transitions between sections, ensuring reliable element interactions.
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user