Module: TextEditorHelpers
- Defined in:
- lib/test_support/text_editor_helpers.rb
Instance Method Summary collapse
-
#fill_in_trix_editor(id, value) ⇒ Object
Basecamp trix uses hidden input to populate its editor.
-
#fill_trix_editor(with:) ⇒ Object
A simplified version of the helper, requires JavaScript, and will end up having <div>value</div> in the trix-saved content, but that is normal.
Instance Method Details
#fill_in_trix_editor(id, value) ⇒ Object
Basecamp trix uses hidden input to populate its editor
5 6 7 |
# File 'lib/test_support/text_editor_helpers.rb', line 5 def fill_in_trix_editor(id, value) find(:xpath, "//*[@id='#{id}']", visible: false).set(value) end |
#fill_trix_editor(with:) ⇒ Object
A simplified version of the helper, requires JavaScript, and will end up having <div>value</div> in the trix-saved content, but that is normal
11 12 13 |
# File 'lib/test_support/text_editor_helpers.rb', line 11 def fill_trix_editor(with:) find("trix-editor").click.set(with) end |