Repository navigation
test: cover court-date decorator and split typeahead audit (#5563) - #7228
Open
augustocbx wants to merge 2 commits into
Open
augustocbx wants to merge 2 commits into
augustocbx wants to merge 2 commits into
Conversation
augustocbx
requested review from
FireLemons,
compwron and
elasticspoon
as code owners
October 7, 2026 02:13
This branch has not been deployed
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 github issue is this PR for, if any?
Part of #5563. Replaces one stub spec; the umbrella stays open for the 15 remaining stubs.
What changed, and why?
Replace the pending
CourtDateDecoratorspec with six examples covering full date formatting, combined date and hearing labels, and missing values. The examples exercise real decorated models with built associations, fixed dates, and a scoped English locale.Split the existing 21-control typeahead audit into four examples after its single, 16-page example exceeded the 60-second deadline in CI. All controls, assertions, dialog interactions, and role transitions are preserved, with inventory counts of 4 + 6 + 6 + 5. Each example retains the existing 60-second deadline; no timeout, browser configuration, or production behavior changes.
How is this tested? (please write rspec and jest tests!) 💖💪
With Ruby 4.0.6 and an isolated PostgreSQL test database:
CI=true RUN_SIMPLECOV=true TEST_MAX_DURATION=60 rbenv exec bundle exec rspec spec/system/typeahead_controls_spec.rb spec/system/banners/activate_spec.rb spec/system/analytics/index_spec.rb spec/decorators/court_date_decorator_spec.rb --seed 33779 --profile 10— 14 examples, 0 failures; each split audit took 5–12 seconds locally.rbenv exec bundle exec rspec spec/decorators spec/models/court_date_spec.rb --seed 5563— 110 examples, 0 failures, 4 preexisting pending stubs in other decorators.rbenv exec bundle exec standardrb spec/decorators/court_date_decorator_spec.rb spec/system/typeahead_controls_spec.rb --format progress— no offenses./bin/sh ./bin/git_hooks/lint --stagedwith Ruby 4.0.6 on PATH — passed, honoring existing.standard_todo.ymlexclusions; no files modified.git diff --cached --check— passed.Four temporary mutations to date format, missing-value compaction, hearing name, and nil-date default each caused the expected failures. Production source was restored exactly.
The original typeahead audit passed locally in about 32 seconds with one browser; the initial CI run timed out at the fifteenth control, followed by browser errors in four later examples. Independent comparison confirms every audit call and argument is preserved in the split.
An initial local related run encountered seeded test data from
db:prepare; schema-only setup of the dedicated temporary database resolved it. Full parallel RSpec CI on72ac6d752: 3,769 examples, 0 failures, 20 existing pending tests. Coverage merged successfully (91.76% line coverage); external Qlty upload could not authenticate because the fork run has no upload token. That step is non-blocking in the existing workflow. Docker validation also passed. All 12 PR checks are green on this commit.Screenshots please :)
Not applicable — test-only changes.