feat(artist): "new since last visit" badge + banner #58

Merged
bvandeusen merged 2 commits from dev into main 2026-06-03 16:20:54 -04:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 3162cff96b - Show all commits
+2 -1
View File
@@ -43,7 +43,8 @@ async def test_directory_card_shape(client, seeded):
body = await resp.get_json()
card = next(c for c in body["cards"] if c["name"] == "alice-api")
assert set(card.keys()) == {
"id", "name", "slug", "is_subscription", "image_count", "preview_thumbnails",
"id", "name", "slug", "is_subscription", "image_count",
"unseen_count", "preview_thumbnails",
}
assert card["is_subscription"] is True
assert card["image_count"] == 1
+3 -3
View File
@@ -11,7 +11,7 @@ Covers:
last_viewed_at = NOW())
"""
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta
import pytest
from sqlalchemy import select
@@ -23,8 +23,8 @@ from backend.app.services.artist_service import ArtistService
pytestmark = pytest.mark.integration
_LONG_AGO = datetime(2000, 1, 1, tzinfo=timezone.utc)
_RECENTLY = datetime(2099, 1, 1, tzinfo=timezone.utc)
_LONG_AGO = datetime(2000, 1, 1, tzinfo=UTC)
_RECENTLY = datetime(2099, 1, 1, tzinfo=UTC)
async def _seed_artist(db, name: str) -> Artist: