Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e42de89a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e42de89a
编写于
12月 15, 2016
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changes after review
Changes after review Fix tooltip title Remove unneeded string interpolation
上级
23f4d182
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
62 addition
and
68 deletion
+62
-68
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+1
-9
app/views/ci/status/_graph_badge.html.haml
app/views/ci/status/_graph_badge.html.haml
+2
-2
app/views/projects/ci/builds/_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+0
-13
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+0
-10
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+59
-34
未找到文件。
app/assets/stylesheets/pages/pipelines.scss
浏览文件 @
e42de89a
...
...
@@ -645,14 +645,6 @@
margin-bottom
:
0
;
line-height
:
1
.2
;
}
li
:first-child
{
padding-top
:
6px
;
}
li
:last-child
{
padding-bottom
:
6px
;
}
}
.dropdown-build
{
...
...
@@ -741,4 +733,4 @@
.ci-play-icon
{
padding
:
5px
5px
5px
7px
;
}
}
\ No newline at end of file
}
app/views/ci/status/_graph_badge.html.haml
浏览文件 @
e42de89a
...
...
@@ -5,7 +5,7 @@
-
klass
=
"ci-status-icon ci-status-icon-
#{
status
}
"
-
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:
"
#{
subject
.
name
}
-
#{
status
.
label
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
.ci-status-text
=
subject
.
name
-
else
...
...
@@ -14,6 +14,6 @@
-
if
status
.
has_action?
=
link_to
status
.
action_path
,
method:
status
.
action_method
,
title:
"
#{
subject
.
name
}
:
#{
status
.
action_title
}
"
,
class:
'ci-action-icon-container'
do
title:
status
.
action_title
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
status
.
action_icon
,
class:
status
.
action_class
)
app/views/projects/ci/builds/_build_pipeline.html.haml
已删除
100644 → 0
浏览文件 @
23f4d182
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
- play"
,
container:
'.js-pipeline-graph'
,
placement:
'bottom'
}
do
=
ci_icon_for_status
(
'play'
)
.ci-status-text
=
subject
.
name
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
),
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
subject
.
status
}
"
,
container:
'.js-pipeline-graph'
,
placement:
'bottom'
}
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
已删除
100644 → 0
浏览文件 @
23f4d182
%a
{
data:
{
toggle:
'tooltip'
,
title:
"#{subject.name} - #{subject.status}"
,
container:
'.js-pipeline-graph'
,
placement:
'bottom'
}
}
-
if
subject
.
target_url
=
link_to
subject
.
target_url
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
spec/features/projects/pipelines/pipeline_spec.rb
浏览文件 @
e42de89a
...
...
@@ -38,63 +38,88 @@ describe "Pipelines", feature: true, js: true do
expect
(
page
).
to
have_css
(
'#js-tab-pipeline.active'
)
end
context
'pipeline graph'
do
it
'shows a running icon and a cancel action for the running build'
do
title
=
"
#{
@running
.
name
}
-
#{
@running
.
status
}
"
page
.
within
(
"a[data-title='
#{
title
}
']"
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
expect
(
page
).
to
have_content
(
'deploy'
)
describe
'pipeline graph'
do
context
'when pipeline has running builds'
do
it
'shows a running icon and a cancel action for the running build'
do
page
.
within
(
'a[data-title="deploy - running"]'
)
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-running'
)
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
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-ban'
)
end
it
'should be possible to cancel the running build'
do
find
(
'a[data-title="deploy - running"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Cancel running'
)
end
end
it
'shows the success icon and a retry action for the successfull build'
do
title
=
"
#{
@success
.
name
}
-
#{
@success
.
status
}
"
context
'when pipeline has successful builds'
do
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
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success
'
)
e
xpect
(
page
).
to
have_content
(
'build'
)
page
.
within
(
'a[data-title="build - passed"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh
'
)
e
nd
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
it
'should be possible to retry the success build'
do
find
(
'a[data-title="build - passed"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Retry build'
)
end
end
it
'shows the failed icon and a retry action for the failed build'
do
title
=
"
#{
@failed
.
name
}
-
#{
@failed
.
status
}
"
context
'when pipeline has failed builds'
do
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
expect
(
page
).
to
have_selector
(
'.ci-status-icon-failed
'
)
e
xpect
(
page
).
to
have_content
(
'test'
)
page
.
within
(
'a[data-title="test - failed"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh
'
)
e
nd
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-refresh'
)
it
'should be possible to retry the failed build'
do
find
(
'a[data-title="test - failed"] + .ci-action-icon-container'
).
trigger
(
'click'
)
expect
(
page
).
not_to
have_content
(
'Retry build'
)
end
end
it
'shows the skipped icon and a play action for the manual build'
do
title
=
"
#{
@manual
.
name
}
-
#{
@manual
.
status
}
"
context
'when pipeline has manual builds'
do
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
expect
(
page
).
to
have_selector
(
'.ci-status-icon-skipped
'
)
e
xpect
(
page
).
to
have_content
(
'manual'
)
page
.
within
(
'a[data-title="manual build - manual play action"] + .ci-action-icon-container'
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-play
'
)
e
nd
end
page
.
within
(
"a[data-title='
#{
title
}
'] + .ci-action-icon-container"
)
do
expect
(
page
).
to
have_selector
(
'.ci-action-icon-container .fa-play'
)
it
'should be possible to play the manual build'
do
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
it
'shows the success icon and the generic comit status build'
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success'
)
expect
(
page
).
to
have_content
(
'jenkins'
)
context
'when pipeline has external build'
do
it
'shows the success icon and the generic comit status build'
do
expect
(
page
).
to
have_selector
(
'.ci-status-icon-success'
)
expect
(
page
).
to
have_content
(
'jenkins'
)
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录