Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new rubocop-capybara offenses #108

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions publify_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rails-controller-testing", "~> 1.0.1"
s.add_development_dependency "rspec-rails", "~> 6.0"
s.add_development_dependency "rubocop", "~> 1.56.1"
s.add_development_dependency "rubocop-capybara", "~> 2.19.0"
s.add_development_dependency "rubocop-factory_bot", "~> 2.24.0"
s.add_development_dependency "rubocop-performance", "~> 1.19.0"
s.add_development_dependency "rubocop-rails", "~> 2.20.2"
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/admin/articles_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def base_article(options = {})
a = create(:article, keywords: '"foo bar", baz')
get :edit, params: { id: a.id }
expect(response.body)
.to have_selector("input[id=article_keywords][value='baz, \"foo bar\"']")
.to have_css("input[id=article_keywords][value='baz, \"foo bar\"']")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/author_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe "display_profile_item" do
it "displays the item as a list item if show_item is true" do
item = display_profile_item("[email protected]", "Jabber:")
expect(item).to have_selector("li", text: "Jabber: [email protected]")
expect(item).to have_css("li", text: "Jabber: [email protected]")
end

it "does not display the item empty" do
Expand All @@ -16,7 +16,7 @@

it "displays a link if the item is an url" do
item = display_profile_item("http://twitter.com/mytwitter", "Twitter:")
expect(item).to have_selector("li") do
expect(item).to have_css("li") do
have_link("http://twitter.com/mytwitter")
end
end
Expand Down