Add effects count to home page dashboard
- Add Effects card to home page grid (now 3 columns)
- Add stats["effects"] count from cache.list_by_type('effect')
- Add tests for home page effects display
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -235,6 +235,28 @@ def process_frame(frame, params, state):
|
||||
assert "multi-line" in meta["description"]
|
||||
|
||||
|
||||
class TestHomePageEffectsCount:
|
||||
"""Test that effects count is shown on home page."""
|
||||
|
||||
def test_home_template_has_effects_card(self) -> None:
|
||||
"""Home page should display effects count."""
|
||||
path = Path('/home/giles/art/art-celery/app/templates/home.html')
|
||||
content = path.read_text()
|
||||
|
||||
assert 'stats.effects' in content, \
|
||||
"Home page should display stats.effects count"
|
||||
assert 'href="/effects"' in content, \
|
||||
"Home page should link to /effects"
|
||||
|
||||
def test_home_route_provides_effects_count(self) -> None:
|
||||
"""Home route should provide effects count in stats."""
|
||||
path = Path('/home/giles/art/art-celery/app/routers/home.py')
|
||||
content = path.read_text()
|
||||
|
||||
assert 'stats["effects"]' in content, \
|
||||
"Home route should populate stats['effects']"
|
||||
|
||||
|
||||
class TestNavigationIncludesEffects:
|
||||
"""Test that Effects link is in navigation."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user