Use visible texts in tests

Content like lowercase letters with `text-transform: uppercase` or
spaces after elements with `display: block` or "You're on page:" are not
seen that way by users with a browser supporting CSS.

So we're testing what most users actually experience.
This commit is contained in:
Javi Martín
2021-03-30 20:00:57 +02:00
parent 23945c2a7c
commit 9cfcbf2f3b
15 changed files with 122 additions and 121 deletions

View File

@@ -26,7 +26,7 @@ describe "Admin budgets", :admin do
expect(page).to have_content "Accepting projects"
end
scenario "Filters by phase" do
scenario "Filters by phase", :js do
drafting_budget = create(:budget, :drafting)
accepting_budget = create(:budget, :accepting)
selecting_budget = create(:budget, :selecting)
@@ -41,7 +41,7 @@ describe "Admin budgets", :admin do
expect(page).to have_content(finished_budget.name)
within "#budget_#{finished_budget.id}" do
expect(page).to have_content("Completed")
expect(page).to have_content("COMPLETED")
end
click_link "Finished"