Commit 91dc8ac6 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-update-snippet-page-objects-vue' into 'master'

QA Page Objects updated with new Vue files

See merge request gitlab-org/gitlab!30960
parents 98ea2785 30422c89
...@@ -30,9 +30,11 @@ export default { ...@@ -30,9 +30,11 @@ export default {
<template v-if="blob.path"> <template v-if="blob.path">
<file-icon :file-name="blob.path" :size="18" aria-hidden="true" css-classes="mr-2" /> <file-icon :file-name="blob.path" :size="18" aria-hidden="true" css-classes="mr-2" />
<strong class="file-title-name qa-file-title-name mr-1 js-blob-header-filepath">{{ <strong
blob.path class="file-title-name mr-1 js-blob-header-filepath"
}}</strong> data-qa-selector="file_title_name"
>{{ blob.path }}</strong
>
</template> </template>
<small class="mr-2">{{ blobSize }}</small> <small class="mr-2">{{ blobSize }}</small>
......
...@@ -44,7 +44,8 @@ export default { ...@@ -44,7 +44,8 @@ export default {
</script> </script>
<template> <template>
<div <div
class="file-content code js-syntax-highlight qa-file-content" class="file-content code js-syntax-highlight"
data-qa-selector="file_content"
:class="$options.userColorScheme" :class="$options.userColorScheme"
> >
<div class="line-numbers"> <div class="line-numbers">
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
.embed-snippet .embed-snippet
.input-group .input-group
.input-group-prepend .input-group-prepend
%button.btn.btn-svg.embed-toggle.input-group-text.qa-embed-type{ 'data-toggle': 'dropdown', type: 'button' } %button.btn.btn-svg.embed-toggle.input-group-text{ 'data-toggle': 'dropdown', type: 'button' }
%span.js-embed-action= _("Embed") %span.js-embed-action= _("Embed")
= sprite_icon('angle-down', size: 12, css_class: 'caret-down') = sprite_icon('angle-down', size: 12, css_class: 'caret-down')
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list %ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
......
...@@ -10,7 +10,16 @@ module QA ...@@ -10,7 +10,16 @@ module QA
end end
view 'app/assets/javascripts/snippets/components/snippet_description_edit.vue' do view 'app/assets/javascripts/snippets/components/snippet_description_edit.vue' do
element :snippet_description_field, required: true element :snippet_description_field
element :description_placeholder, required: true
end
view 'app/assets/javascripts/snippets/components/snippet_title.vue' do
element :snippet_title, required: true
end
view 'app/assets/javascripts/snippets/components/snippet_blob_edit.vue' do
element :snippet_file_name
end end
view 'app/views/shared/form_elements/_description.html.haml' do view 'app/views/shared/form_elements/_description.html.haml' do
......
...@@ -9,10 +9,13 @@ module QA ...@@ -9,10 +9,13 @@ module QA
element :snippet_description_field, required: true element :snippet_description_field, required: true
end 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 view 'app/views/shared/snippets/_header.html.haml' do
element :snippet_title, required: true element :snippet_title, required: true
element :snippet_description_field, required: true element :snippet_description_field, required: true
element :embed_type
element :snippet_box element :snippet_box
end end
...@@ -20,10 +23,18 @@ module QA ...@@ -20,10 +23,18 @@ module QA
element :file_title_name element :file_title_name
end 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 view 'app/views/shared/_file_highlight.html.haml' do
element :file_content element :file_content
end end
view 'app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue' do
element :file_content
end
def has_snippet_title?(snippet_title) def has_snippet_title?(snippet_title)
has_element? :snippet_title, text: snippet_title has_element? :snippet_title, text: snippet_title
end end
...@@ -32,12 +43,6 @@ module QA ...@@ -32,12 +43,6 @@ module QA
has_element? :snippet_description_field, text: snippet_description has_element? :snippet_description_field, text: snippet_description
end end
def has_embed_type?(embed_type)
within_element(:embed_type) do
has_text?(embed_type)
end
end
def has_visibility_type?(visibility_type) def has_visibility_type?(visibility_type)
within_element(:snippet_box) do within_element(:snippet_box) do
has_text?(visibility_type) has_text?(visibility_type)
......
...@@ -13,7 +13,8 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = ` ...@@ -13,7 +13,8 @@ exports[`Blob Header Filepath rendering matches the snapshot 1`] = `
/> />
<strong <strong
class="file-title-name qa-file-title-name mr-1 js-blob-header-filepath" class="file-title-name mr-1 js-blob-header-filepath"
data-qa-selector="file_title_name"
> >
foo/bar/dummy.md foo/bar/dummy.md
</strong> </strong>
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
exports[`Blob Simple Viewer component rendering matches the snapshot 1`] = ` exports[`Blob Simple Viewer component rendering matches the snapshot 1`] = `
<div <div
class="file-content code js-syntax-highlight qa-file-content" class="file-content code js-syntax-highlight"
data-qa-selector="file_content"
> >
<div <div
class="line-numbers" class="line-numbers"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment