mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 04:33:45 +08:00
0a619d8c88
Small js fix for fast edit to allow posts to save changes when the post contains apostrophes and quotation marks. Replaces unicode characters in text prior to saving the edit. Includes system tests for fast edit and introduces a new system spec component for fast edit usage.
29 lines
521 B
Ruby
29 lines
521 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class FastEditor < PageObjects::Components::Base
|
|
def fill_content(content)
|
|
fast_edit_input.fill_in(with: content)
|
|
self
|
|
end
|
|
|
|
def clear_content
|
|
fill_content("")
|
|
end
|
|
|
|
def has_content?(content)
|
|
fast_edit_input.value == content
|
|
end
|
|
|
|
def save
|
|
find(".save-fast-edit").click
|
|
end
|
|
|
|
def fast_edit_input
|
|
find("#fast-edit-input")
|
|
end
|
|
end
|
|
end
|
|
end
|