summaryrefslogtreecommitdiff
path: root/qa/qa/page/file/show.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/file/show.rb')
-rw-r--r--qa/qa/page/file/show.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/qa/page/file/show.rb b/qa/qa/page/file/show.rb
index f5f44909f25..665b3c34dcc 100644
--- a/qa/qa/page/file/show.rb
+++ b/qa/qa/page/file/show.rb
@@ -7,16 +7,25 @@ module QA
include Shared::CommitMessage
include Project::SubMenus::Settings
include Project::SubMenus::Common
+ include Layout::Flash
view 'app/helpers/blob_helper.rb' do
element :edit_button, "_('Edit')" # rubocop:disable QA/ElementWithPattern
element :delete_button, '_("Delete")' # rubocop:disable QA/ElementWithPattern
end
+ view 'app/views/projects/blob/_header_content.html.haml' do
+ element :file_name_content
+ end
+
view 'app/views/projects/blob/_remove.html.haml' do
element :delete_file_button, "button_tag 'Delete file'" # rubocop:disable QA/ElementWithPattern
end
+ view 'app/views/shared/_file_highlight.html.haml' do
+ element :file_content
+ end
+
def click_edit
click_on 'Edit'
end
@@ -28,6 +37,18 @@ module QA
def click_delete_file
click_on 'Delete file'
end
+
+ def has_file?(name)
+ has_element?(:file_name_content, text: name)
+ end
+
+ def has_no_file?(name)
+ has_no_element?(:file_name_content, text: name)
+ end
+
+ def has_file_content?(text)
+ has_element?(:file_content, text: text)
+ end
end
end
end