From 6ac99891402f81a297d92f8cb227c9ec2b45885f Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Mon, 15 Jun 2026 19:56:25 +0000 Subject: [PATCH] fix(gtea): wait for visible input#user_name on gitea login page _csrf is a hidden field; wait_for_selector defaults to state=visible and times out. Switch to the visible username input which proves the login form rendered. Co-Authored-By: Claude Sonnet 4.6 --- tests/gitea/test_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gitea/test_install.py b/tests/gitea/test_install.py index 84036da..ca3559b 100644 --- a/tests/gitea/test_install.py +++ b/tests/gitea/test_install.py @@ -58,7 +58,7 @@ def test_install_gitea(live_app, meta): try: page = browser.new_context(ignore_https_errors=True).new_page() harness_browser.goto_with_retry(page, url, accept_statuses=(200, 302), goto_timeout_ms=30_000) - page.wait_for_selector("input[name='_csrf']", timeout=20_000) + page.wait_for_selector("input#user_name", timeout=20_000) content = page.content() assert "gitea" in content.lower() or "sign in" in content.lower(), ( "Sign-in page did not render expected gitea content"