haya_select_helpers 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/haya_select.rb +8 -4
- data/lib/haya_select_helpers/version.rb +1 -1
- metadata +6 -9
- data/app/helpers/haya_select_helpers/application_helper.rb +0 -4
- data/app/jobs/haya_select_helpers/application_job.rb +0 -4
- data/app/mailers/haya_select_helpers/application_mailer.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf6acdffd9a4d2e98a8745622eb27cb59fad687a26314dfd08527df0de461af2
|
4
|
+
data.tar.gz: 4f29d9bb7ac705fa10ab7a6f101c3b056037cc0c1e2fe98ec0b89d850d87180e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ca2d3a43fa0657ed05729f478af7389509c1169e9cbdf062bec578ee0da78a69cf0287f748b55b4e6fe1633d2d640a424459bc54b6bf8c2d7d4000835f3c33
|
7
|
+
data.tar.gz: d27f8fe5d9b66fcd54539b069caceee820b58760e93b044a8605cfe8013c3f1bb370b980a7128a316ab764fbf574f18022b2f64c5888747afddfad9ddd25138f
|
data/lib/haya_select.rb
CHANGED
@@ -5,8 +5,8 @@ class HayaSelect
|
|
5
5
|
|
6
6
|
def initialize(id:, scope:)
|
7
7
|
@base_selector = ".haya-select[data-id='#{id}']"
|
8
|
-
@not_opened_current_selected_selector = "#{base_selector} .haya-select-current-selected
|
9
|
-
@opened_current_selected_selector = "#{base_selector} .haya-select-current-selected
|
8
|
+
@not_opened_current_selected_selector = "#{base_selector}[data-opened='false'] .haya-select-current-selected"
|
9
|
+
@opened_current_selected_selector = "#{base_selector}[data-opened='true'] .haya-select-current-selected"
|
10
10
|
@options_selector = ".haya-select-options-container[data-id='#{id}']"
|
11
11
|
@scope = scope
|
12
12
|
end
|
@@ -18,7 +18,7 @@ class HayaSelect
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def open
|
21
|
-
wait_for_and_find("#{base_selector} .haya-select-current-selected
|
21
|
+
wait_for_and_find("#{base_selector}[data-opened='false'] .haya-select-current-selected").click
|
22
22
|
wait_for_selector opened_current_selected_selector
|
23
23
|
wait_for_selector options_selector
|
24
24
|
self
|
@@ -60,7 +60,11 @@ class HayaSelect
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def select_option(label:)
|
63
|
-
wait_for_and_find("#{options_selector} .haya-select-option", exact_text: label)
|
63
|
+
option = wait_for_and_find("#{options_selector} .haya-select-option", exact_text: label)
|
64
|
+
|
65
|
+
raise "The '#{label}'-option is disabled" if option["data-disabled"] == "true"
|
66
|
+
|
67
|
+
option.click
|
64
68
|
self
|
65
69
|
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
66
70
|
retry
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haya_select_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -37,9 +37,6 @@ files:
|
|
37
37
|
- app/assets/config/haya_select_helpers_manifest.js
|
38
38
|
- app/assets/stylesheets/haya_select_helpers/application.css
|
39
39
|
- app/controllers/haya_select_helpers/application_controller.rb
|
40
|
-
- app/helpers/haya_select_helpers/application_helper.rb
|
41
|
-
- app/jobs/haya_select_helpers/application_job.rb
|
42
|
-
- app/mailers/haya_select_helpers/application_mailer.rb
|
43
40
|
- app/models/haya_select_helpers/application_record.rb
|
44
41
|
- app/views/layouts/haya_select_helpers/application.html.erb
|
45
42
|
- config/routes.rb
|
@@ -55,7 +52,7 @@ metadata:
|
|
55
52
|
homepage_uri: https://github.com/kaspernj/haya_select_helpers
|
56
53
|
source_code_uri: https://github.com/kaspernj/haya_select_helpers
|
57
54
|
changelog_uri: https://github.com/kaspernj/haya_select_helpers
|
58
|
-
post_install_message:
|
55
|
+
post_install_message:
|
59
56
|
rdoc_options: []
|
60
57
|
require_paths:
|
61
58
|
- lib
|
@@ -70,8 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
67
|
- !ruby/object:Gem::Version
|
71
68
|
version: '0'
|
72
69
|
requirements: []
|
73
|
-
rubygems_version: 3.
|
74
|
-
signing_key:
|
70
|
+
rubygems_version: 3.4.10
|
71
|
+
signing_key:
|
75
72
|
specification_version: 4
|
76
73
|
summary: RSpec helpers for HayaSelect.
|
77
74
|
test_files: []
|