Remove redundant step numbers from recipe instructions in UI and database
This commit is contained in:
@@ -33,6 +33,14 @@ def test_routes():
|
||||
assert res.status_code == 200, f"Recipe 1 failed: {res.status_code}"
|
||||
print("✓ Recipe detail (/cookbook/recipe/1) OK")
|
||||
|
||||
# Verify no double numbers in /cookbook
|
||||
import re
|
||||
res_cb = client.get("/cookbook")
|
||||
pattern = re.compile(r'<div class="step-text">\s*((?:Schritt\s*\d+[:.]?|\d+[\.\)\:])\s*[^<]*)', re.IGNORECASE)
|
||||
matches = pattern.findall(res_cb.text)
|
||||
assert len(matches) == 0, f"Found {len(matches)} double numbers in /cookbook: {matches[:3]}"
|
||||
print("✓ Zero double numbers in rendered /cookbook steps confirmed!")
|
||||
|
||||
print("\nAll route tests passed successfully!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user