mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
UX: simplify and shorten new script flow for automations (#29178)
This commit is contained in:
@ -22,13 +22,9 @@ describe "DiscourseAutomation | smoke test", type: :system, js: true do
|
||||
|
||||
it "populate correctly" do
|
||||
visit("/admin/plugins/discourse-automation")
|
||||
find(".new-automation").click
|
||||
find(".admin-section-landing__header-filter").set("test")
|
||||
find(".admin-section-landing-item__content", match: :first).click
|
||||
fill_in("automation-name", with: "aaaaa")
|
||||
select_kit = PageObjects::Components::SelectKit.new(".scriptables")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_value("test")
|
||||
find(".create-automation").click
|
||||
|
||||
select_kit = PageObjects::Components::SelectKit.new(".triggerables")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_value("post_created_edited")
|
||||
@ -40,12 +36,9 @@ describe "DiscourseAutomation | smoke test", type: :system, js: true do
|
||||
it "works" do
|
||||
visit("/admin/plugins/discourse-automation")
|
||||
|
||||
find(".new-automation").click
|
||||
find(".admin-section-landing__header-filter").set("user group membership through badge")
|
||||
find(".admin-section-landing-item__content", match: :first).click
|
||||
fill_in("automation-name", with: "aaaaa")
|
||||
select_kit = PageObjects::Components::SelectKit.new(".scriptables")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_value("user_group_membership_through_badge")
|
||||
find(".create-automation").click
|
||||
select_kit = PageObjects::Components::SelectKit.new(".triggerables")
|
||||
select_kit.expand
|
||||
select_kit.select_row_by_value("user_first_logged_in")
|
||||
@ -58,6 +51,6 @@ describe "DiscourseAutomation | smoke test", type: :system, js: true do
|
||||
find(".automation-enabled input").click
|
||||
find(".update-automation").click
|
||||
|
||||
expect(page).to have_field("automation-name", with: "aaaaa")
|
||||
expect(page).to have_css('[role="button"]', text: "aaaaa")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user