pickles 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cucumber/pickles/helpers/node_finders.rb +7 -3
- data/lib/cucumber/pickles/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d2a4e0ea1dad01c9b57c03c78da7d871daaa46a
|
4
|
+
data.tar.gz: c13a7b51a04b2ec2efe6c860c7522a85c44e9fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04a85be92608cc9761390eb1b85f6e052162ebfc00e90482262c9a17571c2f6b04c98b33981b82404c21d95841f096c50afbb84902053a7ab9b56cc29f4082d
|
7
|
+
data.tar.gz: 917952706245cd2623a51c9b7f8e44ed2cfbcbc73231c310d0e2133c18c553d4eddd8f5837c13fc4c02ae8ab1a89985c1cca958f1b1ea0247bfff322904963f7
|
@@ -139,7 +139,7 @@ module NodeFinders
|
|
139
139
|
_rescued_find([:xpath, xpath, options], locator, within: within, message: "find_node(#{locator}) => look for closest fillable field, index by label") do
|
140
140
|
|
141
141
|
# case 2
|
142
|
-
_rescued_find([:fillable_field, locator, options], locator, within: within, message: 'Capybara#fillable_input') do
|
142
|
+
_rescued_find([:fillable_field, locator, options], locator, index: index, within: within, message: 'Capybara#fillable_input') do
|
143
143
|
|
144
144
|
# all cases failed => raise
|
145
145
|
raise Capybara::ElementNotFound,
|
@@ -154,8 +154,12 @@ module NodeFinders
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
-
def _rescued_find(params, locator, within:, message:)
|
158
|
-
|
157
|
+
def _rescued_find(params, locator, within:, message:, index: nil)
|
158
|
+
if index
|
159
|
+
within.all(*params)[index - 1]
|
160
|
+
else
|
161
|
+
within.find(*params)
|
162
|
+
end
|
159
163
|
rescue Capybara::Ambiguous => err # Capybara::Ambiguous < Capybara::ElementNotFound == true
|
160
164
|
raise Pickles::Ambiguous.new(locator, within, params, message), nil, caller
|
161
165
|
rescue Capybara::ElementNotFound
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pickles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|