Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e80e136c
Commit
e80e136c
authored
Apr 08, 2021
by
Desiree Chevalier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix e2e checkbox workarounds
parent
c45694df
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
33 deletions
+30
-33
app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
...ipts/integrations/edit/components/jira_trigger_fields.vue
+2
-2
app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue
..._request_widget/components/states/squash_before_merge.vue
+2
-1
ee/app/assets/javascripts/epic/components/epic_form.vue
ee/app/assets/javascripts/epic/components/epic_form.vue
+2
-5
qa/qa/ee/page/group/epic/new.rb
qa/qa/ee/page/group/epic/new.rb
+1
-2
qa/qa/page/base.rb
qa/qa/page/base.rb
+13
-7
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+2
-8
qa/qa/page/project/settings/services/jira.rb
qa/qa/page/project/settings/services/jira.rb
+6
-6
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+2
-2
No files found.
app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
View file @
e80e136c
...
...
@@ -214,7 +214,7 @@ export default {
<gl-form-checkbox
v-model=
"issueTransitionEnabled"
:disabled=
"isInheriting"
data-qa-selector=
"service_jira_issue_transition_enabled"
data-qa-selector=
"service_jira_issue_transition_enabled
_checkbox
"
>
{{ s__('JiraService|Enable Jira transitions') }}
</gl-form-checkbox>
...
...
@@ -232,7 +232,7 @@ export default {
name=
"service[jira_issue_transition_automatic]"
:value=
"issueTransitionOption.value"
:disabled=
"isInheriting"
:data-qa-selector=
"`service_jira_issue_transition_automatic_${issueTransitionOption.value}`"
:data-qa-selector=
"`service_jira_issue_transition_automatic_${issueTransitionOption.value}
_radio
`"
>
{{ issueTransitionOption.label }}
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue
View file @
e80e136c
...
...
@@ -44,7 +44,8 @@ export default {
:checked=
"value"
:disabled=
"isDisabled"
name=
"squash"
class=
"qa-squash-checkbox js-squash-checkbox gl-mr-2 gl-display-flex gl-align-items-center"
class=
"js-squash-checkbox gl-mr-2 gl-display-flex gl-align-items-center"
data-qa-selector=
"squash_checkbox"
:title=
"tooltipTitle"
@
change=
"(checked) => $emit('input', checked)"
>
...
...
ee/app/assets/javascripts/epic/components/epic_form.vue
View file @
e80e136c
...
...
@@ -162,14 +162,11 @@ export default {
</
template
>
</markdown-field>
</gl-form-group>
<gl-form-group
:label=
"__('Confidentiality')"
label-for=
"epic-confidentiality"
data-qa-selector=
"confidential_epic_checkbox"
>
<gl-form-group
:label=
"__('Confidentiality')"
label-for=
"epic-confidentiality"
>
<gl-form-checkbox
id=
"epic-confidentiality"
v-model=
"confidential"
data-qa-selector=
"confidential_epic_checkbox"
data-testid=
"epic-confidentiality"
>
{{ $options.i18n.confidentialityLabel }}
...
...
qa/qa/ee/page/group/epic/new.rb
View file @
e80e136c
...
...
@@ -17,8 +17,7 @@ module QA
end
def
enable_confidential_epic
# TODO: Fix this workaround for checkbox hidden by label
find_element
(
:confidential_epic_checkbox
,
visible:
false
).
click
check_element
(
:confidential_epic_checkbox
,
true
)
end
def
set_title
(
title
)
...
...
qa/qa/page/base.rb
View file @
e80e136c
...
...
@@ -132,7 +132,7 @@ module QA
all
(
element_selector_css
(
name
),
**
kwargs
)
end
def
check_element
(
name
)
def
check_element
(
name
,
click_by_js
=
false
)
if
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
"
#{
name
}
is already checked"
)
...
...
@@ -140,7 +140,7 @@ module QA
end
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
,
visible:
false
).
click
click_checkbox_or_radio
(
name
,
click_by_js
)
checked
=
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
checked
?
"
#{
name
}
was checked"
:
"
#{
name
}
was not checked"
)
...
...
@@ -149,7 +149,7 @@ module QA
end
end
def
uncheck_element
(
name
)
def
uncheck_element
(
name
,
click_by_js
=
false
)
unless
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
"
#{
name
}
is already unchecked"
)
...
...
@@ -157,7 +157,7 @@ module QA
end
retry_until
(
sleep_interval:
1
)
do
find_element
(
name
,
visible:
false
).
click
click_checkbox_or_radio
(
name
,
click_by_js
)
unchecked
=
!
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
unchecked
?
"
#{
name
}
was unchecked"
:
"
#{
name
}
was not unchecked"
)
...
...
@@ -175,9 +175,7 @@ module QA
end
retry_until
(
sleep_interval:
1
)
do
radio
=
find_element
(
name
,
visible:
false
)
# Some radio buttons are hidden by their labels and cannot be clicked directly
click_by_js
?
page
.
execute_script
(
"arguments[0].click();"
,
radio
)
:
radio
.
click
click_checkbox_or_radio
(
name
,
click_by_js
)
selected
=
find_element
(
name
,
visible:
false
).
checked?
QA
::
Runtime
::
Logger
.
debug
(
selected
?
"
#{
name
}
was selected"
:
"
#{
name
}
was not selected"
)
...
...
@@ -423,6 +421,14 @@ module QA
end
end
end
private
def
click_checkbox_or_radio
(
name
,
click_by_js
)
box
=
find_element
(
name
,
visible:
false
)
# Some checkboxes and radio buttons are hidden by their labels and cannot be clicked directly
click_by_js
?
page
.
execute_script
(
"arguments[0].click();"
,
box
)
:
box
.
click
end
end
end
end
qa/qa/page/merge_request/show.rb
View file @
e80e136c
...
...
@@ -238,18 +238,12 @@ module QA
end
def
mark_to_squash
# The squash checkbox is disabled on load
wait_until
do
has_element?
(
:squash_checkbox
)
end
# The squash checkbox is enabled via JS
wait_until
(
reload:
false
)
do
!
find_element
(
:squash_checkbox
).
disabled?
!
find_element
(
:squash_checkbox
,
visible:
false
).
disabled?
end
# TODO: Fix workaround for data-qa-selector failure
click_element
(
:squash_checkbox
)
check_element
(
:squash_checkbox
,
true
)
end
def
merge!
...
...
qa/qa/page/project/settings/services/jira.rb
View file @
e80e136c
...
...
@@ -13,9 +13,9 @@ module QA
end
view
'app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue'
do
element
:service_jira_issue_transition_enabled
element
:service_jira_issue_transition_automatic_true
,
':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}
`"'
# rubocop:disable QA/ElementWithPattern
element
:service_jira_issue_transition_automatic_false
,
':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}
`"'
# rubocop:disable QA/ElementWithPattern
element
:service_jira_issue_transition_enabled
_checkbox
element
:service_jira_issue_transition_automatic_true
_radio
,
':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}_radio
`"'
# rubocop:disable QA/ElementWithPattern
element
:service_jira_issue_transition_automatic_false
_radio
,
':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}_radio
`"'
# rubocop:disable QA/ElementWithPattern
element
:service_jira_issue_transition_id_field
end
...
...
@@ -55,15 +55,15 @@ module QA
end
def
enable_transitions
c
lick_element_coordinates
(
:service_jira_issue_transition_enabled
,
visible:
fals
e
)
c
heck_element
(
:service_jira_issue_transition_enabled_checkbox
,
tru
e
)
end
def
use_automatic_transitions
c
lick_element_coordinates
(
:service_jira_issue_transition_automatic_true
,
visible:
fals
e
)
c
hoose_element
(
:service_jira_issue_transition_automatic_true_radio
,
tru
e
)
end
def
use_custom_transitions
c
lick_element_coordinates
(
:service_jira_issue_transition_automatic_false
,
visible:
fals
e
)
c
hoose_element
(
:service_jira_issue_transition_automatic_false_radio
,
tru
e
)
end
def
set_transition_ids
(
transition_ids
)
...
...
qa/qa/support/page/logging.rb
View file @
e80e136c
...
...
@@ -52,13 +52,13 @@ module QA
elements
end
def
check_element
(
name
)
def
check_element
(
name
,
click_by_js
=
nil
)
log
(
"checking :
#{
name
}
"
)
super
end
def
uncheck_element
(
name
)
def
uncheck_element
(
name
,
click_by_js
=
nil
)
log
(
"unchecking :
#{
name
}
"
)
super
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment