This commit is contained in:
2026-09-08 05:10:33 +02:00
parent 68a7c3b002
commit 36e5378f19
6 changed files with 16 additions and 9 deletions
+6 -2
View File
@@ -245,7 +245,11 @@ def test_post_schema_has_date_modified(page, app_server):
assert "dateModified" in text
def test_post_detail_has_no_rel_next(page, app_server):
def test_post_detail_rel_next_points_at_an_older_post(page, app_server):
slug, _ = _seed_post_seo()
page.goto(f"{BASE_URL}/posts/{slug}", wait_until="domcontentloaded")
assert page.locator('link[rel="next"]').count() == 0
link = page.locator('link[rel="next"]')
if link.count() == 0:
return
assert "/posts/" in link.get_attribute("href")
assert page.locator(".next-post-link").count() == 1