Core integration test coverage #86

Open
opened 2026-03-08 17:42:14 +01:00 by myrmidex · 0 comments
Owner

Summary

Add integration/feature tests for major untested areas of the application.

Context

The codebase has solid unit tests for models, jobs, and events, but lacks integration tests for controllers, flows, and service interactions. Current feature tests cover: jobs/events wiring, article validation listener, database connectivity, profile CRUD, API auth, and event dispatching. Major flows are untested end-to-end.

Untested Areas

Controllers (HTTP tests)

  • ArticlesController — index pagination, approve, reject, refresh
  • FeedsController — CRUD + toggle
  • PlatformChannelsController — CRUD + toggle + account relationships
  • PlatformAccountsController — CRUD + setActive
  • RoutingController — CRUD + toggle routes
  • KeywordsController — CRUD scoped to route
  • SettingsController — get all, partial update
  • DashboardController — stats across periods
  • OnboardingController — status, complete, skip, reset

Publishing Pipeline (E2E)

  • Full flow: article created → validated → approved → published (with mocked HTTP)
  • Keyword filtering in publishing (route matches vs skips)
  • Duplicate detection prevents re-publishing
  • Publishing interval respected

Services

  • RoutingValidationService — language mismatch detection
  • OnboardingService — status checks, cache clearing
  • DashboardStatsService — period calculations with real data

Parsers

  • VRT homepage/article parser with fixture HTML
  • Guardian homepage/article parser with fixture HTML
  • RSS feed parsing with fixture XML

Approach

  • Use RefreshDatabase for isolation
  • Mock external HTTP calls with Http::fake() and fixture files
  • All tests must work offline (no real API calls)
  • Prioritize publishing pipeline E2E and controller tests first
## Summary Add integration/feature tests for major untested areas of the application. ## Context The codebase has solid unit tests for models, jobs, and events, but lacks integration tests for controllers, flows, and service interactions. Current feature tests cover: jobs/events wiring, article validation listener, database connectivity, profile CRUD, API auth, and event dispatching. Major flows are untested end-to-end. ## Untested Areas ### Controllers (HTTP tests) - [ ] `ArticlesController` — index pagination, approve, reject, refresh - [ ] `FeedsController` — CRUD + toggle - [ ] `PlatformChannelsController` — CRUD + toggle + account relationships - [ ] `PlatformAccountsController` — CRUD + setActive - [ ] `RoutingController` — CRUD + toggle routes - [ ] `KeywordsController` — CRUD scoped to route - [ ] `SettingsController` — get all, partial update - [ ] `DashboardController` — stats across periods - [ ] `OnboardingController` — status, complete, skip, reset ### Publishing Pipeline (E2E) - [ ] Full flow: article created → validated → approved → published (with mocked HTTP) - [ ] Keyword filtering in publishing (route matches vs skips) - [ ] Duplicate detection prevents re-publishing - [ ] Publishing interval respected ### Services - [ ] `RoutingValidationService` — language mismatch detection - [ ] `OnboardingService` — status checks, cache clearing - [ ] `DashboardStatsService` — period calculations with real data ### Parsers - [ ] VRT homepage/article parser with fixture HTML - [ ] Guardian homepage/article parser with fixture HTML - [ ] RSS feed parsing with fixture XML ## Approach - Use `RefreshDatabase` for isolation - Mock external HTTP calls with `Http::fake()` and fixture files - All tests must work offline (no real API calls) - Prioritize publishing pipeline E2E and controller tests first
myrmidex added this to the v2.0.0 milestone 2026-03-08 17:42:14 +01:00
myrmidex added the
testing
label 2026-03-08 17:42:14 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/fedi-feed-router#86
No description provided.