Repository navigation
Release 2.0.0.beta3: attributes table and form checks - #7
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Empty-row checks mishandle hidden cells, violate the non-waiting contract, and leave comma-separated marker selectors unscoped, allowing incorrect results from other rows.
2 open issues
What changed in this PR
Adds reusable attributes-table helpers to the page-object API, reducing application-specific code.
Changes:
- Exposes row keys in page order.
- Adds empty-marker checks with a theme-overridable selector.
- Provides panel-scoped attributes tables, with documentation and tests.
| File | Description |
|---|---|
spec/dummy/app/admin/documents.rb |
Adds a panel containing a second attributes table. |
spec/active_admin_page_objects/attributes_table_spec.rb |
Tests row order, empty markers, and panel access across drivers. |
README.md |
Documents the new helpers. |
lib/active_admin_page_objects/selectors.rb |
Registers the empty-marker selector. |
lib/active_admin_page_objects/panel.rb |
Adds attributes-table access with subclass support. |
lib/active_admin_page_objects/attributes_table.rb |
Implements row keys and empty-value predicates. |
CHANGELOG.md |
Records the additions under Unreleased. |
Review effort: Balanced
senid231
commented
Dec 4, 2026
Adds AttributesTable#row_keys and the empty-value checks (empty?, has_empty_row?, has_no_empty_row?), plus Form#has_input? and #has_submit?. The field check is named has_input? because a section's has_field? is Capybara's own lookup by label. A table in a panel needs no helper: the README shows it declared as a section inside the panel's section. Co-Authored-By: Clanker
senid231
force-pushed
the
attributes-table-helpers
branch
from
December 4, 2026 09:02
a49407c to
0aefab5
Compare
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.

Releases 2.0.0.beta3: bumps
VERSIONand names the CHANGELOG section, so thev2.0.0.beta3tag can go on the merge commit. The release adds helpers that apps wrote themselves:AttributesTable#row_keysfor the row order,#empty?(key)withhave_empty_rowfor ActiveAdmin's empty marker, andForm#has_input?and#has_submit?.Decisions the diff does not show:
row_keysreturns the keys and leaves the order check to the spec, asTable#header_namesdoes for columns..attributes-table-empty-value, which ActiveAdmin 4 renders only in attributes tables. The check looks inside the row's cell, so a theme's selector with a comma stays scoped.has_input?, nothas_field?: a form section'shas_field?is Capybara's lookup by label, and RSpec'shave_fieldcalls Capybara's matcher.After this merges, the tag goes on the merge commit with a GitHub pre-release; nothing goes to RubyGems. Verified with the full suite (460 examples) and RuboCop.