From 4738d25609dfa085259e9b762330e297e34b4aa2 Mon Sep 17 00:00:00 2001 From: colorbox Date: Mon, 29 Oct 2018 04:02:13 +0900 Subject: [PATCH] Fix macro on doc (#2117) * Fix waiting_behavior macro usage [ci skip] --- lib/capybara/node/actions.rb | 21 ++++++++++----------- lib/capybara/node/finders.rb | 8 ++++---- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/capybara/node/actions.rb b/lib/capybara/node/actions.rb index b0eb5577..9af8cf2c 100644 --- a/lib/capybara/node/actions.rb +++ b/lib/capybara/node/actions.rb @@ -3,19 +3,20 @@ module Capybara module Node module Actions - ## - # - # 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 # @!macro waiting_behavior - # If the driver is capable of executing JavaScript, +$0+ will wait for a set amount of time + # If the driver is capable of executing JavaScript, this method will wait for a set amount of time # and continuously retry finding the element until either the element is found or the time # expires. The length of time +find+ will wait is controlled through {Capybara.default_max_wait_time} # # @option options [false, Numeric] wait (Capybara.default_max_wait_time) Maximum time to wait for matching element to appear. + + ## # - # @overload click_link_or_button([locator], options) + # 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 # + # @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} # # @return [Capybara::Node::Element] The element clicked @@ -30,9 +31,8 @@ module Capybara # Finds a link by id, Capybara.test_id attribute, text or title and clicks it. Also looks at image # alt text inside the link. # - # @macro waiting_behavior - # - # @overload click_link([locator], options) + # @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} # @@ -48,9 +48,8 @@ module Capybara # \