Fix failing tests that simulated a click against the DOM
The now-deprecated `.trigger('click')` API simulated a click against
the DOM rather a click on the UI, which made our tests fragile and
wouldn't simulate actual user interaction
This commit is contained in:
@@ -375,7 +375,7 @@ feature 'Ballots' do
|
||||
expect(page).to have_content("You have voted one investment")
|
||||
|
||||
within("#budget_investment_#{investment.id}") do
|
||||
find(".remove-investment-project").click
|
||||
find('.icon-x').click
|
||||
end
|
||||
|
||||
expect(page).to have_current_path(budget_ballot_path(budget))
|
||||
@@ -404,7 +404,7 @@ feature 'Ballots' do
|
||||
end
|
||||
|
||||
within("#sidebar #budget_investment_#{investment1.id}_sidebar") do
|
||||
find(".remove-investment-project").click
|
||||
find('.icon-x').click
|
||||
end
|
||||
|
||||
expect(page).to have_css("#amount-spent", text: "€20,000")
|
||||
@@ -431,7 +431,7 @@ feature 'Ballots' do
|
||||
expect(page).to have_content("You have voted one investment")
|
||||
|
||||
within("#budget_investment_#{investment.id}") do
|
||||
find(".remove-investment-project").click
|
||||
find('.icon-x').click
|
||||
end
|
||||
|
||||
expect(page).to have_content("You have voted 0 investments")
|
||||
@@ -609,7 +609,7 @@ feature 'Ballots' do
|
||||
end
|
||||
|
||||
within("#budget_investment_#{bi1.id}_sidebar") do
|
||||
find('.remove-investment-project').click
|
||||
find('.icon-x').click
|
||||
end
|
||||
|
||||
expect(page).not_to have_css "#budget_investment_#{bi1.id}_sidebar"
|
||||
|
||||
@@ -620,7 +620,7 @@ feature 'Commenting legislation questions' do
|
||||
|
||||
scenario 'View comments of annotations in an included range' do
|
||||
within("#annotation-link") do
|
||||
first(:css, "a").click
|
||||
find('.icon-expand').click
|
||||
end
|
||||
|
||||
expect(page).to have_css(".comment", count: 2)
|
||||
@@ -656,7 +656,7 @@ feature 'Commenting legislation questions' do
|
||||
end
|
||||
|
||||
within("#annotation-link") do
|
||||
first(:css, "a").click
|
||||
find('.icon-expand').click
|
||||
end
|
||||
|
||||
expect(page).to have_css(".comment", count: 3)
|
||||
@@ -667,7 +667,7 @@ feature 'Commenting legislation questions' do
|
||||
|
||||
scenario "Reply on a multiple annotation thread and display it in the single annotation thread" do
|
||||
within("#annotation-link") do
|
||||
first(:css, "a").click
|
||||
find('.icon-expand').click
|
||||
end
|
||||
|
||||
comment = annotation2.comments.first
|
||||
|
||||
Reference in New Issue
Block a user