marty 2.3.15 → 2.4.0
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/Gemfile.lock +2 -2
- data/app/components/marty/api_auth_view.rb +27 -4
- data/app/components/marty/api_config_view.rb +27 -4
- data/app/components/marty/extras/layout.rb +4 -7
- data/app/components/marty/form.rb +8 -0
- data/app/components/marty/grid.rb +45 -19
- data/app/components/marty/main_auth_app.rb +12 -11
- data/app/controllers/marty/rpc_controller.rb +63 -150
- data/app/models/marty/api_auth.rb +86 -14
- data/app/models/marty/api_config.rb +11 -6
- data/app/models/marty/delorean_rule.rb +3 -2
- data/config/routes.rb +1 -1
- data/db/migrate/501_add_api_class_to_marty_api_config.rb +6 -0
- data/db/migrate/502_add_parameters_to_marty_api_auth.rb +5 -0
- data/lib/marty/util.rb +0 -15
- data/lib/marty/version.rb +1 -1
- data/other/marty/api/base.rb +207 -0
- data/other/marty/diagnostic/aws/ec2_instance.rb +12 -87
- data/other/marty/diagnostic/environment_variables.rb +1 -1
- data/spec/controllers/job_controller_spec.rb +1 -1
- data/spec/dummy/app/components/gemini/xyz_rule_view.rb +1 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/features/enum_spec.rb +35 -100
- data/spec/features/log_view_spec.rb +5 -5
- data/spec/features/rule_spec.rb +30 -30
- data/spec/features/user_view_spec.rb +0 -2
- data/spec/lib/logger_spec.rb +1 -1
- data/spec/models/api_auth_spec.rb +33 -12
- data/spec/models/event_spec.rb +1 -1
- data/spec/models/promise_spec.rb +1 -1
- data/spec/models/user_spec.rb +6 -6
- data/spec/spec_helper.rb +69 -9
- data/spec/support/{shared_connection_db_helpers.rb → clean_db_helpers.rb} +2 -2
- data/spec/support/delayed_job_helpers.rb +1 -1
- data/spec/support/{users.rb → integration_helpers.rb} +9 -11
- data/spec/support/{setup.rb → spec_setup.rb} +6 -19
- data/spec/support/user_helpers.rb +12 -0
- metadata +10 -21
- data/spec/dummy/app/assets/client/application.css +0 -13
- data/spec/dummy/app/assets/client/application.js +0 -15
- data/spec/support/chromedriver.rb +0 -41
- data/spec/support/components/netzke_combobox.rb +0 -57
- data/spec/support/components/netzke_grid.rb +0 -356
- data/spec/support/custom_matchers.rb +0 -18
- data/spec/support/custom_selectors.rb +0 -49
- data/spec/support/download_helper.rb +0 -52
- data/spec/support/helper.rb +0 -20
- data/spec/support/netzke.rb +0 -306
- data/spec/support/performance_helper.rb +0 -26
- data/spec/support/post_run_logger.rb +0 -32
- data/spec/support/shared_connection.rb +0 -31
- data/spec/support/structure_compare.rb +0 -62
- data/spec/support/suite.rb +0 -27
data/spec/models/event_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe Marty::Event do
|
|
12
12
|
|
13
13
|
# Needed here because shutting transactional fixtures off
|
14
14
|
# means we lose the globally set user
|
15
|
-
Mcfly.whodunnit = system_user
|
15
|
+
Mcfly.whodunnit = UserHelpers.system_user
|
16
16
|
|
17
17
|
Marty::Script.load_script_bodies(promise_bodies, Date.today)
|
18
18
|
start_delayed_job
|
data/spec/models/promise_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe Marty::Promise, slow: true do
|
|
10
10
|
|
11
11
|
# Needed here because shutting transactional fixtures off
|
12
12
|
# means we lose the globally set user
|
13
|
-
Mcfly.whodunnit = system_user
|
13
|
+
Mcfly.whodunnit = UserHelpers.system_user
|
14
14
|
|
15
15
|
Marty::Script.load_script_bodies(promise_bodies, Date.today)
|
16
16
|
|
data/spec/models/user_spec.rb
CHANGED
@@ -4,11 +4,11 @@ module Marty
|
|
4
4
|
describe User do
|
5
5
|
before(:each) do
|
6
6
|
Rails.configuration.marty.system_account =
|
7
|
-
system_user.login
|
7
|
+
UserHelpers.system_user.login
|
8
8
|
end
|
9
9
|
|
10
10
|
let (:tuser) {
|
11
|
-
create_user('other_user')
|
11
|
+
UserHelpers.create_user('other_user')
|
12
12
|
}
|
13
13
|
|
14
14
|
describe "validations" do
|
@@ -22,7 +22,7 @@ module Marty
|
|
22
22
|
|
23
23
|
it "should require unique login" do
|
24
24
|
expect(Mcfly.whodunnit).to_not be_nil
|
25
|
-
user = system_user.dup
|
25
|
+
user = UserHelpers.system_user.dup
|
26
26
|
expect(user).to_not be_valid
|
27
27
|
expect(user.errors[:login].to_s).to include('already been taken')
|
28
28
|
user.login = 'marty2'
|
@@ -30,7 +30,7 @@ module Marty
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should not allow Gemini account to be de-activated" do
|
33
|
-
user = system_user
|
33
|
+
user = UserHelpers.system_user
|
34
34
|
user.active = false
|
35
35
|
expect(user).to_not be_valid
|
36
36
|
expect(user.errors[:base].to_s).
|
@@ -38,14 +38,14 @@ module Marty
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should not allow accounts to be deleted" do
|
41
|
-
user = system_user
|
41
|
+
user = UserHelpers.system_user
|
42
42
|
user.destroy
|
43
43
|
expect(user.destroyed?).to be false
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should not allow user managers to edit the Gemini account" do
|
47
47
|
Mcfly.whodunnit = tuser
|
48
|
-
user = system_user
|
48
|
+
user = UserHelpers.system_user
|
49
49
|
allow_any_instance_of(Marty::User).to receive(:user_manager_only).
|
50
50
|
and_return(true)
|
51
51
|
user.firstname = 'Testing'
|
data/spec/spec_helper.rb
CHANGED
@@ -3,22 +3,67 @@ ENV["RAILS_ENV"] ||= "test"
|
|
3
3
|
require 'dummy/config/application'
|
4
4
|
require 'rspec/rails'
|
5
5
|
require 'database_cleaner'
|
6
|
-
|
7
|
-
support = Pathname.new(__FILE__).parent.to_s + '/support'
|
8
|
-
require "#{support}/suite"
|
9
|
-
require "#{support}/shared_connection"
|
6
|
+
require 'marty_rspec'
|
10
7
|
|
11
8
|
Dummy::Application.initialize! unless Dummy::Application.initialized?
|
12
9
|
|
13
10
|
ActiveRecord::Migrator.migrate File.expand_path("../../db/migrate/", __FILE__)
|
14
11
|
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
15
12
|
|
13
|
+
Dir[Rails.root.join("../support/**/*.rb")].each { |f| require f }
|
14
|
+
|
15
|
+
def register_chrome_driver driver = :chrome, options={}
|
16
|
+
Capybara.register_driver driver do |app|
|
17
|
+
caps = Selenium::WebDriver::Remote::Capabilities.
|
18
|
+
chrome(options + {pageLoadStrategy: 'none'})
|
19
|
+
|
20
|
+
Capybara::Selenium::Driver.new(app,
|
21
|
+
browser: :chrome,
|
22
|
+
desired_capabilities: caps)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
CLASSES_TO_EXCLUDE_FROM_SHARED = ["Marty::Log"]
|
27
|
+
class ActiveRecord::Base
|
28
|
+
mattr_accessor :shared_connection
|
29
|
+
class << self
|
30
|
+
alias_method :orig_connection, :connection
|
31
|
+
end
|
32
|
+
def self.clear_connection
|
33
|
+
@@shared_connection = nil
|
34
|
+
end
|
35
|
+
|
36
|
+
clear_connection
|
37
|
+
|
38
|
+
def self.connection
|
39
|
+
CLASSES_TO_EXCLUDE_FROM_SHARED.include?(model_name) ? orig_connection :
|
40
|
+
@@shared_connection ||
|
41
|
+
ConnectionPool::Wrapper.new(:size => 1) {retrieve_connection}
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.reset_shared_connection
|
45
|
+
@@shared_connection = ConnectionPool::Wrapper.
|
46
|
+
new(:size => 1) {retrieve_connection}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
register_chrome_driver(:chrome, chromeOptions: { args: %w[start-maximized]})
|
51
|
+
register_chrome_driver(:headless,
|
52
|
+
chromeOptions: {
|
53
|
+
args: %w[headless disable-gpu window-size=3840,2160]
|
54
|
+
})
|
55
|
+
|
56
|
+
Capybara.javascript_driver = ENV['HEADLESS'] == 'true' ? :headless : :chrome
|
57
|
+
|
58
|
+
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
59
|
+
|
16
60
|
RSpec.configure do |config|
|
17
|
-
config.include
|
18
|
-
config.include
|
19
|
-
config.include
|
61
|
+
config.include DelayedJobHelpers
|
62
|
+
config.include CleanDbHelpers
|
63
|
+
config.include SpecSetup
|
64
|
+
config.include Marty::IntegrationHelpers
|
65
|
+
config.include MartyRSpec::Util
|
20
66
|
|
21
|
-
#RspecMarty::SharedConnection.classes_to_exclude_shared = ['Marty::Log']
|
22
67
|
Capybara.default_max_wait_time = 3
|
23
68
|
|
24
69
|
# TODO: Continue to remove should syntax from specs - remove this line to see
|
@@ -38,7 +83,7 @@ RSpec.configure do |config|
|
|
38
83
|
end
|
39
84
|
|
40
85
|
config.before(:each) do
|
41
|
-
|
86
|
+
Mcfly.whodunnit = UserHelpers.system_user
|
42
87
|
end
|
43
88
|
|
44
89
|
config.after(:each, :js => true) do |example|
|
@@ -57,4 +102,19 @@ RSpec.configure do |config|
|
|
57
102
|
config.use_transactional_fixtures = true
|
58
103
|
|
59
104
|
Netzke::Testing.rspec_init(config)
|
105
|
+
|
106
|
+
# FIXME: temporary monkey patch to fix marty_rspec for new extjs/rails
|
107
|
+
module MartyRSpec
|
108
|
+
module Components
|
109
|
+
class NetzkeGrid
|
110
|
+
def get_row_vals row
|
111
|
+
res = run_js <<-JS
|
112
|
+
#{ext_var(grid, 'grid')}
|
113
|
+
return Ext.encode(#{ext_row(row.to_i - 1, 'grid')}.data);
|
114
|
+
JS
|
115
|
+
JSON.parse(res)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
60
120
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module CleanDbHelpers
|
2
2
|
def current_db
|
3
3
|
ActiveRecord::Base.connection_config[:database]
|
4
4
|
end
|
@@ -15,4 +15,4 @@ module Marty; module RSpec; module SharedConnectionDbHelpers
|
|
15
15
|
ActiveRecord::Base.reset_shared_connection
|
16
16
|
self.use_transactional_tests = true
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
|
-
module Marty
|
1
|
+
module Marty::IntegrationHelpers
|
2
|
+
# test setup helpers
|
2
3
|
def populate_test_users
|
3
4
|
(1..2).each { |i|
|
4
5
|
Rails.configuration.marty.roles.each { |role_name|
|
@@ -29,15 +30,12 @@ module Marty; module RSpec; module Users
|
|
29
30
|
user.save
|
30
31
|
end
|
31
32
|
|
32
|
-
def
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
def create_user(name)
|
37
|
-
Marty::User.find_or_create_by!(login: name,
|
38
|
-
firstname: name,
|
39
|
-
lastname: 'test',
|
40
|
-
active: true)
|
33
|
+
def log_in_as(username)
|
34
|
+
Rails.configuration.marty.auth_source = 'local'
|
41
35
|
|
36
|
+
ensure_on("/")
|
37
|
+
log_in(username, Rails.configuration.marty.local_password)
|
38
|
+
ensure_on("/")
|
42
39
|
end
|
43
|
-
|
40
|
+
|
41
|
+
end
|
@@ -1,9 +1,4 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
def marty_whodunnit
|
4
|
-
Mcfly.whodunnit = Marty::User.find_by_login('marty')
|
5
|
-
end
|
6
|
-
|
1
|
+
module SpecSetup
|
7
2
|
def load_scripts(path, dt)
|
8
3
|
Marty::Script.load_scripts(path, dt)
|
9
4
|
Marty::ScriptSet.clear_cache
|
@@ -18,19 +13,11 @@ module Marty; module RSpec; module Setup
|
|
18
13
|
Marty::DataGrid.create_from_import(*args)
|
19
14
|
end
|
20
15
|
|
21
|
-
def
|
22
|
-
Marty::
|
16
|
+
def marty_whodunnit
|
17
|
+
Mcfly.whodunnit = Marty::User.find_by_login('marty')
|
23
18
|
end
|
24
19
|
|
25
|
-
def
|
26
|
-
|
27
|
-
ActiveRecord::Base.connection.
|
28
|
-
execute("ALTER TABLE #{table_name} DISABLE TRIGGER USER;")
|
29
|
-
|
30
|
-
block.call
|
31
|
-
ensure
|
32
|
-
ActiveRecord::Base.connection.
|
33
|
-
execute("ALTER TABLE #{table_name} ENABLE TRIGGER USER;")
|
34
|
-
end
|
20
|
+
def do_import_summary(*args)
|
21
|
+
Marty::DataImporter.do_import_summary(*args)
|
35
22
|
end
|
36
|
-
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arman Bostani
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2018-11-
|
17
|
+
date: 2018-11-12 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: pg
|
@@ -484,6 +484,8 @@ files:
|
|
484
484
|
- db/migrate/400_create_dg_plv8_v1_fns.rb
|
485
485
|
- db/migrate/410_jsonb_promise_result.rb
|
486
486
|
- db/migrate/411_create_vw_promises.rb
|
487
|
+
- db/migrate/501_add_api_class_to_marty_api_config.rb
|
488
|
+
- db/migrate/502_add_parameters_to_marty_api_auth.rb
|
487
489
|
- db/seeds.rb
|
488
490
|
- delorean/diagnostics.dl
|
489
491
|
- delorean/script_report.dl
|
@@ -518,6 +520,7 @@ files:
|
|
518
520
|
- lib/pyxll/sample.xlsx
|
519
521
|
- lib/tasks/marty_tasks.rake
|
520
522
|
- marty.gemspec
|
523
|
+
- other/marty/api/base.rb
|
521
524
|
- other/marty/diagnostic/aws/ec2_instance.rb
|
522
525
|
- other/marty/diagnostic/base.rb
|
523
526
|
- other/marty/diagnostic/collection.rb
|
@@ -542,8 +545,6 @@ files:
|
|
542
545
|
- spec/controllers/rpc_import_spec.rb
|
543
546
|
- spec/dummy/README.rdoc
|
544
547
|
- spec/dummy/Rakefile
|
545
|
-
- spec/dummy/app/assets/client/application.css
|
546
|
-
- spec/dummy/app/assets/client/application.js
|
547
548
|
- spec/dummy/app/components/gemini/cm_auth_app.rb
|
548
549
|
- spec/dummy/app/components/gemini/loan_program_view.rb
|
549
550
|
- spec/dummy/app/components/gemini/my_rule_view.rb
|
@@ -1681,23 +1682,11 @@ files:
|
|
1681
1682
|
- spec/other/diagnostic/reporter_spec.rb
|
1682
1683
|
- spec/requests/routes_spec.rb
|
1683
1684
|
- spec/spec_helper.rb
|
1684
|
-
- spec/support/
|
1685
|
-
- spec/support/components/netzke_combobox.rb
|
1686
|
-
- spec/support/components/netzke_grid.rb
|
1687
|
-
- spec/support/custom_matchers.rb
|
1688
|
-
- spec/support/custom_selectors.rb
|
1685
|
+
- spec/support/clean_db_helpers.rb
|
1689
1686
|
- spec/support/delayed_job_helpers.rb
|
1690
|
-
- spec/support/
|
1691
|
-
- spec/support/
|
1692
|
-
- spec/support/
|
1693
|
-
- spec/support/performance_helper.rb
|
1694
|
-
- spec/support/post_run_logger.rb
|
1695
|
-
- spec/support/setup.rb
|
1696
|
-
- spec/support/shared_connection.rb
|
1697
|
-
- spec/support/shared_connection_db_helpers.rb
|
1698
|
-
- spec/support/structure_compare.rb
|
1699
|
-
- spec/support/suite.rb
|
1700
|
-
- spec/support/users.rb
|
1687
|
+
- spec/support/integration_helpers.rb
|
1688
|
+
- spec/support/spec_setup.rb
|
1689
|
+
- spec/support/user_helpers.rb
|
1701
1690
|
homepage: https://github.com/arman000/marty
|
1702
1691
|
licenses:
|
1703
1692
|
- MIT
|
@@ -1718,7 +1707,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1718
1707
|
version: '0'
|
1719
1708
|
requirements: []
|
1720
1709
|
rubyforge_project:
|
1721
|
-
rubygems_version: 2.7.
|
1710
|
+
rubygems_version: 2.7.6
|
1722
1711
|
signing_key:
|
1723
1712
|
specification_version: 4
|
1724
1713
|
summary: A framework for working with versioned data
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require jquery
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require_tree .
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'selenium-webdriver'
|
2
|
-
require Pathname.new(__FILE__).parent.to_s + '/download_helper'
|
3
|
-
|
4
|
-
module Marty; module RSpec; module Chromedriver
|
5
|
-
def self.register_chrome_driver driver= :chrome, opts={}
|
6
|
-
Capybara.register_driver driver do |app|
|
7
|
-
copts = {
|
8
|
-
chromeOptions: opts.deep_merge(
|
9
|
-
prefs: {'download.default_directory' =>
|
10
|
-
Marty::RSpec::DownloadHelper::PATH.to_s}),
|
11
|
-
pageLoadStrategy: 'none',
|
12
|
-
}
|
13
|
-
caps = Selenium::WebDriver::Remote::Capabilities.chrome(copts)
|
14
|
-
driver = Capybara::Selenium::Driver.new(app,
|
15
|
-
browser: :chrome,
|
16
|
-
desired_capabilities: caps)
|
17
|
-
yield driver if block_given?
|
18
|
-
driver
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
register_chrome_driver
|
23
|
-
|
24
|
-
headless_args = %w[headless disable-gpu window-size=3840,2160]
|
25
|
-
register_chrome_driver(:headless_chrome, args: headless_args) do |driver|
|
26
|
-
|
27
|
-
# workaround to enable downloading with headless chrome
|
28
|
-
bridge = driver.browser.send(:bridge)
|
29
|
-
bridge.http.call(:post,
|
30
|
-
"/session/#{bridge.session_id}/chromium/send_command",
|
31
|
-
cmd: 'Page.setDownloadBehavior',
|
32
|
-
params: {
|
33
|
-
behavior: 'allow',
|
34
|
-
downloadPath: Marty::RSpec::DownloadHelper::PATH.to_s
|
35
|
-
})
|
36
|
-
end
|
37
|
-
|
38
|
-
Capybara.default_driver = :chrome
|
39
|
-
Capybara.javascript_driver = ENV['HEADLESS'] == 'true' ?
|
40
|
-
:headless_chrome : :chrome
|
41
|
-
end end end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'capybara/dsl'
|
2
|
-
require 'rspec/matchers'
|
3
|
-
require Pathname.new(__FILE__).parent.parent.to_s + '/netzke'
|
4
|
-
|
5
|
-
module Marty; module RSpec; module Components
|
6
|
-
class NetzkeCombobox
|
7
|
-
include Netzke
|
8
|
-
include Capybara::DSL
|
9
|
-
#include RSpec::Matchers
|
10
|
-
|
11
|
-
attr_reader :name, :combobox
|
12
|
-
|
13
|
-
def initialize(name)
|
14
|
-
@name = name
|
15
|
-
if /^\d+$/.match(name)
|
16
|
-
@combobox = ext_find('combobox', nil, name)
|
17
|
-
else
|
18
|
-
@combobox = ext_combo(name)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def select_values(values)
|
23
|
-
run_js <<-JS
|
24
|
-
var values = #{values.split(/,\s*/)};
|
25
|
-
#{combobox}
|
26
|
-
var arr = new Array();
|
27
|
-
for(var i=0; i < values.length; i++) {
|
28
|
-
arr[i] = combo.findRecordByDisplay(values[i]);
|
29
|
-
}
|
30
|
-
combo.select(arr);
|
31
|
-
if (combo.isExpanded) {
|
32
|
-
combo.onTriggerClick();
|
33
|
-
};
|
34
|
-
return true;
|
35
|
-
JS
|
36
|
-
end
|
37
|
-
|
38
|
-
def get_values
|
39
|
-
run_js <<-JS
|
40
|
-
var values = [];
|
41
|
-
#{combobox}
|
42
|
-
combo.getStore().each(
|
43
|
-
function(r) { values.push(r.data.text || r.data.field1); });
|
44
|
-
return values;
|
45
|
-
JS
|
46
|
-
end
|
47
|
-
|
48
|
-
def click
|
49
|
-
run_js <<-JS
|
50
|
-
#{combobox}
|
51
|
-
combo.onTriggerClick();
|
52
|
-
return true;
|
53
|
-
JS
|
54
|
-
wait_for_element { !ajax_loading? }
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end end end
|