Merge pull request #3969 from consul/fix_legislation_tag_order
Order legislation process tags alphabetically
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<%= render "shared/errors", resource: @process %>
|
<%= render "shared/errors", resource: @process %>
|
||||||
|
|
||||||
<div class="small-12 medium-8 column">
|
<div class="small-12 medium-8 column">
|
||||||
<%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s,
|
<%= f.text_field :custom_list, value: @process.tag_list_on(:customs).sort.join(", "),
|
||||||
label: t("admin.legislation.proposals.form.custom_categories"),
|
label: t("admin.legislation.proposals.form.custom_categories"),
|
||||||
hint: t("admin.legislation.proposals.form.custom_categories_description"),
|
hint: t("admin.legislation.proposals.form.custom_categories_description"),
|
||||||
placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"),
|
placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"),
|
||||||
|
|||||||
@@ -244,18 +244,20 @@ describe "Admin collaborative legislation" do
|
|||||||
visit edit_admin_legislation_process_path(process)
|
visit edit_admin_legislation_process_path(process)
|
||||||
within(".admin-content") { click_link "Proposals" }
|
within(".admin-content") { click_link "Proposals" }
|
||||||
|
|
||||||
fill_in "Categories", with: "recycling,bicycles"
|
fill_in "Categories", with: "recycling,bicycles,pollution"
|
||||||
click_button "Save changes"
|
click_button "Save changes"
|
||||||
|
|
||||||
visit admin_legislation_process_proposals_path(process)
|
visit admin_legislation_process_proposals_path(process)
|
||||||
expect(page).to have_field("Categories", with: "bicycles, recycling")
|
|
||||||
|
expect(page).to have_field("Categories", with: "bicycles, pollution, recycling")
|
||||||
|
|
||||||
within(".admin-content") { click_link "Information" }
|
within(".admin-content") { click_link "Information" }
|
||||||
fill_in "Summary", with: "Summarizing the process"
|
fill_in "Summary", with: "Summarizing the process"
|
||||||
click_button "Save changes"
|
click_button "Save changes"
|
||||||
|
|
||||||
visit admin_legislation_process_proposals_path(process)
|
visit admin_legislation_process_proposals_path(process)
|
||||||
expect(page).to have_field("Categories", with: "bicycles, recycling")
|
|
||||||
|
expect(page).to have_field("Categories", with: "bicycles, pollution, recycling")
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Edit milestones summary", :js do
|
scenario "Edit milestones summary", :js do
|
||||||
|
|||||||
Reference in New Issue
Block a user