Skip to content

Instantly share code, notes, and snippets.

@frankolson
Created October 27, 2018 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankolson/eaa7734795642eda837abf345242d430 to your computer and use it in GitHub Desktop.
Save frankolson/eaa7734795642eda837abf345242d430 to your computer and use it in GitHub Desktop.
Capybara helpers for the Trix Editor
# test/support/capybara_helpers.rb
def fill_in_trix_editor(id, with:)
find(:xpath, "//trix-editor[@input='#{id}']").click.set(with)
end
def find_trix_editor(id)
find(:xpath, "//*[@id='#{id}']", visible: false)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment