Replace deprecated .trigger('click') API with .click
This commit is contained in:
@@ -149,7 +149,7 @@ feature 'Ballots' do
|
||||
end
|
||||
|
||||
within("#budget_investment_#{investment.id}") do
|
||||
find('.remove a').trigger('click')
|
||||
find('.remove a').click
|
||||
end
|
||||
|
||||
expect(page).to have_css("#amount-spent", text: "€0")
|
||||
@@ -274,7 +274,7 @@ feature 'Ballots' do
|
||||
visit budget_investments_path(budget, heading_id: california.id)
|
||||
|
||||
within("#budget_investment_#{investment1.id}") do
|
||||
find('.remove a').trigger('click')
|
||||
find('.remove a').click
|
||||
end
|
||||
|
||||
visit budget_investments_path(budget, heading_id: new_york.id)
|
||||
@@ -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").trigger('click')
|
||||
find(".remove-investment-project").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").trigger('click')
|
||||
find(".remove-investment-project").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").trigger('click')
|
||||
find(".remove-investment-project").click
|
||||
end
|
||||
|
||||
expect(page).to have_content("You have voted 0 investments")
|
||||
@@ -581,7 +581,7 @@ feature 'Ballots' do
|
||||
end
|
||||
|
||||
within("#budget_investment_#{bi1.id}") do
|
||||
find('.remove a').trigger('click')
|
||||
find('.remove a').click
|
||||
expect(page).to have_css ".add a"
|
||||
end
|
||||
|
||||
@@ -609,7 +609,7 @@ feature 'Ballots' do
|
||||
end
|
||||
|
||||
within("#budget_investment_#{bi1.id}_sidebar") do
|
||||
find('.remove-investment-project').trigger('click')
|
||||
find('.remove-investment-project').click
|
||||
end
|
||||
|
||||
expect(page).not_to have_css "#budget_investment_#{bi1.id}_sidebar"
|
||||
@@ -633,7 +633,7 @@ feature 'Ballots' do
|
||||
|
||||
within("#budget_investment_#{investment1.id}") do
|
||||
expect(page).to have_selector('.in-favor a', visible: true)
|
||||
find('.add a').trigger('click')
|
||||
find('.add a').click
|
||||
|
||||
expect(page.status_code).to eq(200)
|
||||
expect(page).not_to have_content "Remove"
|
||||
|
||||
@@ -939,7 +939,7 @@ feature 'Budget Investments' do
|
||||
login_as(user)
|
||||
visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
|
||||
|
||||
find("#tab-milestones-label").trigger('click')
|
||||
find("#tab-milestones-label").click
|
||||
|
||||
within("#tab-milestones") do
|
||||
expect(first_milestone.description).to appear_before('Last milestone with a link to https://consul.dev')
|
||||
@@ -959,7 +959,7 @@ feature 'Budget Investments' do
|
||||
login_as(user)
|
||||
visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
|
||||
|
||||
find("#tab-milestones-label").trigger('click')
|
||||
find("#tab-milestones-label").click
|
||||
|
||||
within("#tab-milestones") do
|
||||
expect(page).to have_content("Don't have defined milestones")
|
||||
|
||||
@@ -53,17 +53,17 @@ feature 'Commenting Budget::Investments' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -80,17 +80,17 @@ feature 'Internal valuation comments on Budget::Investments' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -48,17 +48,17 @@ feature 'Commenting debates' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -55,17 +55,17 @@ feature 'Commenting legislation questions' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
@@ -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").trigger('click')
|
||||
first(:css, "a").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").trigger('click')
|
||||
first(:css, "a").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").trigger('click')
|
||||
first(:css, "a").click
|
||||
end
|
||||
|
||||
comment = annotation2.comments.first
|
||||
|
||||
@@ -55,17 +55,17 @@ feature 'Commenting legislation questions' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -49,17 +49,17 @@ feature 'Commenting polls' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -47,17 +47,17 @@ feature 'Commenting proposals' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -51,17 +51,17 @@ feature 'Commenting topics from proposals' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
@@ -601,17 +601,17 @@ feature 'Commenting topics from budget investments' do
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 2)
|
||||
expect(page).not_to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{child_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 3)
|
||||
expect(page).to have_content grandchild_comment.body
|
||||
|
||||
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
|
||||
find("#comment_#{parent_comment.id}_children_arrow").click
|
||||
|
||||
expect(page).to have_css('.comment', count: 1)
|
||||
expect(page).not_to have_content child_comment.body
|
||||
|
||||
@@ -194,7 +194,7 @@ feature 'Legislation Draft Versions' do
|
||||
expect(page).to have_content "my annotation"
|
||||
expect(page).to have_content comment.body
|
||||
|
||||
all(".annotator-hl")[1].trigger('click')
|
||||
all(".annotator-hl")[1].click
|
||||
expect(page).to have_content "my other annotation"
|
||||
end
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ module CommonActions
|
||||
|
||||
def add_to_ballot(budget_investment)
|
||||
within("#budget_investment_#{budget_investment.id}") do
|
||||
find('.add a').trigger('click')
|
||||
find('.add a').click
|
||||
expect(page).to have_content "Remove"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user