Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
dd80b629
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,发现更多精彩内容 >>
提交
dd80b629
编写于
6月 07, 2017
作者:
D
Douwe Maan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'improve-form-spec' into 'master'
Improve form spec See merge request !11879
上级
b845cfe8
8f64a5a8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
30 deletion
+11
-30
spec/features/issues/form_spec.rb
spec/features/issues/form_spec.rb
+11
-30
未找到文件。
spec/features/issues/form_spec.rb
浏览文件 @
dd80b629
...
...
@@ -24,37 +24,17 @@ describe 'New/edit issue', :feature, :js do
visit
new_namespace_project_issue_path
(
project
.
namespace
,
project
)
end
describe
'shorten users API pagination limit'
do
describe
'shorten users API pagination limit
(CE)
'
do
before
do
# Using `allow_any_instance_of`/`and_wrap_original`, `original` would
# somehow refer to the very block we defined to _wrap_ that method, instead of
# the original method, resulting in infinite recurison when called.
# This is likely a bug with helper modules included into dynamically generated view classes.
# To work around this, we have to hold on to and call to the original implementation manually.
original_issue_dropdown_options
=
FormHelper
.
instance_method
(
:issue_dropdown_options
)
allow_any_instance_of
(
FormHelper
).
to
receive
(
:issue_dropdown_options
).
and_wrap_original
do
|
original
,
*
args
|
has_multiple_assignees
=
*
args
[
1
]
options
=
{
toggle_class:
'js-user-search js-assignee-search js-multiselect js-save-user-data'
,
title:
'Select assignee'
,
filter:
true
,
dropdown_class:
'dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee'
,
placeholder:
'Search users'
,
data:
{
per_page:
1
,
null_user:
true
,
current_user:
true
,
project_id:
project
.
try
(
:id
),
field_name:
"issue[assignee_ids][]"
,
default_label:
'Assignee'
,
'max-select'
:
1
,
'dropdown-header'
:
'Assignee'
,
multi_select:
true
,
'input-meta'
:
'name'
,
'always-show-selectbox'
:
true
}
}
if
has_multiple_assignees
options
[
:title
]
=
'Select assignee(s)'
options
[
:data
][
:'dropdown-header'
]
=
'Assignee(s)'
options
[
:data
].
delete
(
:'max-select'
)
end
options
=
original_issue_dropdown_options
.
bind
(
original
.
receiver
).
call
(
*
args
)
options
[
:data
][
:per_page
]
=
2
options
end
...
...
@@ -74,6 +54,7 @@ describe 'New/edit issue', :feature, :js do
click_link
user2
.
name
end
find
(
'.js-assignee-search'
).
click
find
(
'.js-dropdown-input-clear'
).
click
page
.
within
'.dropdown-menu-user'
do
...
...
@@ -83,7 +64,7 @@ describe 'New/edit issue', :feature, :js do
end
end
describe
'single assignee'
do
describe
'single assignee
(CE)
'
do
before
do
click_button
'Unassigned'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录