UX: simplify and shorten new script flow for automations (#29178)

This commit is contained in:
Kris
2024-10-23 14:04:17 -04:00
committed by GitHub
parent b7f76d99e8
commit d471c01ff6
17 changed files with 210 additions and 168 deletions

View File

@ -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