Module: MultiTenantSupport::Test::Capybara
- Defined in:
- lib/multi_tenant_support/test/capybara.rb
Instance Method Summary collapse
- #evaluate_async_script(script, *args) ⇒ Object
- #evaluate_script(script, *args) ⇒ Object
- #keep_context_tenant_unchange ⇒ Object
- #perform_click_action(keys, wait: nil, **options) ⇒ Object
- #select_option(wait: nil) ⇒ Object
- #set(value, **options) ⇒ Object
- #trigger(event) ⇒ Object
- #unselect_option(wait: nil) ⇒ Object
Instance Method Details
#evaluate_async_script(script, *args) ⇒ Object
41 42 43 44 45 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 41 def evaluate_async_script(script, *args) keep_context_tenant_unchange do super end end |
#evaluate_script(script, *args) ⇒ Object
35 36 37 38 39 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 35 def evaluate_script(script, *args) keep_context_tenant_unchange do super end end |
#keep_context_tenant_unchange ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 47 def keep_context_tenant_unchange _current_tenant = MultiTenantSupport::Current.tenant_account MultiTenantSupport::Current.tenant_account = nil # Simulate real circumstance yield ensure MultiTenantSupport::Current.tenant_account = _current_tenant end |
#perform_click_action(keys, wait: nil, **options) ⇒ Object
23 24 25 26 27 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 23 def perform_click_action(keys, wait: nil, **) keep_context_tenant_unchange do super end end |
#select_option(wait: nil) ⇒ Object
11 12 13 14 15 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 11 def select_option(wait: nil) keep_context_tenant_unchange do super(wait: wait) end end |
#set(value, **options) ⇒ Object
5 6 7 8 9 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 5 def set(value, **) keep_context_tenant_unchange do super(value, **) end end |
#trigger(event) ⇒ Object
29 30 31 32 33 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 29 def trigger(event) keep_context_tenant_unchange do super end end |
#unselect_option(wait: nil) ⇒ Object
17 18 19 20 21 |
# File 'lib/multi_tenant_support/test/capybara.rb', line 17 def unselect_option(wait: nil) keep_context_tenant_unchange do super(wait: wait) end end |