-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Epic: #11 (Epic 4: Edge Cases, Performance & Testing)
Type: Task
Priority: P1 (High)
Estimate: 0.5 day
Description
Create standardized test data fixture covering all edge cases to enable reproducible testing across unit, E2E, and manual tests.
Acceptance Criteria
- JSON fixture with 50+ articles covering all scenarios
- Include edge cases from testplan (TC-17):
- 100+ articles (pagination)
- Articles with missing titles/URLs
- Extreme sentiment scores (0.99, -0.99)
- Very long titles (>200 chars)
- Unicode characters in titles
- Duplicate articles
- Fixture includes metadata: timestamp, source distribution
- Load fixture in dev mode via
/api/test/load-fixtureendpoint - Document fixture usage in README
Technical Notes
- Create
tests/fixtures/sentiment-detail.json - Structure: match
/api/sentimentresponse format - Include all 3 moods: positive, neutral, negative
- Add test helper:
loadTestFixture()function - Consider date ranges: ensure timestamps are recent
- Optionally: seed fixture into Netlify Blobs for E2E tests
Dependencies
- Blocks: Task 4.7 (Unit tests), Task 4.8 (E2E tests)
- Blocked by: None (can work in parallel)
Test Coverage
- Used by all test suites
- Manual testing with consistent data
Related Files
tests/fixtures/sentiment-detail.jsonserver/api/test/load-fixture.ts(optional dev endpoint)specs/004-sentiment-detail/testplan.md
Part of Feature 004: Sentiment Detail Breakdown Page