Feat/contract tests e2e smoke leak detection - #1068
Merged
RUKAYAT-CODER merged 6 commits intoAug 27, 2026
Merged
Conversation
- Create docs/openapi.yaml with full OpenAPI 3.0 specification for auth, payments, courses, users, batch, and sync endpoints - Add openapi.contract.test.ts validating Zod schemas match the spec - Extend validation.ts with auth, payment, and sync schemas - Add validation wrappers for critical endpoints - Extend validation.test.ts with comprehensive contract fixtures - Fix missing closing brace in setSessionAccessor (axios.config.ts) - Fix duplicate imports and import ordering (cache.ts, axios.config.ts) 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
- Replace broken test-e2e job with proper EAS build + Maestro flow - Build APK via EAS with preview profile, wait for completion - Download APK artifact and run Maestro tests locally - Upload JUnit results and screenshots as artifacts on failure - Add contract test step to CI after OpenAPI validation - Update existing flows (login, course, lesson, quiz) with robust selectors using optional patterns and extended wait - Add purchase flow (05-purchase-flow.yaml) covering the subscription journey 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
A parametrised smoke test discovers all routes under app/, imports each module, and renders the default export to catch mount-time ReferenceErrors. New routes are auto-included via directory glob. Added to test.yml as the first step for fast CI feedback. Fixed moduleNameMapper for @/hooks/ resolution and added root component mocks. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Enable detectOpenHandles and forceExit in jest.config.js so the suite reports leaked handles. Add teardown calls in jest.setup.js afterAll for axios cache stats interval, socket service, memoryPressureService, and networkMonitor. Create leak-detection.test.ts verifying each service exposes the required teardown API. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
subscriptionMeta.ts contains JSX and must use the .tsx extension. safeLog.ts had an extra closing brace causing a syntax error. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@ahmadogo 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! 🚀 |
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TASK 1: OpenAPI Contract Tests ✅
Created docs/openapi.yaml with the full API specification
Added src/services/api/tests/openapi.contract.test.ts — 25 tests verifying Zod schemas match the spec
Extended src/services/api/validation.ts with runtime validation guards for auth, payment, and sync responses
Extended src/services/api/tests/validation.test.ts with contract fixtures
Closes [Enhancement] Add contract tests for the API layer against the OpenAPI specification #1008
TASK 2: Maestro E2E CI Pipeline ✅
Rewrote .github/workflows/ci.yml to build a preview APK via EAS before running Maestro
Updated all 4 existing flows and added a 5th (purchase flow)
Added failure artifact upload for debugging
Closes [Enhancement] Wire the Maestro E2E flows into a job that can actually run them #1009
TASK 3: Route Smoke Tests ✅
Created tests/routes.smoke.test.ts — discovers all routes under app/, imports each, renders the default export
Auto-includes new routes via directory glob
Added as the first CI step in test.yml
Closes [Enhancement] Add a smoke test that mounts every screen in
app/#1010TASK 4: Open Handle Detection ✅
Enabled detectOpenHandles and forceExit in jest.config.js
Added afterAll teardown calls for axios, socket, memoryPressureService, and networkMonitor
Created tests/leak-detection.test.ts verifying each service exposes teardown
Closes [Enhancement] Add
--detectOpenHandlesand leak detection to the test run #1011