Skip to content

Commit 9c8bea6

Browse files
committed
DRY editor finder
1 parent f933bc6 commit 9c8bea6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spec/support/form_fields/primerized/block_note_editor_input.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ class BlockNoteEditorInput
66
include Capybara::DSL
77

88
def open_add_image_dialog
9-
editor = page.find("div[role='textbox']")
9+
editor = find_editor
1010
editor.send_keys("/image")
1111
editor.send_keys(:enter)
1212
end
1313

1414
def open_command_dialog
15-
editor = page.find("div[role='textbox']")
16-
editor.send_keys("/")
15+
find_editor.send_keys("/")
16+
end
17+
18+
def fill_in_with_content(content)
19+
editor = find_editor
20+
editor.send_keys(content)
1721
end
1822
end
1923
end

0 commit comments

Comments
 (0)