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

MushroomObserver / mushroom-observer / 26446260061
96%

Build:
DEFAULT BRANCH: main
Ran 26 May 2026 10:18AM UTC
Jobs 1
Files 1009
Run time 3min
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

26 May 2026 10:14AM UTC coverage: 96.414% (+0.004%) from 96.41%
26446260061

push

github

web-flow
occurrences: move + consolidate OccurrenceForm + OccurrenceEditForm; fix 2 N+1s (#4345)

* occurrences: consolidate OccurrenceForm + OccurrenceEditForm into one Views::Controllers::Occurrences::Form

Per #4331 — moves to Views/ AND consolidates the two forms into one.
Pattern: branch on model.persisted? (the convention used by every
other form post-move). Reduces duplication of the matrix-rendering
methods (render_obs_box, render_include_checkbox, render_primary_radio,
render_occurrence_warning) that were copy-pasted between the two.

Mode differences preserved exactly:
- New: source_obs + recent_observations kwargs; source obs is
  always-included with hidden array element + 'Source' label;
  primary radio checked; Stimulus 'occurrence-form' controller +
  'source' fallback on the matrix <ul>.
- Edit: observations + candidates kwargs; renders the primary-obs
  inline detail edit section (location + date); Stimulus controller
  on the <form>; 'first-included' fallback; PATCH via Superform
  auto-emit; candidate matrix below the members.

Same form id 'occurrence_form' for both modes — no derive_form_id
change needed. Two callers (new.rb + edit.rb) updated to pass
'model:' (callers now construct Occurrence.new(primary_observation:
source_obs) explicitly in the new case).

Tests: combined unit-test file with explicit new-mode and edit-mode
sections; all 24 view tests + 73 controller tests + 1 existing
system test pass. No edit-mode system test exists (none existed
pre-consolidation either); manual edit-flow smoke recommended.

* occurrences: add edit-form system test; fix 2 N+1s exposed by it

Adds occurrence_edit_form_system_test.rb covering 4 flows:
1. Form renders members with checked Include + correct primary radio
   + inline primary-obs detail section.
2. Form renders candidates section when the user has recent
   ObservationViews for non-member observations.
3. Unchecking Include + submit actually removes the observation
   from the occurrence (r... (continued)

202 of 202 new or added lines in 7 files covered. (100.0%)

38985 of 40435 relevant lines covered (96.41%)

665.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26446260061.1 26 May 2026 10:18AM UTC 1009
96.41
GitHub Action Run
Source Files on build 26446260061
  • Tree
  • List 1009
  • Changed 5
  • Source Changed 5
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26446260061
  • 58184938 on github
  • Prev Build on 4358-edit-image-license-display (#26408331125)
  • Next Build on main (#26446266438)
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