Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/dashboard/snippet/show.rb')
-rw-r--r--qa/qa/page/dashboard/snippet/show.rb65
1 files changed, 56 insertions, 9 deletions
diff --git a/qa/qa/page/dashboard/snippet/show.rb b/qa/qa/page/dashboard/snippet/show.rb
index 88d6ef02d22..d43b64cd1d4 100644
--- a/qa/qa/page/dashboard/snippet/show.rb
+++ b/qa/qa/page/dashboard/snippet/show.rb
@@ -5,10 +5,17 @@ module QA
module Dashboard
module Snippet
class Show < Page::Base
+ view 'app/assets/javascripts/snippets/components/snippet_description_view.vue' do
+ element :snippet_description_field
+ end
+
+ view 'app/assets/javascripts/snippets/components/snippet_title.vue' do
+ element :snippet_title, required: true
+ end
+
view 'app/views/shared/snippets/_header.html.haml' do
element :snippet_title, required: true
- element :snippet_description, required: true
- element :embed_type
+ element :snippet_description_field, required: true
element :snippet_box
end
@@ -16,22 +23,38 @@ module QA
element :file_title_name
end
+ view 'app/assets/javascripts/blob/components/blob_header_filepath.vue' do
+ element :file_title_name
+ end
+
view 'app/views/shared/_file_highlight.html.haml' do
element :file_content
end
+ view 'app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue' do
+ element :file_content
+ end
+
+ view 'app/assets/javascripts/snippets/components/snippet_header.vue' do
+ element :snippet_action_button
+ element :delete_snippet_button
+ end
+
+ view 'app/assets/javascripts/snippets/components/snippet_blob_view.vue' do
+ element :clone_button
+ end
+
+ view 'app/assets/javascripts/vue_shared/components/clone_dropdown.vue' do
+ element :copy_http_url_button
+ element :copy_ssh_url_button
+ end
+
def has_snippet_title?(snippet_title)
has_element? :snippet_title, text: snippet_title
end
def has_snippet_description?(snippet_description)
- has_element? :snippet_description, text: snippet_description
- end
-
- def has_embed_type?(embed_type)
- within_element(:embed_type) do
- has_text?(embed_type)
- end
+ has_element? :snippet_description_field, text: snippet_description
end
def has_visibility_type?(visibility_type)
@@ -52,6 +75,30 @@ module QA
has_text?(file_content)
end
end
+
+ def click_edit_button
+ finished_loading?
+ click_element(:snippet_action_button, action: 'Edit')
+ end
+
+ def click_delete_button
+ finished_loading?
+ click_element(:snippet_action_button, action: 'Delete')
+ click_element(:delete_snippet_button)
+ finished_loading? # wait for the page to reload after deletion
+ end
+
+ def get_repository_uri_http
+ finished_loading?
+ click_element(:clone_button)
+ Git::Location.new(find_element(:copy_http_url_button)['data-clipboard-text']).uri.to_s
+ end
+
+ def get_repository_uri_ssh
+ finished_loading?
+ click_element(:clone_button)
+ Git::Location.new(find_element(:copy_ssh_url_button)['data-clipboard-text']).uri.to_s
+ end
end
end
end