Repository navigation
Release 1.2.0: close the gaps found while replacing capybara_active_admin - #3
Merged
Merged
Conversation
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
Co-Authored-By: Clanker
Co-Authored-By: Clanker
Co-Authored-By: Clanker
Co-Authored-By: Clanker
There was a problem hiding this comment.
🟡 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
Co-Authored-By: Clanker
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.

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 onActionItems: the section lookup raises before any section method runs when a page has no title bar.BatchActions#clickis a separate method rather thanopen_dialog(wait: false), so one method does not return two kinds of result.MainMenu#has_submenu?checks for children instead of matchinghref: "#", which reads as "no link" by design.:_memokeeps its underscore; a String still goes throughparameterize.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.