Repository navigation
Dedupe seminar attendance test helpers - #139
Merged
Merged
Conversation
- rejectKlass() now reuses askForKlass() instead of duplicating the ask+respond literal - Add seminarBuilder() factory for the User/Teacher/Klass/Student/StudentKlass/Text seed combo repeated across most seminar-attendance tests Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MX2QnzzPvash7UmemgUPL9
There was a problem hiding this comment.
Pull request overview
Cleanup seminar-attendance IVR test helpers in YemotHandlerService Jest suite. Reduce repeated scenario-step + seed boilerplate, keep behavior same.
Changes:
rejectKlass()now reusesaskForKlass()step helper- Add
seminarBuilder()factory for common recognized-teacher + klass-roster seed set, update multiple seminar tests to use it
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Follow-up cleanup on
yemot-handler.service.test.tsafter #138, per review feedback that the seminar-attendance test helpers were repeating text/boilerplate.rejectKlass()now reusesaskForKlass()instead of duplicating the.systemAsks(/enter klass number/i).userResponds(klassKey)literal —askForKlasshad dropped to a single real caller (entersKlass) after the prior refactor, so this gives it two genuine callers instead of leaving it as unnecessary indirection.seminarBuilder()factory for theUser/Teacher/Klass/Student/StudentKlass/Textseed combo that was repeated verbatim across 7 of the 10 seminar-attendance tests (only klass/permissions/trailing seeds varied). The 3 tests that deliberately seed a narrower set (no recognized teacher, no roster, customAttReport) keep their own explicit builder.Net: -26 lines, no behavior change.
Testing
Full server suite: 100 suites / 941 tests passing.
🤖 Generated with Claude Code
Generated by Claude Code