chore: test infrastructure improvements (#821, #822, #824, #932)#1779
Conversation
|
@SharifIbrahimDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Great job so far There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass? |
…nto fix/test-infra-improvements
…nto fix/test-infra-improvements
|
Hi @RUKAYAT-CODER , thanks for the feedback. I've addressed the CI issues by removing duplicate MSW hooks, mocking next/font, adding the required React import, and fixing the remaining Vitest failures. The branch is also up to date with main. Could you please approve the pending workflows and take another look when you have a chance? Thanks! |
|
Thank you for contributing to the project. |
What does this PR do?
Implements foundational testing infrastructure improvements across the frontend and backend, enabling more robust CI workflows and local development verification.
Why?
Closes #821 — [FE-032] Add API client mocks for lib/api/quests.test.ts to avoid live env dependency
Closes #822 — [FE-033] Split frontend tests into unit and integration scripts
Closes #824 — [FE-035] Add smoke test for root layout hydration with global error boundary
Closes #932 — [BE-021] Add backend .env.test loading strategy for e2e/integration
Type of Change
Infrastructure / Testing
How was it tested?
FE-032/FE-033: MSW lifecycle added (server.listen(), server.close()) to ensure the tests run purely against mocked local state. vitest.config.ts matches script parameters via --exclude and --include to seamlessly split test:unit and test:integration.
FE-035: Basic un-mocked hydration check established via render() guaranteeing global boundaries compile properly.
BE-021: Unified .env.test configuration injected directly into setup-e2e-env.ts matching existing integration strategies.
Checklist
Tests added and passing
Follows project conventions
Risk
None — Purely testing enhancements. Does not impact production artifacts.