selectivity-rails 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/selectivity/rails/version.rb +1 -1
- data/lib/selectivity/rspec.rb +7 -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: 12bba095be68adb4523924a49a6804b389d229fd
|
4
|
+
data.tar.gz: 0d417bacef4d2cd0fcc1a1ca4c21064c1a209df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada0f90e0d2e387dc65862680ff1df5ca1d8e64252c1160b32ca3628769c26c4d09eaf8a4b4e4fca7fca0c6303fff8e749f1d2f39bb4631c1e0372b6f2b04879
|
7
|
+
data.tar.gz: 623634c373277a61f9a7a0b0133b8bd1032885ceed8c034e6cf47dc759ba2b4867e677bf3c623d458de31dbf8aa424d85491a638b6b889d8a7398f807d208797
|
data/lib/selectivity/rspec.rb
CHANGED
@@ -52,7 +52,13 @@ module Selectivity
|
|
52
52
|
input.click
|
53
53
|
|
54
54
|
within 'div.selectivity-dropdown' do
|
55
|
-
if
|
55
|
+
element = if page.driver.class.name =~ /poltergeist/i
|
56
|
+
find('div.selectivity-result-item', text: item)
|
57
|
+
else
|
58
|
+
find(:xpath, "//div[@class='selectivity-result-item'][contains(text(), '#{item}')]")
|
59
|
+
end
|
60
|
+
|
61
|
+
if element.visible?
|
56
62
|
page.evaluate_script("$('div.selectivity-result-item:contains(#{item})').trigger('click')")
|
57
63
|
end
|
58
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selectivity-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konrad Jurkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|