Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
3a3f0bf4
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,体验更适合开发者的 AI 搜索 >>
提交
3a3f0bf4
编写于
4月 27, 2016
作者:
A
Annabel Dunstone
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change build icons into buttons; update tests
上级
fc20639c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
25 deletion
+22
-25
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+2
-1
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+0
-4
app/views/admin/builds/_build.html.haml
app/views/admin/builds/_build.html.haml
+3
-3
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+3
-3
features/project/merge_requests.feature
features/project/merge_requests.feature
+4
-4
features/steps/dashboard/todos.rb
features/steps/dashboard/todos.rb
+4
-4
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+5
-5
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+1
-1
未找到文件。
app/assets/stylesheets/framework/buttons.scss
浏览文件 @
3a3f0bf4
...
...
@@ -252,7 +252,8 @@
background
:
linear-gradient
(
180deg
,
$white-light
25%
,
$gray-light
100%
);
}
.btn-refresh
{
.btn-build
{
margin-left
:
10px
;
i
{
color
:
$gl-icon-color
;
}
...
...
app/assets/stylesheets/pages/builds.scss
浏览文件 @
3a3f0bf4
...
...
@@ -91,8 +91,4 @@ table.builds {
color
:
$gl-dark-link-color
;
}
}
.btn-refresh
{
margin-left
:
10px
;
}
}
app/views/admin/builds/_build.html.haml
浏览文件 @
3a3f0bf4
...
...
@@ -61,12 +61,12 @@
%td
.pull-right
-
if
can?
(
current_user
,
:read_build
,
project
)
&&
build
.
artifacts?
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
do
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
,
class:
'btn btn-build'
do
%i
.fa.fa-download
-
if
can?
(
current_user
,
:update_build
,
build
.
project
)
-
if
build
.
active?
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
do
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
,
class:
'btn btn-build'
do
%i
.fa.fa-remove.cred
-
elsif
defined?
(
allow_retry
)
&&
allow_retry
&&
build
.
retryable?
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
refresh
'
do
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
build
'
do
%i
.fa.fa-refresh
app/views/projects/ci/builds/_build.html.haml
浏览文件 @
3a3f0bf4
...
...
@@ -69,12 +69,12 @@
%td
.pull-right
-
if
can?
(
current_user
,
:read_build
,
build
)
&&
build
.
artifacts?
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
do
=
link_to
download_namespace_project_build_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
),
title:
'Download artifacts'
,
class:
'btn btn-build'
do
%i
.fa.fa-download
-
if
can?
(
current_user
,
:update_build
,
build
)
-
if
build
.
active?
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
do
=
link_to
cancel_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Cancel'
,
class:
'btn btn-build'
do
%i
.fa.fa-remove.cred
-
elsif
defined?
(
allow_retry
)
&&
allow_retry
&&
build
.
retryable?
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
refresh
'
do
=
link_to
retry_namespace_project_build_path
(
build
.
project
.
namespace
,
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Retry'
,
class:
'btn btn-
build
'
do
%i
.fa.fa-refresh
features/project/merge_requests.feature
浏览文件 @
3a3f0bf4
...
...
@@ -135,7 +135,7 @@ Feature: Project Merge Requests
And
I leave a comment like
"Line is wrong"
on diff
And
I switch to the merge request's comments tab
Then
I should see a discussion has started on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
@javascript
Scenario
:
I
see a new comment on merge request diff from another user in the discussion tab
...
...
@@ -143,7 +143,7 @@ Feature: Project Merge Requests
And
I visit merge request page
"Bug NS-05"
And
user
"John Doe"
leaves a comment like
"Line is wrong"
on diff
Then
I should see a discussion by user
"John Doe"
has started on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
@javascript
Scenario
:
I
edit a comment on a merge request diff
...
...
@@ -161,11 +161,11 @@ Feature: Project Merge Requests
And
I visit merge request page
"Bug NS-05"
And
I click on the Changes tab
And
I leave a comment like
"Line is wrong"
on diff
And
I should see a badge of
"
1
"
next to the discussion link
And
I should see a badge of
"
(1)
"
next to the discussion link
And
I delete the comment
"Line is wrong"
on diff
And
I click on the Discussion tab
Then
I should not see any discussion
And
I should see a badge of
"
0
"
next to the discussion link
And
I should see a badge of
"
(0)
"
next to the discussion link
@javascript
Scenario
:
I
comment on a line of a commit in merge request
...
...
features/steps/dashboard/todos.rb
浏览文件 @
3a3f0bf4
...
...
@@ -27,8 +27,8 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
step
'I should see todos assigned to me'
do
page
.
within
(
'.nav-sidebar'
)
{
expect
(
page
).
to
have_content
'Todos 4'
}
expect
(
page
).
to
have_content
'To do
4
'
expect
(
page
).
to
have_content
'Done
0
'
expect
(
page
).
to
have_content
'To do
(4)
'
expect
(
page
).
to
have_content
'Done
(0)
'
expect
(
page
).
to
have_link
project
.
name_with_namespace
should_see_todo
(
1
,
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
,
merge_request
.
title
)
...
...
@@ -43,8 +43,8 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
page
.
within
(
'.nav-sidebar'
)
{
expect
(
page
).
to
have_content
'Todos 3'
}
expect
(
page
).
to
have_content
'To do
3
'
expect
(
page
).
to
have_content
'Done
1
'
expect
(
page
).
to
have_content
'To do
(3)
'
expect
(
page
).
to
have_content
'Done
(1)
'
should_not_see_todo
"John Doe assigned you merge request
#{
merge_request
.
to_reference
}
"
end
...
...
features/steps/project/merge_requests.rb
浏览文件 @
3a3f0bf4
...
...
@@ -344,12 +344,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should see a badge of "
1
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
1
"
)
step
'I should see a badge of "
(1)
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
(1)
"
)
end
step
'I should see a badge of "
0
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
0
"
)
step
'I should see a badge of "
(0)
" next to the discussion link'
do
expect_discussion_badge_to_have_counter
(
"
(0)
"
)
end
step
'I should see a discussion has started on commit diff'
do
...
...
@@ -572,7 +572,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
def
expect_discussion_badge_to_have_counter
(
value
)
page
.
within
(
".notes-tab
.badge
"
)
do
page
.
within
(
".notes-tab
span
"
)
do
page
.
should
have_content
value
end
end
...
...
spec/features/notes_on_merge_requests_spec.rb
浏览文件 @
3a3f0bf4
...
...
@@ -151,7 +151,7 @@ describe 'Comments', feature: true do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
2
expect
(
find
(
'.notes-tab span
.badge'
).
text
).
to
eq
"1
"
expect
(
find
(
'.notes-tab span
'
).
text
).
to
eq
"(1)
"
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录