Merge pull request #4456 from consul/clear_backspace

Clear fields in tests before filling them in
This commit is contained in:
Javi Martín
2021-04-12 16:25:08 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ end
Capybara.exact = true
Capybara.enable_aria_label = true
Capybara.default_set_options = { clear: :backspace }
Capybara.disable_animation = true
OmniAuth.config.test_mode = true

View File

@@ -630,6 +630,7 @@ describe "Ballots" do
scenario "Edge case voting a non-elegible investment" do
investment1 = create(:budget_investment, :selected, heading: new_york, price: 10000)
admin_user = create(:administrator).user
in_browser(:user) do
login_as user
@@ -639,12 +640,16 @@ describe "Ballots" do
end
in_browser(:admin) do
login_as create(:administrator).user
login_as admin_user
visit edit_admin_budget_group_heading_path(budget, states, new_york)
fill_in "Amount", with: 10
click_button "Save heading"
expect(page).to have_content "Heading updated successfully"
within "tr", text: "New York" do
expect(page).to have_css "td", exact_text: "€10"
end
end
in_browser(:user) do