diff --git a/docs/development.md b/docs/development.md index beafce49..18617a25 100644 --- a/docs/development.md +++ b/docs/development.md @@ -105,6 +105,12 @@ uv run zensical serve ## Testing +Install Playwright browsers before running integration tests: + +```bash +uv run playwright install +``` + Run the Django test suite from the `src` directory: ```bash diff --git a/src/app/tests/views/test_home.py b/src/app/tests/views/test_home.py index e8b75c20..9d438b0c 100644 --- a/src/app/tests/views/test_home.py +++ b/src/app/tests/views/test_home.py @@ -113,6 +113,7 @@ class HomeViewTests(TestCase): status=Status.IN_PROGRESS.value, ) + base_watched_at = timezone.now() for i in range(1, 6): # Create 5 episodes episode_item = Item.objects.create( media_id="1668", @@ -126,7 +127,7 @@ class HomeViewTests(TestCase): Episode.objects.create( item=episode_item, related_season=season, - end_date=timezone.now() - timezone.timedelta(days=i), + end_date=base_watched_at - timezone.timedelta(days=6 - i), ) anime_item = Item.objects.create(