Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Multi-account Playwright: retry the login page once when the app's own logout redirect aborts it (#15398)
Daniel Han5fd8d9f8cda0
diff --git a/tests/studio/playwright_multi_account.py b/tests/studio/playwright_multi_account.pyindex db8ec768484..85681924681 100644--- a/tests/studio/playwright_multi_account.py+++ b/tests/studio/playwright_multi_account.py@@ -14,6 +14,7 @@ from datetime import datetime, timezoneimport urllib.errorimport urllib.request+from playwright.sync_api import Error as PlaywrightErrorfrom playwright.sync_api import Page, expect, sync_playwrightfrom playwright.sync_api import TimeoutError as PlaywrightTimeoutError@@ -46,8 +47,21 @@ def api(return error.code, {}+def open_login(page: Page) -> None:+ """After a log-out the open chat page's requests start failing with 401 and the app sends itself to+ /login (redirectToAuth), which can abort this navigation with ERR_ABORTED. Retry that abort once;+ anything else, or a second abort, is a real failure."""+ try:+ page.goto(f"{BASE_URL}/login")+ except PlaywrightError as error:+ if "ERR_ABORTED" not in str(error):+ raise+ page.wait_for_load_state()+ page.goto(f"{BASE_URL}/login")++def login(page: Page, username: str, password: str) -> None:- page.goto(f"{BASE_URL}/login")+ open_login(page)_, status = api("GET", "/api/auth/status")username_field = page.get_by_role("textbox", name = "Username", exact = True)if status.get("login_mode") == "multi":@@ -116,7 +130,7 @@ def run(page: Page, context) -> None:assert after.get("login_mode") == "multi", afterlog_out(page)- page.goto(f"{BASE_URL}/login")+ open_login(page)second_tab = context.new_page()second_tab.goto(f"{BASE_URL}/login")expect(second_tab.locator("#username")).to_be_visible(timeout = STEP_TIMEOUT_MS)