module ActionText::SystemTestHelper
def fill_in_rich_text_area(locator = nil, with:)
#
#
fill_in_rich_text_area "Message content", with: "Hello world!"
#
fill_in_rich_text_area "Message content", with: "Hello world!"
#
#
fill_in_rich_text_area "Your message here", with: "Hello world!"
#
fill_in_rich_text_area "message_content", with: "Hello world!"
#
Examples:
* the +name+ of its input
* its +aria-label+
* the text from its +label+ element
* its +placeholder+
* its +id+
The editor can be found by:
Locates a Trix editor and fills it in with the given HTML.
def fill_in_rich_text_area(locator = nil, with:) find(:rich_text_area, locator).execute_script("this.editor.loadHTML(arguments[0])", with.to_s) end