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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d6fd940dbd97aefb1ab70204f5839d382dd52cd
4
- data.tar.gz: 2d3e622f5e83a098c8b2277b15f121044a8beb9e
3
+ metadata.gz: 12bba095be68adb4523924a49a6804b389d229fd
4
+ data.tar.gz: 0d417bacef4d2cd0fcc1a1ca4c21064c1a209df6
5
5
  SHA512:
6
- metadata.gz: 90b7c165924ce6187bfa6373fbdcc15ed32ac01824fca61ccf64588b83de5d80c2a4f631cf035e66e70d68aee80569f0d8c1718779d9148973be2824fb8f5aad
7
- data.tar.gz: 429d603a78f6d69de34f0c6e05cfafae9aca5ee93926b221450d0f4bc8c0a0fce05d2933a06328dcf64283ec0039b701232ddffc1c2a98615a42f4a7840acadc
6
+ metadata.gz: ada0f90e0d2e387dc65862680ff1df5ca1d8e64252c1160b32ca3628769c26c4d09eaf8a4b4e4fca7fca0c6303fff8e749f1d2f39bb4631c1e0372b6f2b04879
7
+ data.tar.gz: 623634c373277a61f9a7a0b0133b8bd1032885ceed8c034e6cf47dc759ba2b4867e677bf3c623d458de31dbf8aa424d85491a638b6b889d8a7398f807d208797
@@ -1,5 +1,5 @@
1
1
  module Selectivity
2
2
  module Rails
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
@@ -52,7 +52,13 @@ module Selectivity
52
52
  input.click
53
53
 
54
54
  within 'div.selectivity-dropdown' do
55
- if find('div.selectivity-result-item', text: item).visible?
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.5
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-26 00:00:00.000000000 Z
11
+ date: 2015-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler