Commit 00e2eec0 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-fix-failing-radio-button-tests' into 'master'

Fix failing snippet and epic tests

See merge request gitlab-org/gitlab!55575
parents c61afc91 d79e4bb7
...@@ -55,7 +55,12 @@ export default { ...@@ -55,7 +55,12 @@ export default {
> >
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<gl-icon :size="16" :name="option.icon" /> <gl-icon :size="16" :name="option.icon" />
<span class="font-weight-bold ml-1 js-visibility-option">{{ option.label }}</span> <span
class="font-weight-bold ml-1 js-visibility-option"
data-qa-selector="visibility_content"
:data-qa-visibility="option.label"
>{{ option.label }}</span
>
</div> </div>
<template #help>{{ <template #help>{{
isProjectSnippet && option.description_project isProjectSnippet && option.description_project
......
...@@ -158,12 +158,15 @@ export default { ...@@ -158,12 +158,15 @@ export default {
</template> </template>
</markdown-field> </markdown-field>
</gl-form-group> </gl-form-group>
<gl-form-group :label="__('Confidentiality')" label-for="epic-confidentiality"> <gl-form-group
:label="__('Confidentiality')"
label-for="epic-confidentiality"
data-qa-selector="confidential_epic_checkbox"
>
<gl-form-checkbox <gl-form-checkbox
id="epic-confidentiality" id="epic-confidentiality"
v-model="confidential" v-model="confidential"
data-testid="epic-confidentiality" data-testid="epic-confidentiality"
data-qa-selector="confidential_epic_checkbox"
> >
{{ $options.i18n.confidentialityLabel }} {{ $options.i18n.confidentialityLabel }}
</gl-form-checkbox> </gl-form-checkbox>
......
...@@ -17,7 +17,7 @@ module QA ...@@ -17,7 +17,7 @@ module QA
end end
def enable_confidential_epic def enable_confidential_epic
click_element :confidential_epic_checkbox find_element(:confidential_epic_checkbox, visible: false).click
end end
def set_title(title) def set_title(title)
......
...@@ -32,6 +32,10 @@ module QA ...@@ -32,6 +32,10 @@ module QA
# This 'element' is here only to ensure the changes in the view source aren't mistakenly changed # This 'element' is here only to ensure the changes in the view source aren't mistakenly changed
element :_, "qa_selector = local_assigns.fetch(:qa_selector, '')" # rubocop:disable QA/ElementWithPattern element :_, "qa_selector = local_assigns.fetch(:qa_selector, '')" # rubocop:disable QA/ElementWithPattern
end end
base.view 'app/assets/javascripts/snippets/components/snippet_visibility_edit.vue' do
element :visibility_content
end
end end
def fill_title(title) def fill_title(title)
...@@ -44,7 +48,7 @@ module QA ...@@ -44,7 +48,7 @@ module QA
end end
def set_visibility(visibility) def set_visibility(visibility)
choose visibility click_element(:visibility_content, visibility: visibility)
end end
def fill_file_name(name, file_number = nil) def fill_file_name(name, file_number = nil)
......
...@@ -46,6 +46,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] = ...@@ -46,6 +46,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] =
<span <span
class="font-weight-bold ml-1 js-visibility-option" class="font-weight-bold ml-1 js-visibility-option"
data-qa-selector="visibility_content"
data-qa-visibility="Private"
> >
Private Private
</span> </span>
...@@ -65,6 +67,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] = ...@@ -65,6 +67,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] =
<span <span
class="font-weight-bold ml-1 js-visibility-option" class="font-weight-bold ml-1 js-visibility-option"
data-qa-selector="visibility_content"
data-qa-visibility="Internal"
> >
Internal Internal
</span> </span>
...@@ -84,6 +88,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] = ...@@ -84,6 +88,8 @@ exports[`Snippet Visibility Edit component rendering matches the snapshot 1`] =
<span <span
class="font-weight-bold ml-1 js-visibility-option" class="font-weight-bold ml-1 js-visibility-option"
data-qa-selector="visibility_content"
data-qa-visibility="Public"
> >
Public Public
</span> </span>
......
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