Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0f474887
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,发现更多精彩内容 >>
未验证
提交
0f474887
编写于
7月 31, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Project labels tests
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
3ed2fce2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
4 deletion
+67
-4
app/views/projects/labels/_label.html.haml
app/views/projects/labels/_label.html.haml
+1
-1
features/project/issues/labels.feature
features/project/issues/labels.feature
+16
-1
features/steps/project/labels.rb
features/steps/project/labels.rb
+46
-2
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
未找到文件。
app/views/projects/labels/_label.html.haml
浏览文件 @
0f474887
%li
%li
{
id:
dom_id
(
label
)}
=
render_colored_label
(
label
)
.pull-right
%strong
.append-right-20
...
...
features/project/issues/labels.feature
浏览文件 @
0f474887
...
...
@@ -5,6 +5,21 @@ Feature: Project Labels
And project "Shop" has labels
:
"bug",
"feature",
"enhancement"
Given
I visit project
"Shop"
labels page
Scenario
:
I
should see
active milestones
Scenario
:
I
should see
labels list
Then
I should see label
"bug"
And
I should see label
"feature"
Scenario
:
I
create new label
Given
I visit new label page
When
I submit new label 'support'
Then
I should see label 'support'
Scenario
:
I
edit label
Given
I visit 'bug' label edit page
When
I change label 'bug' to 'fix'
Then
I should not see label 'bug'
Then
I should see label 'fix'
Scenario
:
I
remove label
When
I remove label 'bug'
Then
I should not see label 'bug'
features/steps/project/labels.rb
浏览文件 @
0f474887
...
...
@@ -3,15 +3,59 @@ class ProjectLabels < Spinach::FeatureSteps
include
SharedProject
include
SharedPaths
Then
'I should see label "bug"'
do
step
'I should see label "bug"'
do
within
".manage-labels-list"
do
page
.
should
have_content
"bug"
end
end
And
'I should see label "feature"'
do
step
'I should see label "feature"'
do
within
".manage-labels-list"
do
page
.
should
have_content
"feature"
end
end
step
'I visit \'bug\' label edit page'
do
visit
edit_project_label_path
(
project
,
bug_label
)
end
step
'I remove label \'bug\''
do
within
"#label_
#{
bug_label
.
id
}
"
do
click_link
'Remove'
end
end
step
'I submit new label \'support\''
do
fill_in
'Title'
,
with:
'support'
fill_in
'Background Color'
,
with:
'#F95610'
click_button
'Save'
end
step
'I should not see label \'bug\''
do
within
'.manage-labels-list'
do
page
.
should_not
have_content
'bug'
end
end
step
'I should see label \'support\''
do
within
'.manage-labels-list'
do
page
.
should
have_content
'support'
end
end
step
'I change label \'bug\' to \'fix\''
do
fill_in
'Title'
,
with:
'fix'
fill_in
'Background Color'
,
with:
'#F15610'
click_button
'Save'
end
step
'I should see label \'fix\''
do
within
'.manage-labels-list'
do
page
.
should
have_content
'fix'
end
end
def
bug_label
project
.
labels
.
find_or_create_by
(
title:
'bug'
)
end
end
features/steps/shared/paths.rb
浏览文件 @
0f474887
...
...
@@ -289,6 +289,10 @@ module SharedPaths
visit
project_labels_path
(
project
)
end
step
'I visit new label page'
do
visit
new_project_label_path
(
project
)
end
step
'I visit merge request page "Bug NS-04"'
do
mr
=
MergeRequest
.
find_by
(
title:
"Bug NS-04"
)
visit
project_merge_request_path
(
mr
.
target_project
,
mr
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录