capybara 3.13.0 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da79991ce86301cce84e97c31e9c46424309edfaaef6c1f52316d78408673340
4
- data.tar.gz: 0dbf02750a107ebc011c9899a60e5958099444f897cca384607919b58554dc9b
3
+ metadata.gz: 4ad63bae2dadd5002e7d92c25d32e737f282ae27d18e18aad1c9fff2bf597b97
4
+ data.tar.gz: 1236a46546043bf1e0dd4f022feb08ad85b06c9e78193a8045d4ab9617d926b7
5
5
  SHA512:
6
- metadata.gz: 3718591ef61c25cadb6de5048b73095340b2fa983d0f978e016ec3da1348ea88bcac5797e717b2c8053e2804b7b94aa27b46e3b57ce40fcdfa33cf70fca43d52
7
- data.tar.gz: 5cf850913d7c0624002f969bfc3c87661a30b475b9a35decb2d607a7be82456f406f1c3490a803d30cd3f573dccdece7ad66ef8d46be36a347476af01f9ce7b8
6
+ metadata.gz: 9d3cfc1fc6183456c14f603b39f31cdfb34561d1c6e49a3641dadd67a72a83484f7f6fd9a7ccb2d534d3063c7cf48c8b018943803d98545af51ecf422db07fba
7
+ data.tar.gz: 0e48f39175aa556ad2351d401a2363384136a05b047250f29c1cc3b097a47b32bc42ff480965b0f2c66ff3b87f9e7617ac4e612296f882e6259da331088563e2
data/History.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Version 3.13.1
2
+ Release date: 2019-01-24
3
+
4
+ ### Fixed
5
+
6
+ * Only use Selenium visibility optimization when JS atom is available - Issue #2151
7
+
1
8
  # Version 3.13.0
2
9
  Release date: 2019-01-23
3
10
 
@@ -16,12 +16,14 @@ module Capybara
16
16
  def find_by(format, selector, uses_visibility:, texts:, styles:)
17
17
  els = find_context.find_elements(format, selector)
18
18
  hints = []
19
+
19
20
  if (els.size > 2) && !ENV['DISABLE_CAPYBARA_SELENIUM_OPTIMIZATIONS']
20
21
  els = filter_by_text(els, texts) unless texts.empty?
21
22
 
22
23
  hints_js = +''
23
24
  functions = []
24
- if uses_visibility
25
+ if uses_visibility && !is_displayed_atom.empty?
26
+ puts "running vis func"
25
27
  hints_js << <<~VISIBILITY_JS
26
28
  var vis_func = #{is_displayed_atom};
27
29
  VISIBILITY_JS
@@ -74,7 +76,12 @@ module Capybara
74
76
  end
75
77
 
76
78
  def is_displayed_atom # rubocop:disable Naming/PredicateName
77
- @@is_displayed_atom ||= browser.send(:bridge).send(:read_atom, 'isDisplayed')
79
+ @@is_displayed_atom ||= begin
80
+ browser.send(:bridge).send(:read_atom, 'isDisplayed')
81
+ rescue StandardError
82
+ # If the atom doesn't exist or other error
83
+ ""
84
+ end
78
85
  end
79
86
  end
80
87
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.13.0'
4
+ VERSION = '3.13.1'
5
5
  end
@@ -13,6 +13,8 @@ Capybara::SpecHelper.run_specs TestClass.new, 'DSL', capybara_skip: %i[
13
13
  case example.metadata[:full_description]
14
14
  when /has_css\? should support case insensitive :class and :id options/
15
15
  pending "Nokogiri doesn't support case insensitive CSS attribute matchers"
16
+ when /#click_button should follow permanent redirects that maintain method/
17
+ pending "Rack < 2 doesn't support 308" if Gem.loaded_specs['rack'].version < Gem::Version.new('2.0.0')
16
18
  end
17
19
  end
18
20
 
@@ -29,7 +29,9 @@ skipped_tests = %i[
29
29
  Capybara::SpecHelper.run_specs TestSessions::RackTest, 'RackTest', capybara_skip: skipped_tests do |example|
30
30
  case example.metadata[:full_description]
31
31
  when /has_css\? should support case insensitive :class and :id options/
32
- pending "Nokogiri doesn't support case insensitive CSS attribute matchers"
32
+ skip "Nokogiri doesn't support case insensitive CSS attribute matchers"
33
+ when /#click_button should follow permanent redirects that maintain method/
34
+ skip "Rack < 2 doesn't support 308" if Gem.loaded_specs['rack'].version < Gem::Version.new('2.0.0')
33
35
  end
34
36
  end
35
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.0
4
+ version: 3.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Walpole
@@ -611,7 +611,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
611
611
  - !ruby/object:Gem::Version
612
612
  version: '0'
613
613
  requirements: []
614
- rubygems_version: 3.0.2
614
+ rubygems_version: 3.0.1
615
615
  signing_key:
616
616
  specification_version: 4
617
617
  summary: Capybara aims to simplify the process of integration testing Rack applications,