mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
DEV: Rename fill_input
-> set_input
in AceEditor
page object (#31825)
Follow up to dd015af0b8e9528eaabd690299cde12a0fdbe7de
This commit is contained in:

committed by
GitHub

parent
20d19d9ca9
commit
f9bedc76f2
@ -122,7 +122,7 @@ RSpec.describe "Admin editing objects type theme setting", type: :system do
|
||||
|
||||
theme_settings_editor = admin_customize_themes_page.click_theme_settings_editor_button
|
||||
|
||||
theme_settings_editor.fill_in(<<~SETTING)
|
||||
theme_settings_editor.set_input(<<~SETTING)
|
||||
[
|
||||
{
|
||||
"setting": "objects_setting",
|
||||
|
@ -8,7 +8,7 @@ module PageObjects
|
||||
self
|
||||
end
|
||||
|
||||
def fill_input(content)
|
||||
def set_input(content)
|
||||
# Can't rely on capybara here because ace editor is not a normal input.
|
||||
page.evaluate_script(
|
||||
"ace.edit(document.getElementsByClassName('ace')[0]).setValue(#{content.to_json})",
|
||||
@ -17,7 +17,7 @@ module PageObjects
|
||||
end
|
||||
|
||||
def clear_input
|
||||
fill_input("")
|
||||
set_input("")
|
||||
end
|
||||
|
||||
def editor_input
|
||||
|
@ -8,8 +8,8 @@ module PageObjects
|
||||
self
|
||||
end
|
||||
|
||||
def fill_in(settings)
|
||||
editor.fill_input(settings)
|
||||
def set_input(settings)
|
||||
editor.set_input(settings)
|
||||
self
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user