Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
35aca2d5
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 搜索 >>
提交
35aca2d5
编写于
3月 14, 2016
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed tests for MR & issue filters
上级
37ba5a12
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
20 deletion
+14
-20
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+3
-1
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
features/steps/dashboard/issues.rb
features/steps/dashboard/issues.rb
+3
-5
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+7
-13
未找到文件。
app/assets/javascripts/gl_dropdown.js.coffee
浏览文件 @
35aca2d5
...
...
@@ -238,13 +238,15 @@ class GitLabDropdown
selectedObject
=
@
renderedData
[
selectedIndex
]
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
if
!
value
?
field
.
remove
()
if
@
options
.
multiSelect
oldValue
=
field
.
val
()
if
oldValue
value
=
"
#{
oldValue
}
,
#{
value
}
"
else
@
dropdown
.
find
(
ACTIVE_CLASS
).
removeClass
ACTIVE_CLASS
field
.
remove
()
# Toggle active class for the tick mark
el
.
toggleClass
"is-active"
...
...
app/views/shared/issuable/_filter.html.haml
浏览文件 @
35aca2d5
...
...
@@ -15,7 +15,7 @@
.filter-item.inline
-
if
params
[
:assignee_id
]
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable"
,
=
dropdown_tag
(
"Assignee"
,
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable
dropdown-menu-assignee
"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Author"
,
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
@project
.
id
if
@project
),
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
}
})
.filter-item.inline.milestone-filter
...
...
features/steps/dashboard/issues.rb
浏览文件 @
35aca2d5
...
...
@@ -36,11 +36,9 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
step
'I click "Authored by me" link'
do
execute_script
(
'$("#assignee_id").val("")'
)
execute_script
(
'$(".js-user-search").first().click()'
)
sleep
1
execute_script
(
"$('.dropdown-content li:contains(
\"
#{
current_user
.
to_reference
}
\"
) a').click()"
)
sleep
1
find
(
"#assignee_id"
).
set
(
""
)
find
(
".js-author-search"
,
match: :first
).
click
find
(
".dropdown-menu-author li a"
,
match: :first
,
text:
current_user
.
to_reference
).
click
end
step
'I click "All" link'
do
...
...
features/steps/dashboard/merge_requests.rb
浏览文件 @
35aca2d5
...
...
@@ -40,22 +40,16 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end
step
'I click "Authored by me" link'
do
execute_script
(
'$("#assignee_id").val("")'
)
execute_script
(
'$(".js-user-search").first().click()'
)
sleep
0.5
execute_script
(
"$('.dropdown-content li:contains(
\"
#{
current_user
.
to_reference
}
\"
) a').click()"
)
sleep
2
find
(
"#assignee_id"
).
set
(
""
)
find
(
".js-author-search"
,
match: :first
).
click
find
(
".dropdown-menu-author li a"
,
match: :first
,
text:
current_user
.
to_reference
).
click
end
step
'I click "All" link'
do
execute_script
(
'$(".js-user-search").first().click()'
)
sleep
0.5
execute_script
(
'$(".js-user-search").first().parent().find("li a").first().click()'
)
sleep
2
execute_script
(
'$(".js-user-search").eq(1).click()'
)
sleep
0.5
execute_script
(
'$(".js-user-search").eq(1).parent().find("li a").first().click()'
)
sleep
2
find
(
".js-author-search"
).
click
find
(
".dropdown-menu-author li a"
,
match: :first
).
click
find
(
".js-assignee-search"
).
click
find
(
".dropdown-menu-assignee li a"
,
match: :first
).
click
end
def
should_see
(
merge_request
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录