fix(gtea): wait for visible input#user_name on gitea login page
Some checks failed
continuous-integration/drone/push Build is failing
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:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user