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
2595a514
Commit
2595a514
authored
Mar 16, 2022
by
Désirée Chevalier
Committed by
Andrejs Cunskis
Mar 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update e2e iterations specs to remove manual cadence/iteration creation
parent
2b592225
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
137 additions
and
33 deletions
+137
-33
ee/app/assets/javascripts/iterations/components/iteration_cadence_form.vue
...ascripts/iterations/components/iteration_cadence_form.vue
+2
-0
ee/app/assets/javascripts/iterations/components/iteration_cadence_list_item.vue
...pts/iterations/components/iteration_cadence_list_item.vue
+5
-1
qa/qa/ee/page/group/iteration/cadence/index.rb
qa/qa/ee/page/group/iteration/cadence/index.rb
+14
-4
qa/qa/ee/page/group/iteration/cadence/new.rb
qa/qa/ee/page/group/iteration/cadence/new.rb
+9
-0
qa/qa/ee/page/group/iteration/show.rb
qa/qa/ee/page/group/iteration/show.rb
+16
-0
qa/qa/ee/page/project/issue/show.rb
qa/qa/ee/page/project/issue/show.rb
+13
-5
qa/qa/ee/resource/group_cadence.rb
qa/qa/ee/resource/group_cadence.rb
+17
-5
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
+36
-4
qa/qa/specs/features/ee/browser_ui/2_plan/iterations/create_group_iteration_spec.rb
...owser_ui/2_plan/iterations/create_group_iteration_spec.rb
+21
-14
qa/qa/support/dates.rb
qa/qa/support/dates.rb
+4
-0
No files found.
ee/app/assets/javascripts/iterations/components/iteration_cadence_form.vue
View file @
2595a514
...
...
@@ -385,6 +385,7 @@ export default {
class=
"gl-form-input-md"
:required=
"automatic"
:disabled=
"loadingCadence || !automatic"
data-qa-selector=
"iteration_cadence_duration_field"
@
change=
"validate('durationInWeeks')"
/>
</gl-form-group>
...
...
@@ -406,6 +407,7 @@ export default {
:options=
"$options.availableFutureIterations"
:required=
"automatic"
class=
"gl-form-input-md"
data-qa-selector=
"iteration_cadence_future_iterations_field"
@
change=
"validate('iterationsInAdvance')"
/>
</gl-form-group>
...
...
ee/app/assets/javascripts/iterations/components/iteration_cadence_list_item.vue
View file @
2595a514
...
...
@@ -305,7 +305,11 @@ export default {
class=
"gl-bg-gray-10 gl-p-5 gl-border-t-solid gl-border-gray-100 gl-border-t-1"
data-testid=
"iteration-item"
>
<router-link
:to=
"path(iteration.id)"
>
<router-link
:to=
"path(iteration.id)"
data-qa-selector=
"iteration_item"
:data-qa-title=
"getIterationPeriod(iteration)"
>
{{
getIterationPeriod
(
iteration
)
}}
</router-link>
<timebox-status-badge
v-if=
"showStateBadge"
:state=
"iteration.state"
/>
...
...
qa/qa/ee/page/group/iteration/cadence/index.rb
View file @
2595a514
...
...
@@ -18,19 +18,29 @@ module QA
view
'ee/app/assets/javascripts/iterations/components/iteration_cadence_list_item.vue'
do
element
:cadence_options_button
element
:iteration_item
end
def
click_new_iteration_cadence_button
click_element
(
:create_new_cadence_button
)
end
def
click_new_iteration_button
(
cadence_title
)
cadence
=
find_element
(
:cadence_list_item_content
,
text:
cadence_title
)
def
open_iteration
(
cadence_title
,
iteration_period
)
cadence
=
toggle_iteration_cadence_dropdown
(
cadence_title
)
within
cadence
do
click_element
(
:cadence_options_button
)
click_element
(
:new_iteration_button
)
click_iteration
(
iteration_period
)
end
end
private
def
click_iteration
(
iteration_period
)
click_element
(
:iteration_item
,
title:
iteration_period
)
end
def
toggle_iteration_cadence_dropdown
(
cadence_title
)
find_element
(
:cadence_list_item_content
,
text:
cadence_title
).
click
end
end
end
end
...
...
qa/qa/ee/page/group/iteration/cadence/new.rb
View file @
2595a514
...
...
@@ -23,8 +23,17 @@ module QA
fill_element
(
:iteration_cadence_description_field
,
description
)
end
def
fill_duration
(
duration
)
select_element
(
:iteration_cadence_duration_field
,
duration
)
end
def
fill_future_iterations
(
future_iterations
)
select_element
(
:iteration_cadence_future_iterations_field
,
future_iterations
)
end
def
fill_start_date
(
start_date
)
fill_element
(
:iteration_cadence_start_date_field
,
start_date
)
send_keys_to_element
(
:iteration_cadence_start_date_field
,
:enter
)
end
def
fill_title
(
title
)
...
...
qa/qa/ee/page/group/iteration/show.rb
View file @
2595a514
...
...
@@ -11,6 +11,22 @@ module QA
element
:iteration_issue_link
end
view
'ee/app/assets/javascripts/burndown_chart/components/burndown_chart.vue'
do
element
:burndown_chart
end
view
'ee/app/assets/javascripts/burndown_chart/components/burnup_chart.vue'
do
element
:burnup_chart
end
def
has_burndown_chart?
has_element?
(
:burndown_chart
)
end
def
has_burnup_chart?
has_element?
(
:burnup_chart
)
end
def
has_issue?
(
issue
)
within_element
(
:iteration_issues_container
)
do
has_element?
(
:iteration_issue_link
,
issue_title:
issue
.
title
)
...
...
qa/qa/ee/page/project/issue/show.rb
View file @
2595a514
...
...
@@ -30,25 +30,33 @@ module QA
end
end
def
assign_iteration
(
iteration
)
def
assign_iteration
(
iteration
_period
)
within_element
(
:iteration_container
)
do
click_element
(
:edit_link
)
click_on
(
"
#{
iteration
.
title
}
"
)
click_on
(
"
#{
iteration
_period
}
"
)
end
wait_until
(
reload:
false
)
do
has_element?
(
:iteration_container
,
text:
iteration
.
title
,
wait:
0
)
has_element?
(
:iteration_container
,
text:
iteration
_period
,
wait:
0
)
end
refresh
end
def
has_iteration?
(
iteration_title
)
def
click_iteration
(
iteration_period
)
has_iteration?
(
iteration_period
)
within_element
(
:iteration_container
)
do
click_element
(
:iteration_link
,
text:
iteration_period
)
end
end
def
has_iteration?
(
iteration_period
)
wait_until_iteration_container_loaded
within_element
(
:iteration_container
)
do
wait_until
(
reload:
false
)
do
has_element?
(
:iteration_link
,
text:
iteration_
title
,
wait:
0
)
has_element?
(
:iteration_link
,
text:
iteration_
period
,
wait:
0
)
end
end
end
...
...
qa/qa/ee/resource/group_cadence.rb
View file @
2595a514
...
...
@@ -13,15 +13,18 @@ module QA
end
attribute
:id
attribute
:start_date
attribute
:description
attribute
:duration
attribute
:future_iterations
attribute
:start_date
attribute
:title
def
initialize
@start_date
=
current_date_yyyy_mm_dd
@description
=
"This is a test cadence."
@title
=
"Iteration Cadence
#{
SecureRandom
.
hex
(
8
)
}
"
@automatic
=
false
@duration
=
2
@future_iterations
=
2
end
def
fabricate!
...
...
@@ -33,12 +36,19 @@ module QA
QA
::
EE
::
Page
::
Group
::
Iteration
::
Cadence
::
New
.
perform
do
|
new
|
new
.
fill_title
(
@title
)
new
.
uncheck_automatic_scheduling
unless
@automatic
new
.
fill_start_date
(
@start_date
)
if
@automatic
new
.
fill_start_date
(
@start_date
)
new
.
fill_duration
(
@duration
)
new
.
fill_future_iterations
(
@future_iterations
)
new
.
click_create_iteration_cadence_button
end
end
def
resource_web_url
(
resource
)
super
rescue
ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def
api_get_path
"gid://gitlab/Cadence/
#{
id
}
"
end
...
...
@@ -55,7 +65,9 @@ module QA
title: "
#{
@title
}
"
description: "
#{
@description
}
"
startDate: "
#{
@start_date
}
"
automatic:
#{
@automatic
}
iterationsInAdvance:
#{
@future_iterations
}
durationInWeeks:
#{
@duration
}
automatic: true
active: true
}) {
iterationCadence {
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/iterations/assign_group_iteration_spec.rb
View file @
2595a514
...
...
@@ -3,11 +3,21 @@
module
QA
RSpec
.
describe
'Plan'
,
:reliable
do
describe
'Assign Iterations'
do
let!
(
:iteration
)
{
EE
::
Resource
::
GroupIteration
.
fabricate_via_api!
}
include
Support
::
Dates
let!
(
:start_date
)
{
current_date_yyyy_mm_dd
}
let!
(
:due_date
)
{
thirteen_days_from_now_yyyy_mm_dd
}
let
(
:iteration_period
)
{
"
#{
format_date
(
start_date
)
}
-
#{
format_date
(
due_date
)
}
"
}
let
(
:iteration_group
)
do
QA
::
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
group
.
path
=
"group-to-test-assigning-iterations-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
group
=
iteration
.
group
project
.
group
=
iteration
_
group
project
.
name
=
"project-to-test-iterations-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
...
...
@@ -20,16 +30,38 @@ module QA
end
before
do
Runtime
::
Feature
.
enable
(
:iteration_cadences
,
group:
iteration_group
)
# TODO: this sleep can be removed when the `Runtime::Feature.enable` method call is removed
# Wait for the application settings cache to update with iteration_cadences feature flag setting
# as per this issue https://gitlab.com/gitlab-org/gitlab/-/issues/36663
# We cannot check the UI for the changes because they are sporadically available at first
# as described in this issue https://gitlab.com/gitlab-org/quality/testcases/-/issues/113#note_300647725
sleep
(
60
)
Flow
::
Login
.
sign_in
EE
::
Resource
::
GroupCadence
.
fabricate_via_api!
do
|
cadence
|
cadence
.
group
=
iteration_group
cadence
.
start_date
=
start_date
end
end
it
'assigns a group iteration to an existing issue'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347942'
do
issue
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
issue
|
issue
.
assign_iteration
(
iteration
)
issue
.
assign_iteration
(
iteration_period
)
expect
(
issue
).
to
have_iteration
(
iteration_period
)
issue
.
click_iteration
(
iteration_period
)
end
expect
(
issue
).
to
have_iteration
(
iteration
.
title
)
EE
::
Page
::
Group
::
Iteration
::
Show
.
perform
do
|
iteration
|
aggregate_failures
"iteration created successfully"
do
expect
(
iteration
).
to
have_content
(
iteration_period
)
expect
(
iteration
).
to
have_issue
(
issue
)
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/iterations/create_group_iteration_spec.rb
View file @
2595a514
...
...
@@ -6,10 +6,11 @@ module QA
describe
'Group Iterations'
do
include
Support
::
Dates
let
(
:title
)
{
"Group iteration created via GUI
#{
SecureRandom
.
hex
(
8
)
}
"
}
let
(
:title
)
{
"Group iteration c
adence c
reated via GUI
#{
SecureRandom
.
hex
(
8
)
}
"
}
let
(
:start_date
)
{
current_date_yyyy_mm_dd
}
let
(
:due_date
)
{
next_month_yyyy_mm_dd
}
let
(
:description
)
{
"This is a group test iteration."
}
let
(
:due_date
)
{
thirteen_days_from_now_yyyy_mm_dd
}
let
(
:description
)
{
"This is a group test iteration cadence."
}
let
(
:iteration_period
)
{
"
#{
format_date
(
start_date
)
}
-
#{
format_date
(
due_date
)
}
"
}
let!
(
:iteration_group
)
do
QA
::
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
...
...
@@ -29,21 +30,27 @@ module QA
Flow
::
Login
.
sign_in
end
it
'creates a group iteration'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347943'
do
EE
::
Resource
::
GroupIteration
.
fabricate_via_browser_ui!
do
|
iteration
|
iteration
.
title
=
title
iteration
.
description
=
description
iteration
.
due_date
=
due_date
iteration
.
start_date
=
start_date
iteration
.
group
=
iteration_group
it
'creates a group iteration automatically through an iteration cadence'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347943'
do
EE
::
Resource
::
GroupCadence
.
fabricate_via_browser_ui!
do
|
cadence
|
cadence
.
group
=
iteration_group
cadence
.
title
=
title
cadence
.
description
=
description
cadence
.
start_date
=
start_date
cadence
.
duration
=
2
cadence
.
future_iterations
=
2
end
EE
::
Page
::
Group
::
Iteration
::
Cadence
::
Index
.
perform
do
|
cadence
|
cadence
.
retry_on_exception
(
reload:
cadence
)
do
cadence
.
open_iteration
(
title
,
iteration_period
)
end
end
EE
::
Page
::
Group
::
Iteration
::
Show
.
perform
do
|
iteration
|
aggregate_failures
"iteration created successfully"
do
expect
(
iteration
).
to
have_content
(
title
)
expect
(
iteration
).
to
have_content
(
description
)
expect
(
iteration
).
to
have_content
(
format_date
(
start_date
))
expect
(
iteration
).
to
have_content
(
format_date
(
due_date
))
expect
(
iteration
).
to
have_content
(
iteration_period
)
expect
(
iteration
).
to
have_burndown_chart
expect
(
iteration
).
to
have_burnup_chart
end
end
end
...
...
qa/qa/support/dates.rb
View file @
2595a514
...
...
@@ -11,6 +11,10 @@ module QA
current_date
.
next_month
.
strftime
(
"%Y/%m/%d"
)
end
def
thirteen_days_from_now_yyyy_mm_dd
(
current_date
+
13
).
strftime
(
"%Y/%m/%d"
)
end
def
format_date
(
date
)
new_date
=
DateTime
.
strptime
(
date
,
"%Y/%m/%d"
)
new_date
.
strftime
(
"%b %-d, %Y"
)
...
...
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