ipdatepppdate
This commit is contained in:
@@ -44,10 +44,16 @@ def test_leaderboard_ranks_after_upvote(app_server, browser, seeded_db):
|
||||
vote_btn.click()
|
||||
pa.wait_for_timeout(1500)
|
||||
|
||||
pa.goto(f"{BASE_URL}/leaderboard", wait_until="domcontentloaded")
|
||||
body = pa.locator("body").text_content()
|
||||
assert "Internal Server Error" not in body, f"Got 500 on leaderboard: {body[:300]}"
|
||||
assert pa.is_visible("a.leaderboard-name:has-text('bob_test')")
|
||||
ranked = False
|
||||
for _ in range(15):
|
||||
pa.goto(f"{BASE_URL}/leaderboard", wait_until="domcontentloaded")
|
||||
body = pa.locator("body").text_content()
|
||||
assert "Internal Server Error" not in body, f"Got 500 on leaderboard: {body[:300]}"
|
||||
if pa.is_visible("a.leaderboard-name:has-text('bob_test')"):
|
||||
ranked = True
|
||||
break
|
||||
pa.wait_for_timeout(5000)
|
||||
assert ranked, "bob_test never appeared on the leaderboard within the 60s ranking cache TTL"
|
||||
finally:
|
||||
ctx_a.close()
|
||||
ctx_b.close()
|
||||
|
||||
Reference in New Issue
Block a user