Skip to content

test: cover court-date decorator and split typeahead audit (#5563) - #7228

Open
augustocbx wants to merge 2 commits into
rubyforgood:mainfrom
augustocbx:5563-court-date-decorator-spec
Open

augustocbx wants to merge 2 commits into
rubyforgood:mainfrom
augustocbx:5563-court-date-decorator-spec

Conversation

@augustocbx

@augustocbx augustocbx commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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 CourtDateDecorator spec 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 --staged with Ruby 4.0.6 on PATH — passed, honoring existing .standard_todo.yml exclusions; 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 on 72ac6d752: 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.

@github-actions github-actions Bot added 🧪 Tests Tests ruby Touches Ruby code labels Oct 7, 2026
@augustocbx augustocbx changed the title test: replace CourtDateDecorator spec stub with real tests (#5563) test: cover court-date decorator and split typeahead audit (#5563) Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant