From 0c32a927128bbf3959ffab37f4949a75821d4574 Mon Sep 17 00:00:00 2001 From: Masafumi Koba Date: Thu, 23 May 2019 09:36:26 +0900 Subject: [PATCH] Improve `Capybara::Node::Actions` API doc For readability on source code and usability on [rubydoc.info](https://www.rubydoc.info/). Summary: - Change plain-text references to links. - Simplify links. (e.g. `{Capybara::Node::Actions#click_button}` -> `{#click_button}`) - Fix some typos and grammar errors. This change is extracted from #2190. --- lib/capybara/node/actions.rb | 56 +++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/lib/capybara/node/actions.rb b/lib/capybara/node/actions.rb index 21c711f1..03f72aec 100644 --- a/lib/capybara/node/actions.rb +++ b/lib/capybara/node/actions.rb @@ -13,12 +13,12 @@ module Capybara ## # - # Finds a button or link and clicks it. See {Capybara::Node::Actions#click_button} and - # {Capybara::Node::Actions#click_link} for what locator will match against for each type of element + # Finds a button or link and clicks it. See {#click_button} and + # {#click_link} for what locator will match against for each type of element. # # @overload click_link_or_button([locator], **options) # @macro waiting_behavior - # @param [String] locator See {Capybara::Node::Actions#click_button} and {Capybara::Node::Actions#click_link} + # @param [String] locator See {#click_button} and {#click_link} # # @return [Capybara::Node::Element] The element clicked # @@ -29,13 +29,13 @@ module Capybara ## # - # Finds a link by id, Capybara.test_id attribute, text or title and clicks it. Also looks at image + # Finds a link by id, {Capybara.configure test_id} attribute, text or title and clicks it. Also looks at image # alt text inside the link. # # @overload click_link([locator], **options) # @macro waiting_behavior - # @param [String] locator text, id, Capybara.test_id attribute, title or nested image's alt attribute - # @param options See {Capybara::Node::Finders#find_link} + # @param [String] locator text, id, {Capybara.configure test_id} attribute, title or nested image's alt attribute + # @param [Hash] options See {Capybara::Node::Finders#find_link} # # @return [Capybara::Node::Element] The element clicked def click_link(locator = nil, **options) @@ -45,14 +45,14 @@ module Capybara ## # # Finds a button on the page and clicks it. - # This can be any \ element of type submit, reset, image, button or it can be a - # \