mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 06:02:57 +08:00
27 lines
577 B
Ruby
Vendored
27 lines
577 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Modals
|
|
class DTemplatesInsertTemplate < PageObjects::Modals::Base
|
|
include SystemHelpers
|
|
|
|
MODAL_SELECTOR = ".d-templates-modal"
|
|
|
|
def open_with_keyboard_shortcut
|
|
send_keys([PLATFORM_KEY_MODIFIER, :shift, "i"])
|
|
end
|
|
|
|
def open?
|
|
super && finished_loading?
|
|
end
|
|
|
|
def finished_loading?
|
|
has_no_css?("#{MODAL_SELECTOR} .spinner")
|
|
end
|
|
|
|
def select_template(id)
|
|
find("#template-item-#{id} .templates-apply").click
|
|
end
|
|
end
|
|
end
|
|
end
|