mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: creating an automation without script should error (#28752)
This commit ensure we are properly showing an error to the end user and not just a vague 500.
This commit is contained in:
20
plugins/automation/spec/system/new_automation_spec.rb
Normal file
20
plugins/automation/spec/system/new_automation_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe "DiscourseAutomation | New automation", type: :system, js: true do
|
||||
fab!(:admin)
|
||||
|
||||
before do
|
||||
SiteSetting.discourse_automation_enabled = true
|
||||
sign_in(admin)
|
||||
end
|
||||
|
||||
let(:new_automation_page) { PageObjects::Pages::NewAutomation.new }
|
||||
|
||||
context "when the script is not selected" do
|
||||
it "shows an error" do
|
||||
new_automation_page.visit.fill_name("aaaaa").create
|
||||
|
||||
expect(new_automation_page).to have_error(I18n.t("errors.messages.blank"))
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user