Update
DevPlace CI / test (push) Successful in 5m33s

This commit is contained in:
2026-05-23 10:54:45 +02:00
parent fe0ed5b7e6
commit 347e5f0f31
4 changed files with 60 additions and 4 deletions
+16
View File
@@ -49,6 +49,22 @@ def test_post_vote_increment(alice):
assert count == "1", f"expected vote count 1, got {count!r}"
def _profile_stars(page, username):
page.goto(f"{BASE_URL}/profile/{username}", wait_until="domcontentloaded")
value = page.locator(".profile-stat:has(.profile-stat-label:has-text('Stars')) .profile-stat-value").first
return int(value.text_content().strip())
def test_profile_stars_reflect_content_votes(alice):
page, user = alice
before = _profile_stars(page, user["username"])
create_post(page, "devlog", "Reputation contribution post")
page.locator(".post-action-btn.vote-up").first.click()
page.wait_for_url(f"{BASE_URL}/posts/*", wait_until="domcontentloaded")
after = _profile_stars(page, user["username"])
assert after == before + 1, f"expected stars {before + 1}, got {after}"
def test_post_comments_section(alice):
page, _ = alice
create_post(page, "rant", "Comment section test")