BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4ae28cb3
Commit
4ae28cb3
authored
Dec 15, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
parent
23f4d182
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
45 deletions
+62
-45
pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+1
-10
_graph_badge.html.haml
app/views/ci/status/_graph_badge.html.haml
+3
-2
pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+58
-33
No files found.
app/assets/stylesheets/pages/pipelines.scss
View file @
4ae28cb3
...
@@ -645,14 +645,6 @@
...
@@ -645,14 +645,6 @@
margin-bottom
:
0
;
margin-bottom
:
0
;
line-height
:
1
.2
;
line-height
:
1
.2
;
}
}
li
:first-child
{
padding-top
:
6px
;
}
li
:last-child
{
padding-bottom
:
6px
;
}
}
}
.dropdown-build
{
.dropdown-build
{
...
@@ -741,4 +733,4 @@
...
@@ -741,4 +733,4 @@
.ci-play-icon
{
.ci-play-icon
{
padding
:
5px
5px
5px
7px
;
padding
:
5px
5px
5px
7px
;
}
}
}
}
\ No newline at end of file
app/views/ci/status/_graph_badge.html.haml
View file @
4ae28cb3
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
-
subject
=
local_assigns
.
fetch
(
:subject
)
-
subject
=
local_assigns
.
fetch
(
:subject
)
-
status
=
subject
.
detailed_status
(
current_user
)
-
status
=
subject
.
detailed_status
(
current_user
)
-
klass
=
"ci-status-icon ci-status-icon-
#{
status
}
"
-
klass
=
"ci-status-icon ci-status-icon-
#{
status
}
"
-
tooltip_title
=
"
#{
subject
.
name
}
-
#{
status
.
label
}
"
-
if
status
.
has_details?
-
if
status
.
has_details?
=
link_to
status
.
details_path
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
status
}
"
}
do
=
link_to
status
.
details_path
,
data:
{
toggle:
'tooltip'
,
title:
tooltip_title
}
do
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
.ci-status-text
=
subject
.
name
.ci-status-text
=
subject
.
name
-
else
-
else
...
@@ -14,6 +15,6 @@
...
@@ -14,6 +15,6 @@
-
if
status
.
has_action?
-
if
status
.
has_action?
=
link_to
status
.
action_path
,
method:
status
.
action_method
,
=
link_to
status
.
action_path
,
method:
status
.
action_method
,
title:
"
#{
subject
.
name
}
:
#{
status
.
action_title
}
"
,
class:
'ci-action-icon-container'
do
title:
tooltip_title
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
%i
.ci-action-icon-wrapper
=
icon
(
status
.
action_icon
,
class:
status
.
action_class
)
=
icon
(
status
.
action_icon
,
class:
status
.
action_class
)
spec/features/projects/pipelines/pipeline_spec.rb
View file @
4ae28cb3
...
@@ -39,62 +39,87 @@ describe "Pipelines", feature: true, js: true do
...
@@ -39,62 +39,87 @@ describe "Pipelines", feature: true, js: true do
end
end
context
'pipeline graph'
do
context
'pipeline graph'
do
it
'shows a running icon and a cancel action for the running build'
do
context
'running build'
do
title
=
"
#{
@running
.
name
}
-
#{
@running
.
status
}
"
it
'shows a running icon and a cancel action for the running build'
do
page
.
within
(
'a[data-title="deploy - running"]'
)
do
page
.
within
(
"a[data-title='
#{
title
}
']"
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
expect
(
page
).
to
have_content
(
'deploy'
)
expect
(
page
).
to
have_content
(
'deploy'
)
end
page
.
within
(
'a[data-title="deploy - running"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-ban'
)
end
end
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
it
'should be possible to cancel the running build'
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-ban'
)
find
(
'a[data-title="deploy - running"] + .ci-action-icon-container'
).
trigger
(
'click'
)
end
expect
(
page
).
not_to
have_content
(
'Cancel running'
)
end
end
end
it
'shows the success icon and a retry action for the successfull build'
do
context
'success build'
do
title
=
"
#{
@success
.
name
}
-
#{
@success
.
status
}
"
it
'shows the success icon and a retry action for the successfull build'
do
page
.
within
(
'a[data-title="build - passed"]'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success'
)
expect
(
page
).
to
have_content
(
'build'
)
end
page
.
within
(
"a[data-title='
#{
title
}
']"
)
do
page
.
within
(
'a[data-title="build - passed"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success
'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh
'
)
e
xpect
(
page
).
to
have_content
(
'build'
)
e
nd
end
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
it
'should be possible to retry the success build'
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
find
(
'a[data-title="build - passed"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Retry build'
)
end
end
end
end
it
'shows the failed icon and a retry action for the failed build'
do
context
'failed build'
do
title
=
"
#{
@failed
.
name
}
-
#{
@failed
.
status
}
"
it
'shows the failed icon and a retry action for the failed build'
do
page
.
within
(
'a[data-title="test - failed"]'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-failed'
)
expect
(
page
).
to
have_content
(
'test'
)
end
page
.
within
(
"a[data-title='
#{
title
}
']"
)
do
page
.
within
(
'a[data-title="test - failed"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-failed
'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh
'
)
e
xpect
(
page
).
to
have_content
(
'test'
)
e
nd
end
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
it
'should be possible to retry the failed build'
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
find
(
'a[data-title="test - failed"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Retry build'
)
end
end
end
end
it
'shows the skipped icon and a play action for the manual build'
do
context
'manual build'
do
title
=
"
#{
@manual
.
name
}
-
#{
@manual
.
status
}
"
it
'shows the skipped icon and a play action for the manual build'
do
page
.
within
(
'a[data-title="manual build - manual play action"]'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-skipped'
)
expect
(
page
).
to
have_content
(
'manual'
)
end
page
.
within
(
"a[data-title='
#{
title
}
']"
)
do
page
.
within
(
'a[data-title="manual build - manual play action"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-skipped
'
)
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-play
'
)
e
xpect
(
page
).
to
have_content
(
'manual'
)
e
nd
end
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
it
'should be possible to play the manual build'
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-play'
)
find
(
'a[data-title="manual build - manual play action"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Play build'
)
end
end
end
end
it
'shows the success icon and the generic comit status build'
do
context
'external build'
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success'
)
it
'shows the success icon and the generic comit status build'
do
expect
(
page
).
to
have_content
(
'jenkins'
)
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success'
)
expect
(
page
).
to
have_content
(
'jenkins'
)
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