discourse/plugins/automation/spec/system/new_automation_spec.rb
Renato Atilio 411eb17845
UX: let automation d-editor respect user's editor mode preference (#38622)
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.
2026-04-09 14:49:51 -03:00

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