mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 13:55:34 +08:00
51a444ab53
Move the delete button to more options to follow guide https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780#p-1605522-h-5d-table-26
48 lines
1.0 KiB
Ruby
48 lines
1.0 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminEmbedding < PageObjects::Pages::Base
|
|
def visit
|
|
page.visit("/admin/customize/embedding")
|
|
self
|
|
end
|
|
|
|
def click_posts_and_topics_tab
|
|
find(".admin-embedding-tabs__posts-and-topics").click
|
|
end
|
|
|
|
def click_hosts_tab
|
|
find(".admin-embedding-tabs__hosts").click
|
|
end
|
|
|
|
def click_add_host
|
|
find(".admin-embedding__header-add-host").click
|
|
self
|
|
end
|
|
|
|
def click_edit_host
|
|
find(".admin-embeddable-host-item__edit").click
|
|
self
|
|
end
|
|
|
|
def open_embedding_host_menu
|
|
find(".embedding-host-menu-trigger").click
|
|
self
|
|
end
|
|
|
|
def click_delete
|
|
open_embedding_host_menu
|
|
find(".admin-embeddable-host-item__delete").click
|
|
self
|
|
end
|
|
|
|
def confirm_delete
|
|
find(".dialog-footer .btn-primary").click
|
|
expect(page).to have_no_css(".dialog-body", wait: Capybara.default_max_wait_time * 3)
|
|
self
|
|
end
|
|
end
|
|
end
|
|
end
|