Repository navigation
Conversation
Add an integration suite that discovers the full route graph from the application's Swagger document and calls every mounted operation, so new endpoints are covered automatically. Fixture-backed flows then exercise puzzle discovery, admin creation/publication, submission grading, rewards and duplicate-claim prevention, content, and categories against a seeded test database. Add reusable reset/seed fixtures, a coverage-reporting e2e script, and a CI step that uploads the report as an artifact. Fix the Progress entity's invalid uuid+length column, which prevented TypeORM from building its metadata outside the application. Closes UnityChainxx#756 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@nasalehj 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! 🚀 |
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.
Summary
Resolves #756. Adds
backend/test/api-integration.e2e-spec.tsto the e2e run, with reusable DB fixtures, live route discovery, and coverage reporting in CI.Automated coverage of all public API endpoints
Cannot <METHOD>404 fails the suite, proving the route is mounted./puzzles/active,/puzzle-submission,/health/live) and to yield more than 50 operations.Test DB fixtures
backend/test/fixtures/test-database.fixture.tsprovidesresetDatabase()(truncates every entity table withRESTART IDENTITY CASCADE) andseedDatabase()(deterministic admin, player, active/inactive puzzles, completion, reward, category, category puzzle, content, and progress).Runs in CI + reports coverage
npm run test:e2e:covwrites text-summary + lcov tocoverage-e2e/.backend-e2ejob now runs with coverage and uploadsbackend-e2e-coverageas an artifact.Supporting fix
Progress.userIddeclaredtype: 'uuid'withlength: 128, which makes TypeORM throwColumn userId of Entity Progress does not support length propertywhen building metadata outside the full app. Removed the invalidlength.Verification
seedDatabase()inserted 1 admin, 1 user, 2 puzzles, 1 reward, and 1 content row;resetDatabase()then left every table empty.tsc --noEmitreports no errors for the new files.SyntaxError: Unexpected token 'export'from@nestjs/schedule/@nestjs/typeorm), which also blocks the pre-existingapp.e2e-spec.tsfrom running locally. The new spec is subject to the same pre-existing runner configuration; the suite itself is wired into the existingbackend-e2eCI job and will run wherever that job runs.Closes #756