Repository navigation
Add tests for the modals restructured in #12089 - #12094
Merged
Merged
Conversation
BecomeUserModal (sensitive: what gets sent, when it leaves the page), CreateModeratedSignupModal, NewFormItemModal, and ConvertToEventProvidedTicketModal, covering success, failure (the modal stays open and shows the error), and in-progress states. Two small changes to make them testable: BecomeUserModal is exported, and CreateModeratedSignupModal's run/event props now ask only for the fields it uses (callers pass richer objects, so nothing changes for them). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
…meout The ticket type section loads through a suspense query after an event is chosen; on CI that took longer than testing-library's default one second once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
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.
What
Tests for the four modals I restructured in #12089 without adding coverage (all were at 0%):
BecomeUserModal(identity assumption, so it's worth pinning down): the justification and bearer token that get sent, the redirect to/only on success, server errors and network failures keeping the modal open with the error shown, buttons disabled while in progress, no Authorization header without a token, no button without a profile.CreateModeratedSignupModal: the conflicting-signup warning (and when it doesn't apply: no overlap, withdrawn, concurrent play), creating the request (with the signup to replace) or adding to the ranked-choice queue, errors from both branches, the missing-signup-option error.NewFormItemModal: standard and custom items, items the form already has are disabled, the item-type choice for standard items that don't specify one, the identifier input and its reserved-identifier warning, creating the item, errors.ConvertToEventProvidedTicketModal: needs an event and ticket type, offers only ticket types the event can provide (with remaining counts), converts, errors, in-progress state.Small changes to make them testable
BecomeUserModalis now exported.CreateModeratedSignupModal'srun/eventprops are typed asPicks of the fields it uses (id,starts_at,length_seconds,can_play_concurrently). Callers pass richer objects, so nothing changes for them.No behavior changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd