forked from retoor/devplacepy
feat: add TTLCache for get_cache_version and TEMPLATE_AUTO_RELOAD config with Makefile worker count variables
This commit is contained in:
+8
-2
@@ -58,7 +58,10 @@ def test_post_vote_increment(alice):
|
||||
def test_post_upvote_voted_state_persists(alice):
|
||||
page, _ = alice
|
||||
create_post(page, "showcase", "Upvote persistence test")
|
||||
page.locator(".post-action-btn.vote-up").first.click()
|
||||
with page.expect_response(
|
||||
lambda r: "/votes/" in r.url and r.request.method == "POST"
|
||||
):
|
||||
page.locator(".post-action-btn.vote-up").first.click()
|
||||
expect(page.locator(".post-vote-count").first).to_have_text("1")
|
||||
page.reload(wait_until="domcontentloaded")
|
||||
expect(page.locator(".post-action-btn.vote-up").first).to_have_class(
|
||||
@@ -72,7 +75,10 @@ def test_post_upvote_voted_state_persists(alice):
|
||||
def test_post_downvote_voted_state_persists(alice):
|
||||
page, _ = alice
|
||||
create_post(page, "showcase", "Downvote persistence test")
|
||||
page.locator(".post-action-btn.vote-down").first.click()
|
||||
with page.expect_response(
|
||||
lambda r: "/votes/" in r.url and r.request.method == "POST"
|
||||
):
|
||||
page.locator(".post-action-btn.vote-down").first.click()
|
||||
expect(page.locator(".post-vote-count").first).to_have_text("-1")
|
||||
page.reload(wait_until="domcontentloaded")
|
||||
expect(page.locator(".post-action-btn.vote-down").first).to_have_class(
|
||||
|
||||
Reference in New Issue
Block a user