Add and apply Capybara/RSpec/HaveSelector rule
This rule was added in rubocop-capybara 2.19.0. We were following it about 85% of the time. Now we won't have to check both have_css and have_selector when searching the code.
This commit is contained in:
@@ -39,7 +39,7 @@ describe "Documents", :admin do
|
||||
|
||||
visit admin_site_customization_documents_path
|
||||
|
||||
expect(page).to have_selector("#documents .document-row", count: per_page)
|
||||
expect(page).to have_css "#documents .document-row", count: per_page
|
||||
|
||||
within("ul.pagination") do
|
||||
expect(page).to have_content("1")
|
||||
@@ -48,7 +48,7 @@ describe "Documents", :admin do
|
||||
click_link "Next", exact: false
|
||||
end
|
||||
|
||||
expect(page).to have_selector("#documents .document-row", count: 2)
|
||||
expect(page).to have_css "#documents .document-row", count: 2
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
|
||||
Reference in New Issue
Block a user