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
c6abb581
Commit
c6abb581
authored
Sep 14, 2020
by
Désirée Chevalier
Committed by
Ezekiel Kigbo
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add e2e test for assigning a group iteration
Adds an e2e test for assigning a group iteration to an issue.
parent
5bdbf365
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
9 deletions
+85
-9
ee/app/assets/javascripts/sidebar/components/iteration_select.vue
...ssets/javascripts/sidebar/components/iteration_select.vue
+3
-2
qa/qa/ee/page/project/issue/show.rb
qa/qa/ee/page/project/issue/show.rb
+45
-7
qa/qa/specs/features/ee/browser_ui/2_plan/iterations/assign_group_iteration_spec.rb
...owser_ui/2_plan/iterations/assign_group_iteration_spec.rb
+37
-0
No files found.
ee/app/assets/javascripts/sidebar/components/iteration_select.vue
View file @
c6abb581
...
...
@@ -161,7 +161,7 @@ export default {
</
script
>
<
template
>
<div>
<div
data-qa-selector=
"iteration_container"
>
<div
v-gl-tooltip
class=
"sidebar-collapsed-icon"
>
<gl-icon
:size=
"16"
:aria-label=
"$options.iterationText"
name=
"iteration"
/>
<span
class=
"collapse-truncated-title"
>
{{
iterationTitle
}}
</span>
...
...
@@ -176,13 +176,14 @@ export default {
data-track-label=
"right_sidebar"
data-track-property=
"iteration"
data-track-event=
"click_edit_button"
data-qa-selector=
"edit_iteration_link"
@
click.stop=
"toggleDropdown"
>
{{
__
(
'
Edit
'
)
}}
</gl-button
>
</div>
<div
data-testid=
"select-iteration"
class=
"hide-collapsed"
>
<span
v-if=
"showNoIterationContent"
class=
"no-value"
>
{{
$options
.
noIteration
}}
</span>
<gl-link
v-else-if=
"!editing"
:href=
"iterationUrl"
<gl-link
v-else-if=
"!editing"
data-qa-selector=
"iteration_link"
:href=
"iterationUrl"
><strong>
{{
iterationTitle
}}
</strong></gl-link
>
</div>
...
...
qa/qa/ee/page/project/issue/show.rb
View file @
c6abb581
...
...
@@ -12,26 +12,62 @@ module QA
super
base
.
class_eval
do
view
'ee/app/assets/javascripts/sidebar/components/iteration_select.vue'
do
element
:edit_iteration_link
element
:iteration_container
element
:iteration_link
end
view
'ee/app/assets/javascripts/sidebar/components/weight/weight.vue'
do
element
:weight_label_value
element
:edit_weight_link
element
:remove_weight_link
element
:weight_input_field
element
:weight_label_value
element
:weight_no_value_content
end
end
end
def
assign_iteration
(
iteration
)
click_element
(
:edit_iteration_link
)
within_element
(
:iteration_container
)
do
click_on
(
"
#{
iteration
.
title
}
"
)
end
wait_until
(
reload:
false
)
do
has_element?
(
:iteration_container
,
text:
iteration
.
title
,
wait:
0
)
end
refresh
end
def
click_remove_weight_link
click_element
(
:remove_weight_link
)
end
def
has_iteration?
(
iteration_title
)
wait_until_iteration_container_loaded
within_element
(
:iteration_container
)
do
wait_until
(
reload:
false
)
do
has_element?
(
:iteration_link
,
text:
iteration_title
,
wait:
0
)
end
end
end
def
set_weight
(
weight
)
click_element
(
:edit_weight_link
)
fill_element
(
:weight_input_field
,
weight
)
send_keys_to_element
(
:weight_input_field
,
:enter
)
end
def
wait_for_attachment_replication
(
image_url
,
max_wait:
Runtime
::
Geo
.
max_file_replication_time
)
QA
::
Runtime
::
Logger
.
debug
(
%Q[
#{
self
.
class
.
name
}
- wait_for_attachment_replication]
)
wait_until_geo_max_replication_time
(
max_wait:
max_wait
)
do
asset_exists?
(
image_url
)
end
end
def
weight_label_value
find_element
(
:weight_label_value
)
end
...
...
@@ -40,16 +76,18 @@ module QA
find_element
(
:weight_no_value_content
)
end
def
wait_for_attachment_replication
(
image_url
,
max_wait:
Runtime
::
Geo
.
max_file_replication_time
)
QA
::
Runtime
::
Logger
.
debug
(
%Q[
#{
self
.
class
.
name
}
- wait_for_attachment_replication]
)
wait_until_geo_max_replication_time
(
max_wait:
max_wait
)
do
asset_exists?
(
image_url
)
end
end
private
def
wait_until_geo_max_replication_time
(
max_wait:
Runtime
::
Geo
.
max_file_replication_time
)
wait_until
(
max_duration:
max_wait
)
{
yield
}
end
def
wait_until_iteration_container_loaded
wait_until
(
reload:
false
,
max_duration:
10
,
sleep_interval:
1
)
do
has_element?
(
:iteration_container
)
has_element?
(
:iteration_link
)
end
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/iterations/assign_group_iteration_spec.rb
0 → 100644
View file @
c6abb581
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Plan'
do
describe
'Assign Iterations'
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
group
=
@iteration
.
group
project
.
name
=
"project-to-test-iterations-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
let
(
:issue
)
do
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
issue
.
title
=
"issue-to-test-iterations-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
before
do
Flow
::
Login
.
sign_in
end
it
'assigns a group iteration to an existing issue'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/958'
do
@iteration
=
EE
::
Resource
::
GroupIteration
.
fabricate_via_browser_ui!
issue
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
issue
|
issue
.
assign_iteration
(
@iteration
)
expect
(
issue
).
to
have_iteration
(
@iteration
.
title
)
end
end
end
end
end
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