Replace deprecated .trigger('click') API with .click

This commit is contained in:
Angel Perez
2018-03-08 14:33:09 -04:00
parent 6a55b720b8
commit 38af45d450
12 changed files with 42 additions and 42 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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