capybara 3.11.0 → 3.11.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/selector.rb +3 -5
- data/lib/capybara/version.rb +1 -1
- data/spec/selector_spec.rb +16 -0
- 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: 54ee49a77f4b1cec2ed59869334766af110a64a50dae8cdc02a95b5ba750fb9b
|
4
|
+
data.tar.gz: db2319b75d0626c01babc298eccd8ce76d3da65a8a0a994bb25de5c742e1721f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c1965b9ba0d38813d3060aaefe797ef8d6610416c954bf4cebdae70de5ca23bc4b07303033ecbf2f5e62bc681319c6b20dc0567f49e89ccc02df38dd10d44d
|
7
|
+
data.tar.gz: bf971abb444f58438091422e656108d29bb7efa0d2f2dfb1728a818626cea38e7fa700b3701904ca10344a4f272e14fd99482c23b62b9cfe3b6139d868fa5b30
|
data/History.md
CHANGED
data/lib/capybara/selector.rb
CHANGED
@@ -161,11 +161,9 @@ Capybara.add_selector(:button) do
|
|
161
161
|
image_btn_xpath = image_btn_xpath[alt_matches]
|
162
162
|
end
|
163
163
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
res_xpath
|
164
|
+
%i[value title type].inject(input_btn_xpath.union(btn_xpath).union(image_btn_xpath)) do |memo, ef|
|
165
|
+
memo[find_by_attr(ef, options[ef])]
|
166
|
+
end
|
169
167
|
end
|
170
168
|
|
171
169
|
node_filter(:disabled, :boolean, default: false, skip_if: :all) { |node, value| !(value ^ node.disabled?) }
|
data/lib/capybara/version.rb
CHANGED
data/spec/selector_spec.rb
CHANGED
@@ -416,6 +416,22 @@ RSpec.describe Capybara do
|
|
416
416
|
expect(string.find(:element, 'input', title: XPath.contains_word('button 1'))[:type]).to eq 'button'
|
417
417
|
end
|
418
418
|
end
|
419
|
+
|
420
|
+
describe ':link_or_button selector' do
|
421
|
+
around(:all) do |example|
|
422
|
+
Capybara.modify_selector(:link_or_button) do
|
423
|
+
expression_filter(:random) { |xpath, _| xpath } # do nothing filter
|
424
|
+
end
|
425
|
+
example.run
|
426
|
+
Capybara::Selector.all[:link_or_button].expression_filters.delete(:random)
|
427
|
+
end
|
428
|
+
|
429
|
+
context 'when modified' do
|
430
|
+
it 'should still work' do
|
431
|
+
expect(string.find(:link_or_button, 'click me', random: 'blah').value).to eq 'click me'
|
432
|
+
end
|
433
|
+
end
|
434
|
+
end
|
419
435
|
end
|
420
436
|
end
|
421
437
|
end
|
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.11.
|
4
|
+
version: 3.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Walpole
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- gem-public_cert.pem
|
13
|
-
date: 2018-11-
|
13
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|