capybara-select-2 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capybara_select2/helpers.rb +4 -4
- data/lib/capybara_select2/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: 9c02febc86ceac19a3366ae2bb0dd3417ddb25d6
|
4
|
+
data.tar.gz: 85d0b6341fae40363b18d0876eda448f53fcfb0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4c1f2cc1aa7a694793c895ac13770db970136b7fb60850cff6a2d88b42431e698797361d4a117fa4f63f0fadb08dc5b1c40670fa44e011a3f6e3b93422cb57b
|
7
|
+
data.tar.gz: 6079eabfdd1a923f3ec29089d45e02a91dc3e9405d418753c4f3aedec817e8e3cbbea1e9e1330b010797df5687f1bda266fc64548d48cd9e571230dcbe157ee5
|
@@ -35,22 +35,22 @@ module CapybaraSelect2
|
|
35
35
|
|
36
36
|
search_input = {
|
37
37
|
'2' => ".select2-dropdown-open input.select2-focused",
|
38
|
-
'3' =>
|
39
|
-
|
38
|
+
'3' => ".select2-drop-active input.select2-input," + # single
|
39
|
+
".select2-dropdown-open input.select2-input", # multi
|
40
40
|
'4' => ".select2-container--open input.select2-search__field"
|
41
41
|
}.fetch(select2_version)
|
42
42
|
|
43
43
|
option = {
|
44
44
|
'2' => ".select2-container-active .select2-result",
|
45
45
|
'3' => ".select2-drop-active .select2-result",
|
46
|
-
'4' => ".select2-results .select2-results__option"
|
46
|
+
'4' => ".select2-results .select2-results__option[role='treeitem']"
|
47
47
|
}.fetch(select2_version)
|
48
48
|
|
49
49
|
values.each do |value|
|
50
50
|
container.find(open_select).click
|
51
51
|
|
52
52
|
if options[:search] || options[:tag]
|
53
|
-
find(search_input).set value
|
53
|
+
find(:xpath, '//body').find(search_input).set value
|
54
54
|
end
|
55
55
|
|
56
56
|
find(:xpath, '//body').find(option, text: value).click
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-select-2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dzmitry Kavalionak
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|