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
4b9bd188
Commit
4b9bd188
authored
Dec 20, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds tests for the mini pipeline graph
parent
dd5965a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
6 deletions
+50
-6
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+1
-1
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+2
-2
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+47
-3
No files found.
app/assets/stylesheets/pages/pipelines.scss
View file @
4b9bd188
...
...
@@ -748,7 +748,7 @@
.grouped-pipeline-dropdown
{
right
:
-172px
;
top
:
23px
;
min-height
:
191
px
;
min-height
:
50
px
;
a
{
color
:
$gl-text-color-light
;
...
...
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
4b9bd188
...
...
@@ -83,7 +83,7 @@
.btn-group.inline
-
if
actions
.
any?
.btn-group
%a
.dropdown-toggle.btn.btn-default
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%a
.dropdown-toggle.btn.btn-default
.js-pipeline-dropdown-manual-actions
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
=
custom_icon
(
'icon_play'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
...
...
@@ -94,7 +94,7 @@
%span
=
build
.
name
.
humanize
-
if
artifacts
.
present?
.btn-group
%a
.dropdown-toggle.btn.btn-default.build-artifacts
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%a
.dropdown-toggle.btn.btn-default.build-artifacts
.js-pipeline-dropdown-download
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
=
icon
(
"download"
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
4b9bd188
require
'spec_helper'
describe
"Pipelines"
do
describe
"Pipelines"
,
feature:
true
,
js
:true
do
include
GitlabRoutingHelper
include
WaitForAjax
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
@@ -76,7 +77,11 @@ describe "Pipelines" do
it
{
expect
(
page
).
to
have_link
(
'Manual build'
)
}
context
'when playing'
do
before
{
click_link
(
'Manual build'
)
}
before
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
click_link
(
'Manual build'
)
end
it
{
expect
(
manual
.
reload
).
to
be_pending
}
end
...
...
@@ -131,7 +136,10 @@ describe "Pipelines" do
before
{
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
}
it
{
expect
(
page
).
to
have_selector
(
'.build-artifacts'
)
}
it
{
expect
(
page
).
to
have_link
(
with_artifacts
.
name
)
}
it
do
find
(
'.js-pipeline-dropdown-download'
).
click
expect
(
page
).
to
have_link
(
with_artifacts
.
name
)
end
end
context
'with artifacts expired'
do
...
...
@@ -150,6 +158,42 @@ describe "Pipelines" do
it
{
expect
(
page
).
not_to
have_selector
(
'.build-artifacts'
)
}
end
end
context
'mini pipleine graph'
do
let!
(
:build
)
do
create
(
:ci_build
,
pipeline:
pipeline
,
stage:
'build'
,
name:
'build'
)
end
before
do
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
end
it
'should render a mini pipeline graph'
do
endpoint
=
stage_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
,
stage:
build
.
name
)
expect
(
page
).
to
have_selector
(
'.mini-pipeline-graph'
)
expect
(
page
).
to
have_selector
(
".js-builds-dropdown-button[data-stage-endpoint='
#{
endpoint
}
']"
)
end
context
'when clicking a graph stage'
do
it
'should open a dropdown'
do
find
(
'.js-builds-dropdown-button'
).
trigger
(
'click'
)
wait_for_ajax
expect
(
page
).
to
have_link
build
.
name
end
it
'should be possible to retry the failed build'
do
find
(
'.js-builds-dropdown-button'
).
trigger
(
'click'
)
wait_for_ajax
find
(
'a.ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Cancel running'
)
end
end
end
end
describe
'GET /:project/pipelines/stage.json?name=stage'
do
...
...
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