Repository navigation
Conversation
Co-Authored-By: Clanker
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the ActiveAdmin form and comment fixes.
No open issues 🎉
What changed in this PR
Releases ActiveAdminPageObjects 1.2.1 with two fixes for ActiveAdmin 3 forms and comments.
Changes:
- Finds labelled has-many fieldsets when validation errors wrap their labels.
- Checks saved comments even when a reload hides the comments tab.
- Adds regression coverage and updates release metadata.
| File | Description |
|---|---|
spec/dummy/app/admin/customers.rb |
Adds tabbed comments and preserves labels after validation errors. |
spec/active_admin_page_objects/text_spec.rb |
Updates the expected version to 1.2.1. |
spec/active_admin_page_objects/has_many_spec.rb |
Covers labelled fieldset lookup after validation errors. |
spec/active_admin_page_objects/comments_spec.rb |
Covers adding comments in tabs hidden after reload. |
lib/active_admin_page_objects/version.rb |
Bumps the release version to 1.2.1. |
lib/active_admin_page_objects/has_many.rb |
Matches labels inside error wrappers. |
lib/active_admin_page_objects/comments.rb |
Includes hidden comment bodies in the post-submit check. |
CHANGELOG.md |
Documents both fixes. |
Review effort: Balanced
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.1 for ActiveAdmin 3. It fixes two 1.2.0 bugs that an app's full suite found.
HasMany#fieldset(label:)missed a fieldset after a validation error. Rails'field_error_procwraps the label indiv.field_with_errors, and the lookup wanted the label as a direct child of the input wrapper. The other label lookups search descendants, so the wrapper does not affect them.Comments#addfailed when the comments panel sits in a tab that the reload hides. The comment was saved, but the check wanted a visible body. It now compares the text of visible and hidden bodies.The dummy app's labelled has_many now depends on the customer's external id instead of a query parameter, so the form re-rendered with errors keeps the labels.
Verified with the full suite (462 examples) and RuboCop. Both new specs failed before the fix.