rubocop / rubocop-capybara

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

`click_on` vs `click_link` and `click_button` #58

Closed ydakuka closed 11 months ago

ydakuka commented 1 year ago

Reference: https://github.com/teamcapybara/capybara/blob/master/lib/capybara/node/actions.rb

There is no information which style is preferred.

1.

click_link 'New Project'
click_button 'Save'

2.

click_on 'New Project'
click_on 'Save'
ydah commented 1 year ago

Consider also that click_on is an alias for click_link_or_button.