Module: Dill::DSL
- Defined in:
- lib/dill/dsl.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#document ⇒ Document
The current document with the class of the current object set as the widget lookup scope.
-
#eventually(wait_time = Capybara.default_wait_time, &block) ⇒ Object
re-run one or more assertions until either they all pass, or Dill times out, which will result in a test failure.
-
#has_widget?(name, *args) ⇒ Boolean
Whether one or more widgets exist in the current document.
- #value(name, *args) ⇒ Object
-
#widget(name, *args) ⇒ Object
Returns a widget instance for the given name.
Instance Attribute Details
#widget_lookup_scope ⇒ Object
28 29 30 |
# File 'lib/dill/dsl.rb', line 28 def @widget_lookup_scope ||= end |
Instance Method Details
#document ⇒ Document
Returns the current document with the class of the current object set as the widget lookup scope.
7 8 9 |
# File 'lib/dill/dsl.rb', line 7 def document Document.new() end |
#eventually(wait_time = Capybara.default_wait_time, &block) ⇒ Object
re-run one or more assertions until either they all pass, or Dill times out, which will result in a test failure.
34 35 36 |
# File 'lib/dill/dsl.rb', line 34 def eventually(wait_time = Capybara.default_wait_time, &block) Checkpoint.wait_for wait_time, &block end |
#has_widget?(name, *args) ⇒ Boolean
Returns Whether one or more widgets exist in the current document.
13 14 15 |
# File 'lib/dill/dsl.rb', line 13 def (name, *args) document.(name, *args) end |
#value(name, *args) ⇒ Object
17 18 19 |
# File 'lib/dill/dsl.rb', line 17 def value(name, *args) (name, *args).value end |
#widget(name, *args) ⇒ Object
Returns a widget instance for the given name.
24 25 26 |
# File 'lib/dill/dsl.rb', line 24 def (name, *args) document.(name, *args) end |