blob: e66019279cebc4eef44a6745fafe05c7049a8bcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# frozen_string_literal: true
module QA
module Page
module File
class Edit < Page::Base
include Shared::CommitMessage
include Shared::CommitButton
include Shared::Editor
view 'app/assets/javascripts/editor/extensions/source_editor_markdown_livepreview_ext.js' do
element :editor_toolbar_button, "qaSelector: 'editor_toolbar_button'" # rubocop:disable QA/ElementWithPattern
end
def has_markdown_preview?(component, content)
within_element(:source_editor_preview_container) do
has_css?(component, exact_text: content)
end
end
def wait_for_markdown_preview(component, content)
return if has_markdown_preview?(component, content)
raise ElementNotFound, %("Couldn't find #{component} element with content '#{content}')
end
def click_editor_toolbar
click_element(:editor_toolbar_button)
end
end
end
end
end
|