Skip to content

Release 1.2.0: close the gaps found while replacing capybara_active_admin - #3

Merged
senid231 merged 7 commits into
1-x-stablefrom
gaps-1x-v1.2
Dec 2, 2026
Merged

senid231 merged 7 commits into
1-x-stablefrom
gaps-1x-v1.2

Conversation

@senid231

@senid231 senid231 commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Release 1.2.0 for ActiveAdmin 3. It closes the gaps I found while replacing capybara_active_admin and its own shims with this gem. The CHANGELOG lists each change.

Decisions the diff does not show:

  • has_action_item?/has_no_action_item? live on the page, not on ActionItems: the section lookup raises before any section method runs when a page has no title bar.
  • BatchActions#click is a separate method rather than open_dialog(wait: false), so one method does not return two kinds of result.
  • MainMenu#has_submenu? checks for children instead of matching href: "#", which reads as "no link" by design.
  • A Symbol key that is already a slug stays as it is, so :_memo keeps its underscore; a String still goes through parameterize.

The dummy app gains a check_boxes filter, a labelled has_many, a JavaScript-refused batch action and a custom batch action page, each behind a query parameter or on its own route, so existing specs see the same pages.

Verified with the full suite (457 examples) and RuboCop. Each bug fix has a spec that failed before it.

Also fix Comments#add with automatic reload off and keep a leading
underscore in Symbol field keys.

Co-Authored-By: Clanker
Co-Authored-By: Clanker

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved issues break underscore-prefixed table and row lookups, allow nested labels to match outer fieldsets, and incorrectly strip literal trailing asterisks from optional labels.

3 open issues
What changed in this PR

Releases version 1.2.0 with ActiveAdmin 3 page-object helpers and compatibility fixes for applications replacing capybara_active_admin.

Changes:

  • Adds checkbox filters, label-based fieldset lookup, and navigation helpers.
  • Improves form identification, required-field detection, and comment submission handling.
  • Adds regression specs, dummy-app fixtures, and usage documentation.
File Description
spec/​dummy/​app/​views/​admin/​orders/​combined_refund.html.erb Adds custom batch-form fixture.
spec/​dummy/​app/​models/​customer.rb Supports new field and filter fixtures.
spec/​dummy/​app/​assets/​javascripts/​active_admin.js Simulates refused batch actions.
spec/​dummy/​app/​admin/​orders.rb Adds custom refund route.
spec/​dummy/​app/​admin/​customers.rb Adds conditional test fixtures.
spec/​active_admin_page_objects/​text_spec.rb Tests underscore preservation and version.
spec/​active_admin_page_objects/​tabs_spec.rb Tests labelled tab bodies.
spec/​active_admin_page_objects/​scopes_spec.rb Tests scope URLs.
spec/​active_admin_page_objects/​modal_dialog_spec.rb Tests field selector options.
spec/​active_admin_page_objects/​main_menu_spec.rb Tests submenu detection.
spec/​active_admin_page_objects/​has_many_spec.rb Tests labelled fieldset lookup.
spec/​active_admin_page_objects/​form_spec.rb Tests form identification and required markers.
spec/​active_admin_page_objects/​filters_spec.rb Tests checkbox filters.
spec/​active_admin_page_objects/​comments_spec.rb Tests submission without automatic reload.
spec/​active_admin_page_objects/​batch_actions_spec.rb Tests direct action clicks.
spec/​active_admin_page_objects/​action_items_spec.rb Tests missing-container handling.
README.md Documents new APIs and behavior.
lib/​active_admin_page_objects/​version.rb Sets version 1.2.0.
lib/​active_admin_page_objects/​text.rb Preserves slug-like Symbol keys.
lib/​active_admin_page_objects/​tabs.rb Adds labelled body lookup.
lib/​active_admin_page_objects/​selectors.rb Adds checkbox and required-marker selectors.
lib/​active_admin_page_objects/​scopes.rb Exposes scope URLs.
lib/​active_admin_page_objects/​modal_dialog.rb Supports Capybara field filters.
lib/​active_admin_page_objects/​main_menu.rb Adds submenu predicates.
lib/​active_admin_page_objects/​layout.rb Adds page-level action-item predicates.
lib/​active_admin_page_objects/​has_many.rb Adds labelled fieldset lookup and predicates.
lib/​active_admin_page_objects/​form.rb Adds explicit object names and marker detection.
lib/​active_admin_page_objects/​filters/​check_boxes_filter.rb Implements checkbox filter controls.
lib/​active_admin_page_objects/​filters.rb Registers checkbox filters.
lib/​active_admin_page_objects/​fields.rb Skips unkeyed controls during prefix detection.
lib/​active_admin_page_objects/​comments.rb Checks submitted comments on the reloaded page.
lib/​active_admin_page_objects/​batch_actions.rb Adds clicks without dialog waiting.
CHANGELOG.md Records release additions and fixes.

Review effort: Balanced

Comment thread lib/active_admin_page_objects/text.rb Resolved
@senid231
senid231 merged commit 06756ee into 1-x-stable Dec 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants