fix(gtea): wait for visible input#user_name on gitea login page
Some checks failed
continuous-integration/drone/push Build is failing

_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 <noreply@anthropic.com>
This commit is contained in:
autonomic-bot
2026-06-15 19:56:25 +00:00
parent 33561c8609
commit 6ac9989140

View File

@ -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"