mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 11:47:35 +08:00
The automation post/PM editors were forcing rich editor mode and manually disabling preview. This PR lets d-editor respect the user's preference and hides the preview panel via CSS whenever the rich editor is active on any d-editor instance.
27 lines
686 B
Ruby
27 lines
686 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "DiscourseAutomation | New automation" do
|
|
fab!(:admin)
|
|
|
|
before do
|
|
SiteSetting.discourse_automation_enabled = true
|
|
sign_in(admin)
|
|
end
|
|
|
|
let(:new_automation_page) { PageObjects::Pages::NewAutomation.new }
|
|
|
|
context "when a script is clicked" do
|
|
it "navigates to automation edit route" do
|
|
new_automation_page.visit
|
|
|
|
find(
|
|
".admin-section-landing-item__content",
|
|
text: I18n.t("discourse_automation.scriptables.post.title"),
|
|
).click
|
|
new_automation_page.select_trigger("recurring")
|
|
|
|
expect(page).to have_css(".scriptables")
|
|
expect(page).to have_css(".d-editor")
|
|
end
|
|
end
|
|
end
|