pickles 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8118ba0ab14b4b72c919b150f89486f1e6adb6a9
4
- data.tar.gz: b9735e920420d9fcaaf34d87d7923d77dacdf0a4
3
+ metadata.gz: 60e12a093f0976dc32ffba53f9e8ada6cd0e686a
4
+ data.tar.gz: d514867ab85fdb7376daa8b5aafd85f3a9da142a
5
5
  SHA512:
6
- metadata.gz: 94df6c00755830b691ba3323d62653c1759723c62c9a57c591e61a0bc2f4527cd5acb6a6863dd5b5ea2946367742d8b3c6cb18ee32e4b43f7bb511048d7ec44e
7
- data.tar.gz: 7832423793a2791d27882482a4eb6d4530d47e6b7af0be48fd3ae98b829576e3a67b56afeece897306d7d107c2d3b20b5e475b4799a0f0241bac83a964354365
6
+ metadata.gz: adaa725437c33b2845d905afa75ac54ac70b137f8f606c5af351f14d7ccb5ba9e31bf4b6d1a009a9c08fb50c84e21130c798abadb57b25638b1f40f3239d0626
7
+ data.tar.gz: f59cc23cf4a1790634fae5da2a0d6af13988bd1f1c8f9a8a000fdd894f08e3bc3a16942d9b37b88f95ae3a66b4b3862c8ef3b20187888a4a46244c2d07c61117
@@ -92,21 +92,28 @@ module NodeFinders
92
92
 
93
93
  inputtable_field_xpath = "*[self::input or self::textarea or @contenteditable]"
94
94
 
95
- xpath = "(#{label_xpath})#{index_xpath}/ancestor::*[.//#{inputtable_field_xpath}][position()=1]//#{inputtable_field_xpath}"
95
+ xpath = "(#{label_xpath}/ancestor::*[.//#{inputtable_field_xpath}][position()=1]//#{inputtable_field_xpath})#{index_xpath}"
96
96
 
97
- # case 1
98
- _rescued_find([:xpath, xpath, options], locator, within: within, message: "find_node(#{locator}) => look for closest fillable field") do
97
+ _rescued_find([:xpath, xpath, options], locator, within: within, message: "find_node(#{locator}) => look for closest fillable field, index by input") do
99
98
 
100
- # case 2
101
- _rescued_find([:fillable_field, locator, options], locator, within: within, message: 'Capybara#fillable_input') do
99
+ inputtable_field_xpath = "*[self::input or self::textarea or @contenteditable]"
102
100
 
103
- # all cases failed => raise
104
- raise Capybara::ElementNotFound,
105
- "Unable to find fillable field by locator #{locator}",
106
- caller
101
+ xpath = "(#{label_xpath})#{index_xpath}/ancestor::*[.//#{inputtable_field_xpath}][position()=1]//#{inputtable_field_xpath}"
107
102
 
108
- end
103
+ # case 1
104
+ _rescued_find([:xpath, xpath, options], locator, within: within, message: "find_node(#{locator}) => look for closest fillable field, index by label") do
105
+
106
+ # case 2
107
+ _rescued_find([:fillable_field, locator, options], locator, within: within, message: 'Capybara#fillable_input') do
108
+
109
+ # all cases failed => raise
110
+ raise Capybara::ElementNotFound,
111
+ "Unable to find fillable field by locator #{locator}",
112
+ caller
109
113
 
114
+ end
115
+
116
+ end
110
117
  end
111
118
 
112
119
  end
@@ -1,3 +1,3 @@
1
1
  module Pickles
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pickles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - vs