• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 26682743178 / 1
96%
main: 96%

Build:
DEFAULT BRANCH: main
Ran 30 May 2026 11:37AM UTC
Files 1046
Run time 19s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 May 2026 11:32AM UTC coverage: 96.49%. Remained the same
26682743178.1

push

github

web-flow
testing.md: ban cosmetic Bootstrap classes in component tests (with styling-abstraction exception); sweep incidental cases (#4397)

Component tests routinely pin Bootstrap styling / spacing / typography classes — `.btn`, `.btn-sm`, `.btn-outline-default`, `.mt-3`, `.ml-4`, `.help-note`, `.help-block`, `.font-weight-bold`, etc. — in their selectors. With Bootstrap 4 / 5 on the upgrade path, every test that pinned the old name turns into churn the moment the upgrade lands.

Adds a section to `.claude/rules/testing.md` under **Component Test Structure** that:

- States the rule: assert on contract attrs (`href`, `data-*`, `name`, `type`, `aria-*`, `target`, `rel`, `id`), not Bootstrap styling.
- Carves out visibility classes (`.d-none`, `.hidden`, `[hidden]`) and structural Bootstrap component slots (`.modal-body`, `.modal-footer`, `.panel-heading`, `.input-group`) — those carry behavior / placement.
- Calls out the styling-abstraction exception: tests for components whose *job* is to produce specific Bootstrap classes (`CrudButton`, `Panel`, `Modal`, `Alert`, the `ApplicationForm` field-helper wrapper options — `:monospace` → `text-monospace`, `:center` → `center-block`, `wrap_class:` flow-through, `:button` → `input-group` / `input-group-btn`, etc.) *should* assert the classes — the class output IS the contract. When Bootstrap upgrades, helper + tests update together.
- Gives a "would dropping the class assertion gut the test?" heuristic.

**Sweep** is intentionally conservative — four view-level test files where the cosmetic class was clearly incidental (the element had a stronger id / data-attr / structural anchor already):

- `account_preferences_form_test.rb`: drop `.help-note`, `p.help-note`, `div.help-block.mt-4` (incidental; switch to text-presence + `[href*=...]` assertions).
- `form_location_feedback_test.rb`: collapse `.alert-warning#dubious_location_messages.my-3` to `#dubious_location_messages`.
- `form_location_map_test.rb`: drop `.btn-gro... (continued)

39779 of 41226 relevant lines covered (96.49%)

674.27 hits per line

Source Files on job 26682743178.1
  • Tree
  • List 1046
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26682743178
  • c31b77c2 on github
  • Prev Job for on main (#26682542179.1)
  • Next Job for on main (#26695961369.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc