Specify group in the "No headings" message
Since the message might appear several times on the same page, it's useful to give a bit more context. Besides, usability tests show that when there's a group with no headings, there's no clear indication on the page that the group is actually a group and not a heading. We're also adding some emphasis to the group name in the "Showing headings" message, to be consistent with the emphasis we've added the the group name in the "No headings" message.
This commit is contained in:
@@ -19,10 +19,12 @@ describe "Admin budget headings", :admin do
|
||||
|
||||
context "List of headings in the budget page" do
|
||||
scenario "Displaying no headings for group" do
|
||||
group.update!(name: "Universities")
|
||||
|
||||
visit admin_budget_path(budget)
|
||||
|
||||
within "section", text: "Groups and headings" do
|
||||
expect(page).to have_content "There are no headings."
|
||||
expect(page).to have_content "There are no headings in the Universities group."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ describe "Budgets creation wizard", :admin do
|
||||
click_link "Continue to headings"
|
||||
|
||||
expect(page).to have_content "Showing headings from the All city group"
|
||||
expect(page).to have_content "There are no headings."
|
||||
expect(page).to have_content "There are no headings in the All city group."
|
||||
|
||||
click_button "Add new heading"
|
||||
fill_in "Heading name", with: "All city"
|
||||
@@ -71,10 +71,10 @@ describe "Budgets creation wizard", :admin do
|
||||
|
||||
expect(page).to have_content "Heading created successfully!"
|
||||
within_table("Headings in All city") { expect(page).to have_content "All city" }
|
||||
expect(page).not_to have_content "There are no headings."
|
||||
expect(page).not_to have_content "There are no headings"
|
||||
|
||||
click_link "Manage headings from the Districts group."
|
||||
expect(page).to have_content "There are no headings."
|
||||
expect(page).to have_content "There are no headings in the Districts group."
|
||||
|
||||
click_button "Add new heading"
|
||||
fill_in "Heading name", with: "North"
|
||||
@@ -83,7 +83,7 @@ describe "Budgets creation wizard", :admin do
|
||||
|
||||
expect(page).to have_content "Heading created successfully!"
|
||||
within_table("Headings in Districts") { expect(page).to have_content "North" }
|
||||
expect(page).not_to have_content "There are no headings."
|
||||
expect(page).not_to have_content "There are no headings"
|
||||
|
||||
click_button "Add new heading"
|
||||
fill_in "Heading name", with: "South"
|
||||
|
||||
Reference in New Issue
Block a user