diff --git a/spec/system/moderation/budget_investments_spec.rb b/spec/system/moderation/budget_investments_spec.rb index 88b813c35..631a86836 100644 --- a/spec/system/moderation/budget_investments_spec.rb +++ b/spec/system/moderation/budget_investments_spec.rb @@ -114,13 +114,11 @@ describe "Moderate budget investments" do within(".js-check") { click_link "All" } - expect(all("input[type=checkbox]")).to all(be_checked) + expect(all(:checkbox)).to all(be_checked) within(".js-check") { click_link "None" } - all("input[type=checkbox]").each do |checkbox| - expect(checkbox).not_to be_checked - end + all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked } end scenario "remembering page, filter and order" do diff --git a/spec/system/moderation/comments_spec.rb b/spec/system/moderation/comments_spec.rb index 69af01fc0..8d1ff8f31 100644 --- a/spec/system/moderation/comments_spec.rb +++ b/spec/system/moderation/comments_spec.rb @@ -134,13 +134,11 @@ describe "Moderate comments" do within(".js-check") { click_link "All" } - expect(all("input[type=checkbox]")).to all(be_checked) + expect(all(:checkbox)).to all(be_checked) within(".js-check") { click_link "None" } - all("input[type=checkbox]").each do |checkbox| - expect(checkbox).not_to be_checked - end + all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked } end scenario "remembering page, filter and order" do diff --git a/spec/system/moderation/debates_spec.rb b/spec/system/moderation/debates_spec.rb index 8e3289d51..45675d264 100644 --- a/spec/system/moderation/debates_spec.rb +++ b/spec/system/moderation/debates_spec.rb @@ -103,13 +103,11 @@ describe "Moderate debates" do within(".js-check") { click_link "All" } - expect(all("input[type=checkbox]")).to all(be_checked) + expect(all(:checkbox)).to all(be_checked) within(".js-check") { click_link "None" } - all("input[type=checkbox]").each do |checkbox| - expect(checkbox).not_to be_checked - end + all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked } end scenario "remembering page, filter and order" do diff --git a/spec/system/moderation/proposal_notifications_spec.rb b/spec/system/moderation/proposal_notifications_spec.rb index 70a362a1e..55b7f0c78 100644 --- a/spec/system/moderation/proposal_notifications_spec.rb +++ b/spec/system/moderation/proposal_notifications_spec.rb @@ -114,13 +114,11 @@ describe "Moderate proposal notifications" do within(".js-check") { click_link "All" } - expect(all("input[type=checkbox]")).to all(be_checked) + expect(all(:checkbox)).to all(be_checked) within(".js-check") { click_link "None" } - all("input[type=checkbox]").each do |checkbox| - expect(checkbox).not_to be_checked - end + all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked } end scenario "remembering page, filter and order" do diff --git a/spec/system/moderation/proposals_spec.rb b/spec/system/moderation/proposals_spec.rb index 7779ad3fe..305a00dc8 100644 --- a/spec/system/moderation/proposals_spec.rb +++ b/spec/system/moderation/proposals_spec.rb @@ -102,13 +102,11 @@ describe "Moderate proposals" do within(".js-check") { click_link "All" } - expect(all("input[type=checkbox]")).to all(be_checked) + expect(all(:checkbox)).to all(be_checked) within(".js-check") { click_link "None" } - all("input[type=checkbox]").each do |checkbox| - expect(checkbox).not_to be_checked - end + all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked } end scenario "remembering page, filter and order" do