blob: ce4465d2a5cd436b8d2566346a97ff2a023569f8 (
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
34
35
36
37
|
# frozen_string_literal: true
module QA
module Page
module File
module Shared
module Editor
extend QA::Page::PageConcern
def self.included(base)
super
base.view 'app/views/projects/blob/_editor.html.haml' do
element :editor
end
end
def add_content(content)
text_area.set content
end
def remove_content
text_area.send_keys([:command, 'a'], :backspace)
end
private
def text_area
within_element :editor do
find('textarea', visible: false)
end
end
end
end
end
end
end
|