mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
The setting has been hidden and enabled by default since it was switched on for all sites in mid-2025, making it effectively dead configuration. The rich editor is now always available, and the per-user `composition_mode` preference remains the only way to pick between the markdown and rich text editors. This also makes the first toolbar button focusable when a `composer-force-editor-mode` transformer hides the editor mode toggle, which previously left the toolbar without a tabbable button in that state. Since it comes from the same rollout, this also drops the shim that migrated the pre-`composition_mode` localStorage preference (`d-editor-prefers-rich-editor`) into the user option. The key hasn't been written since the rich editor was enabled everywhere a year ago, and the shim deleted it on first composer open, so any remaining copies belong to browsers that haven't composed since then — for those, the default mode is rich anyway.
23 lines
634 B
Ruby
Vendored
23 lines
634 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
describe "Details button" do
|
|
fab!(:admin)
|
|
|
|
let(:composer) { PageObjects::Components::Composer.new }
|
|
let(:rich) { composer.rich_editor }
|
|
|
|
context "with rich editor" do
|
|
before { sign_in(admin) }
|
|
|
|
it "uses the text selection for content" do
|
|
visit("/new-topic")
|
|
composer.fill_content("test :+1:").toggle_rich_editor.select_all
|
|
find(".toolbar-menu__options-trigger").click
|
|
find("button[title='Hide details']").click
|
|
|
|
expect(rich).to have_css(
|
|
"details img.emoji[src=\"/images/emoji/twitter/+1.png?v=#{Emoji::EMOJI_VERSION}\"]",
|
|
)
|
|
end
|
|
end
|
|
end
|