capybara 3.13.0 → 3.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +7 -0
- data/lib/capybara/selenium/extensions/find.rb +9 -2
- data/lib/capybara/version.rb +1 -1
- data/spec/dsl_spec.rb +2 -0
- data/spec/rack_test_spec.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ad63bae2dadd5002e7d92c25d32e737f282ae27d18e18aad1c9fff2bf597b97
|
4
|
+
data.tar.gz: 1236a46546043bf1e0dd4f022feb08ad85b06c9e78193a8045d4ab9617d926b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d3cfc1fc6183456c14f603b39f31cdfb34561d1c6e49a3641dadd67a72a83484f7f6fd9a7ccb2d534d3063c7cf48c8b018943803d98545af51ecf422db07fba
|
7
|
+
data.tar.gz: 0e48f39175aa556ad2351d401a2363384136a05b047250f29c1cc3b097a47b32bc42ff480965b0f2c66ff3b87f9e7617ac4e612296f882e6259da331088563e2
|
data/History.md
CHANGED
@@ -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 ||=
|
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
|
data/lib/capybara/version.rb
CHANGED
data/spec/dsl_spec.rb
CHANGED
@@ -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
|
|
data/spec/rack_test_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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.
|
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,
|