Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
617ba013
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 搜索 >>
提交
617ba013
编写于
12月 10, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix tests for new issuable sidebar
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
6117ae98
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
14 deletion
+30
-14
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+10
-7
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+20
-7
未找到文件。
app/views/shared/issuable/_sidebar.html.haml
浏览文件 @
617ba013
...
...
@@ -8,7 +8,7 @@
=
cross_project_reference
(
@project
,
issuable
)
=
clipboard_button
(
clipboard_target:
'span#cross-project-reference'
)
.block
.block
.assignee
.title
%label
Assignee:
...
...
@@ -19,12 +19,12 @@
-
if
issuable
.
assignee
%strong
=
link_to_member
(
@project
,
issuable
.
assignee
,
size:
24
)
-
else
n
one
N
one
.selectbox
=
users_select_tag
(
"
#{
issuable
.
class
.
table_name
.
singularize
}
[assignee_id]"
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
issuable
.
assignee_id
,
project:
@target_project
,
null_user:
true
,
current_user:
true
,
first_user:
true
)
.block
.block
.milestone
.title
%label
Milestone:
...
...
@@ -39,13 +39,13 @@
=
icon
(
'clock-o'
)
=
issuable
.
milestone
.
title
-
else
n
one
N
one
.selectbox
=
f
.
select
(
:milestone_id
,
milestone_options
(
issuable
),
{
include_blank:
true
},
{
class:
'select2 select2-compact js-select2 js-milestone'
,
data:
{
placeholder:
'Select milestone'
}})
=
hidden_field_tag
:issuable_context
=
f
.
submit
class:
'btn hide'
-
if
issuable
.
labels
.
any?
-
if
issuable
.
project
.
labels
.
any?
.block
.title
%label
Labels
...
...
@@ -53,8 +53,11 @@
.pull-right
=
link_to
'Edit'
,
'#'
,
class:
'edit-link'
.value.issuable-show-labels
-
issuable
.
labels
.
each
do
|
label
|
=
link_to_label
(
label
)
-
if
issuable
.
labels
.
any?
-
issuable
.
labels
.
each
do
|
label
|
=
link_to_label
(
label
)
-
else
None
.selectbox
=
f
.
collection_select
:label_ids
,
issuable
.
project
.
labels
.
all
,
:id
,
:name
,
{
selected:
issuable
.
label_ids
},
multiple:
true
,
class:
'select2 js-select2'
,
data:
{
placeholder:
"Select labels"
}
...
...
spec/features/issues_spec.rb
浏览文件 @
617ba013
...
...
@@ -69,7 +69,10 @@ describe 'Issues', feature: true do
click_button
'Save changes'
expect
(
page
).
to
have_content
'Assignee: none'
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
'None'
end
expect
(
issue
.
reload
.
assignee
).
to
be_nil
end
end
...
...
@@ -202,7 +205,7 @@ describe 'Issues', feature: true do
it
'with dropdown menu'
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
find
(
'.
context
#issue_assignee_id'
).
find
(
'.
issuable-sidebar
#issue_assignee_id'
).
set
project
.
team
.
members
.
first
.
id
click_button
'Update Issue'
...
...
@@ -241,12 +244,16 @@ describe 'Issues', feature: true do
it
'with dropdown menu'
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
find
(
'.
context
'
).
find
(
'.
issuable-sidebar
'
).
select
(
milestone
.
title
,
from:
'issue_milestone_id'
)
click_button
'Update Issue'
expect
(
page
).
to
have_content
"Milestone changed to
#{
milestone
.
title
}
"
expect
(
page
).
to
have_content
"Milestone:
#{
milestone
.
title
}
"
page
.
within
(
'.milestone'
)
do
expect
(
page
).
to
have_content
milestone
.
title
end
has_select?
(
'issue_assignee_id'
,
selected:
milestone
.
title
)
end
end
...
...
@@ -279,13 +286,19 @@ describe 'Issues', feature: true do
it
'allows user to remove assignee'
,
js:
true
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
expect
(
page
).
to
have_content
"Assignee:
#{
user2
.
name
}
"
first
(
'#s2id_issue_assignee_id'
).
click
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
user2
.
name
end
find
(
'.assignee .edit-link'
).
click
sleep
2
# wait for ajax stuff to complete
first
(
'.user-result'
).
click
expect
(
page
).
to
have_content
'Assignee: none'
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
'None'
end
sleep
2
# wait for ajax stuff to complete
expect
(
issue
.
reload
.
assignee
).
to
be_nil
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录