From f37e50ee7e7bd77da45862900eb9acb5d28c1b4c Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Thu, 22 Sep 2022 22:26:44 -0700 Subject: [PATCH] Spelling fixes --- History.md | 6 +++--- lib/capybara/queries/selector_query.rb | 4 +++- lib/capybara/selector/definition.rb | 2 +- lib/capybara/spec/session/has_ancestor_spec.rb | 4 ++-- lib/capybara/spec/views/with_html.erb | 4 ++-- spec/selector_spec.rb | 2 +- spec/selenium_spec_firefox.rb | 2 +- spec/selenium_spec_ie.rb | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/History.md b/History.md index 04e92ef3..d1dccf40 100644 --- a/History.md +++ b/History.md @@ -830,7 +830,7 @@ Release date: 2018-03-23 ### Changed -* Visibile text whitespace is no longer fully normalized in favor of being more in line with the WebDriver spec for visible text +* Visible text whitespace is no longer fully normalized in favor of being more in line with the WebDriver spec for visible text * Drivers are expected to close extra windows when resetting the session * Selenium driver supports Date/Time when filling in date/time/datetime-local inputs * `current_url` returns the url for the top level browsing context @@ -1236,7 +1236,7 @@ Release date: 2016-01-27 # Version 2.6.0 -Relase date: 2016-01-17 +Release date: 2016-01-17 ### Fixed @@ -1300,7 +1300,7 @@ Release date: 2014-10-13 # Version 2.4.3 -Relase date: 2014-09-21 +Release date: 2014-09-21 ### Fixed diff --git a/lib/capybara/queries/selector_query.rb b/lib/capybara/queries/selector_query.rb index 22be804d..0108960d 100644 --- a/lib/capybara/queries/selector_query.rb +++ b/lib/capybara/queries/selector_query.rb @@ -570,7 +570,9 @@ module Capybara when :visible node.initial_cache[:visible] || (node.initial_cache[:visible].nil? && node.visible?) when :hidden - (node.initial_cache[:visible] == false) || (node.initial_cache[:visbile].nil? && !node.visible?) + # TODO: check why the 'visbile' cache spelling mistake wasn't caught in a test + # (node.initial_cache[:visible] == false) || (node.initial_cache[:visbile].nil? && !node.visible?) + (node.initial_cache[:visible] == false) || (node.initial_cache[:visible].nil? && !node.visible?) else true end diff --git a/lib/capybara/selector/definition.rb b/lib/capybara/selector/definition.rb index f337d391..35acf22e 100644 --- a/lib/capybara/selector/definition.rb +++ b/lib/capybara/selector/definition.rb @@ -203,7 +203,7 @@ module Capybara ## # - # Set the default visibility mode that shouble be used if no visibile option is passed when using the selector. + # Set the default visibility mode that should be used if no visible option is passed when using the selector. # If not specified will default to the behavior indicated by Capybara.ignore_hidden_elements # # @param [Symbol] default_visibility Only find elements with the specified visibility: diff --git a/lib/capybara/spec/session/has_ancestor_spec.rb b/lib/capybara/spec/session/has_ancestor_spec.rb index 8e7fcb06..7b9b0696 100644 --- a/lib/capybara/spec/session/has_ancestor_spec.rb +++ b/lib/capybara/spec/session/has_ancestor_spec.rb @@ -39,8 +39,8 @@ Capybara::SpecHelper.spec '#have_no_ancestor' do it 'should assert no matching ancestor' do el = @session.find(:css, '#ancestor1') expect(el).to have_no_ancestor(:css, '#child') - expect(el).to have_no_ancestor(:css, '#ancestor1_sibiling') + expect(el).to have_no_ancestor(:css, '#ancestor1_sibling') expect(el).not_to have_ancestor(:css, '#child') - expect(el).not_to have_ancestor(:css, '#ancestor1_sibiling') + expect(el).not_to have_ancestor(:css, '#ancestor1_sibling') end end diff --git a/lib/capybara/spec/views/with_html.erb b/lib/capybara/spec/views/with_html.erb index 3bf3ebba..b46d6773 100644 --- a/lib/capybara/spec/views/with_html.erb +++ b/lib/capybara/spec/views/with_html.erb @@ -88,7 +88,7 @@ banana
- +
@@ -138,7 +138,7 @@ banana Ancestor
Child
-
+
ASibling
diff --git a/spec/selector_spec.rb b/spec/selector_spec.rb index 0aa232c2..eded9a4f 100644 --- a/spec/selector_spec.rb +++ b/spec/selector_spec.rb @@ -111,7 +111,7 @@ RSpec.describe Capybara do end describe 'adding a selector' do - it 'can set default visiblity' do + it 'can set default visibility' do described_class.add_selector :hidden_field do visible :hidden css { |_sel| 'input[type="hidden"]' } diff --git a/spec/selenium_spec_firefox.rb b/spec/selenium_spec_firefox.rb index 605d81a2..1a2ec10d 100644 --- a/spec/selenium_spec_firefox.rb +++ b/spec/selenium_spec_firefox.rb @@ -68,7 +68,7 @@ Capybara::SpecHelper.run_specs TestSessions::SeleniumFirefox, 'selenium', capyba when 'Capybara::Session selenium #reset_session! removes ALL cookies' pending "Geckodriver doesn't provide a way to remove cookies outside the current domain" when /drag_to.*HTML5/ - pending "Firefox < 62 doesn't support a DataTransfer constuctor" if firefox_lt?(62.0, @session) + pending "Firefox < 62 doesn't support a DataTransfer constructor" if firefox_lt?(62.0, @session) when 'Capybara::Session selenium #accept_alert should handle the alert if the page changes', 'Capybara::Session selenium #accept_alert with an asynchronous alert should accept the alert' skip 'No clue what Firefox is doing here - works fine on MacOS locally' diff --git a/spec/selenium_spec_ie.rb b/spec/selenium_spec_ie.rb index 6aece41b..ce906398 100644 --- a/spec/selenium_spec_ie.rb +++ b/spec/selenium_spec_ie.rb @@ -103,7 +103,7 @@ Capybara::SpecHelper.run_specs TestSessions::SeleniumIE, 'selenium', capybara_sk when /#attach_file with a block/ skip 'Hangs IE testing for unknown reason' when /drag_to.*HTML5/ - pending "IE doesn't support a DataTransfer constuctor" + pending "IE doesn't support a DataTransfer constructor" when /template elements should not be visible/ skip "IE doesn't support template elements" when /Element#drop/