Repository navigation
Conversation
Added JwtValidationTests for parameterized JWT auth tests in GraphQL, covering expired, tampered, malformed, and missing-claim tokens. Introduced JwtTestTokenFactory to generate test tokens with specific properties. Ensured protected operations return correct errors
Added tests to verify that querying matches by round returns only matches from the specified round and that querying a non-existent round returns an empty result set.
Added ParticipantQueryTests covering: - Sorting by slot number (asc/desc) - Filtering by min slot number - Filtering by participant ID
Added SlotNumberAssignmentTests to verify unique, strictly increasing slot numbers for tournament participants. Tests cover sequential adds, joins, interleaved operations, and race conditions to ensure no gaps or duplicates in slot assignments.
Added tests to verify participant email visibility in tournament queries for anonymous users, unrelated users, and private email owners, ensuring correct privacy handling in all scenarios.
Added tests to verify filtering played tournaments by name, filtering won matches by round, and sorting played tournaments by name in descending order.
Expanded TournamentQueries and UserQueries with new GraphQL query constants for advanced filtering, sorting, and data retrieval. Includes queries for participants by slot or ID, participants' won tournaments and matches, all matches and players in a tournament, and user-played tournaments with name filters and sorting.
Added ApplicationUserSchemaTests to verify the GraphQL ApplicationUser type. Ensured only allow-listed fields are exposed and internal identity fields are not present in the schema.
Added <InternalsVisibleTo> to allow TournamentAPI.UnitTests project to access internal types for improved unit testing coverage.
Added WonMatches of type MatchesByBracketConnection? to ApplicationUserNode in ResponseModels.cs to represent user's won matches by bracket.
Dejmenek
deleted the
test/137-expand-test-coverage-for-the-implementation-first-graphql-migration
branch
September 24, 2026 18:01
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
Introduces comprehensive integration and unit tests for GraphQL endpoints, focusing on authentication, query efficiency, and data privacy. Improves test utilities and ensures internal fields are not exposed.
Changes
JwtValidationTests.cs,BatchingTests.cs,ParticipantQueryTests.cs,SlotNumberAssignmentTests.cs,ApplicationUserSchemaTests.cs) targeting authentication, batching, and participant/tournament queries.QueryCommandRecorderand integrated it into the test web app factory to verify database query batching.JwtTestTokenFactoryfor generating various JWT tokens to test authentication error handling.ApplicationUserGraphQL type to allow-listed fields only.