rubocop / rubocop-capybara

Code style checking for Capybara files.
https://docs.rubocop.org/rubocop-capybara
MIT License
40 stars 8 forks source link

Expand `Capybara/NegationMatcher` to support `have_content` #38

Closed OskarsEzerins closed 1 year ago

OskarsEzerins commented 1 year ago

Added content to the list of matchers for Capybara/NegationMatcher. It allows said cop to check for not_to have_content, correct it to to have_no_content and vice versa.

have_content is not included in Capybara list of have_no_.. matchers but is rather aliased to have_no_text. (source). I'm not sure if thats perhaps a problem for this PR`s change. Maybe a different approach has to be taken due to above said.


Before submitting the PR make sure the following are checked:

ydah commented 1 year ago

@OskarsEzerins Could you rebase to the latest main branch?

ydah commented 1 year ago

@OskarsEzerins Thank you for doing a great work!