Conversation
# Conflicts: # config/environments/production.rb # config/initializers/action_mailer_ses.rb
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.
Summary
Adds test coverage for the Administrate admin dashboards ahead of the planned
administrate0.20 -> 1.0 upgrade, and fixes two real bugs found while writing it - both were breaking the letters admin form in production.LettersController/EntitiesControllerlogic (date-range filtering, referer-based param restoration, blank-label exclusion,e_typepre-population)Administrate::Fieldsubclasses (HasManyThroughField,RichTextField's sanitize allowlist,ContenteditableField) and dashboard-level specs (display_resource,LetterDashboard#permitted_attributes)Bugs fixed
HasManyThroughField#associated_resource_optionshardcodedorder: { e_type: :asc }in its Elasticsearch query, bute_typewas never mapped as sortable - this crashed the letters new/edit page for every letter. Fixed by sorting in Ruby after the search instead of asking Elasticsearch to sort.Cannot read properties of null) because of two dead lines referencing anauthenticity_tokenfield thisapi_onlyapp never renders. Removed them; neither variable was ever used afterward.Known bugs documented, not fixed
10 pre-existing bugs surfaced by the new specs are left as
pending/skipwith the exact root cause in each - wrongaccessible_action?argument order inmentions/edit.html.erbandmedia/show.html.erb, a flat-vs-nested view-iteration bug inmentions/_form.html.erb, andLetterDashboard::ATTRIBUTE_TYPESmissing a:publishedentry that breaks both show and index pages.Test plan
spec/requests/admin,spec/fields,spec/dashboards,spec/system)