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
359a9319
Commit
359a9319
authored
Feb 25, 2021
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactor test helpers
Adds a data-testid to the stage divs to ease selection
parent
8bff67db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
ee/app/assets/javascripts/analytics/cycle_analytics/components/create_value_stream_form/custom_stage_fields.vue
...mponents/create_value_stream_form/custom_stage_fields.vue
+1
-1
ee/app/assets/javascripts/analytics/cycle_analytics/components/create_value_stream_form/default_stage_fields.vue
...ponents/create_value_stream_form/default_stage_fields.vue
+1
-1
ee/spec/features/groups/analytics/cycle_analytics/multiple_value_streams_spec.rb
.../analytics/cycle_analytics/multiple_value_streams_spec.rb
+11
-5
spec/support/helpers/cycle_analytics_helpers.rb
spec/support/helpers/cycle_analytics_helpers.rb
+2
-2
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/create_value_stream_form/custom_stage_fields.vue
View file @
359a9319
...
...
@@ -89,7 +89,7 @@ export default {
};
</
script
>
<
template
>
<div>
<div
data-testid=
"value-stream-stage-fields"
>
<div
class=
"gl-display-flex"
>
<gl-form-group
class=
"gl-flex-grow-1"
...
...
ee/app/assets/javascripts/analytics/cycle_analytics/components/create_value_stream_form/default_stage_fields.vue
View file @
359a9319
...
...
@@ -59,7 +59,7 @@ export default {
};
</
script
>
<
template
>
<div
class=
"gl-mb-4"
>
<div
class=
"gl-mb-4"
data-testid=
"value-stream-stage-fields"
>
<div
class=
"gl-display-flex"
>
<gl-form-group
class=
"gl-flex-grow-1 gl-mb-0"
...
...
ee/spec/features/groups/analytics/cycle_analytics/multiple_value_streams_spec.rb
View file @
359a9319
...
...
@@ -40,11 +40,17 @@ RSpec.describe 'Multiple value streams', :js do
wait_for_requests
end
def
add_custom_stage_to_form
(
index
=
6
)
def
add_custom_stage_to_form
page
.
find_button
(
s_
(
'CreateValueStreamForm|Add another stage'
)).
click
fill_in
"custom-stage-name-
#{
index
}
"
,
with:
"Cool custom stage - name
#{
index
}
"
select_dropdown_option_by_value
"custom-stage-start-event-
#{
index
}
"
,
:merge_request_created
select_dropdown_option_by_value
"custom-stage-end-event-
#{
index
}
"
,
:merge_request_merged
index
=
page
.
all
(
'[data-testid="value-stream-stage-fields"]'
).
length
last_stage
=
page
.
all
(
'[data-testid="value-stream-stage-fields"]'
).
last
within
last_stage
do
find
(
'[name*="custom-stage-name-"]'
).
fill_in
with:
"Cool custom stage - name
#{
index
}
"
select_dropdown_option_by_value
"custom-stage-start-event-"
,
:merge_request_created
select_dropdown_option_by_value
"custom-stage-end-event-"
,
:merge_request_merged
end
end
def
create_value_stream
...
...
@@ -120,7 +126,7 @@ RSpec.describe 'Multiple value streams', :js do
end
it
'can add a custom stage'
do
add_custom_stage_to_form
(
7
)
add_custom_stage_to_form
page
.
find_button
(
_
(
'Save Value Stream'
)).
click
wait_for_requests
...
...
spec/support/helpers/cycle_analytics_helpers.rb
View file @
359a9319
...
...
@@ -15,7 +15,7 @@ module CycleAnalyticsHelpers
end
def
toggle_dropdown
(
field
)
page
.
within
(
"[data-testid='
#{
field
}
']"
)
do
page
.
within
(
"[data-testid
*
='
#{
field
}
']"
)
do
find
(
'.dropdown-toggle'
).
click
wait_for_requests
...
...
@@ -26,7 +26,7 @@ module CycleAnalyticsHelpers
def
select_dropdown_option_by_value
(
name
,
value
,
elem
=
'.dropdown-item'
)
toggle_dropdown
name
page
.
find
(
"[data-testid='
#{
name
}
'] .dropdown-menu"
).
find
(
"
#{
elem
}
[value='
#{
value
}
']"
).
click
page
.
find
(
"[data-testid
*
='
#{
name
}
'] .dropdown-menu"
).
find
(
"
#{
elem
}
[value='
#{
value
}
']"
).
click
end
def
create_commit_referencing_issue
(
issue
,
branch_name:
generate
(
:branch
))
...
...
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