Merge pull request #4456 from consul/clear_backspace
Clear fields in tests before filling them in
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user