Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
363fa597
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,发现更多精彩内容 >>
提交
363fa597
编写于
6月 14, 2016
作者:
A
Alfredo Sumaran
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update tests to make it work with Turbolinks approach
上级
fef47d23
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
20 deletion
+23
-20
spec/features/issues/filter_by_labels_spec.rb
spec/features/issues/filter_by_labels_spec.rb
+10
-10
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+13
-10
未找到文件。
spec/features/issues/filter_by_labels_spec.rb
浏览文件 @
363fa597
...
...
@@ -56,8 +56,9 @@ feature 'Issue filtering by Labels', feature: true do
end
it
'should remove label "bug"'
do
first
(
'.js-label-filter-remove'
).
click
expect
(
find
(
'.filtered-labels'
)).
to
have_no_content
"bug"
find
(
'.js-label-filter-remove'
).
click
wait_for_ajax
expect
(
find
(
'.filtered-labels'
,
visible:
false
)).
to
have_no_content
"bug"
end
end
...
...
@@ -142,7 +143,8 @@ feature 'Issue filtering by Labels', feature: true do
end
it
'should remove label "enhancement"'
do
first
(
'.js-label-filter-remove'
).
click
find
(
'.js-label-filter-remove'
,
match: :first
).
click
wait_for_ajax
expect
(
find
(
'.filtered-labels'
)).
to
have_no_content
"enhancement"
end
end
...
...
@@ -179,6 +181,7 @@ feature 'Issue filtering by Labels', feature: true do
before
do
page
.
within
'.labels-filter'
do
click_button
'Label'
wait_for_ajax
click_link
'bug'
find
(
'.dropdown-menu-close'
).
click
end
...
...
@@ -189,14 +192,11 @@ feature 'Issue filtering by Labels', feature: true do
end
it
'should allow user to remove filtered labels'
do
page
.
within
'.filtered-labels'
do
first
(
'.js-label-filter-remove'
).
click
expect
(
page
).
not_to
have_content
'bug'
end
first
(
'.js-label-filter-remove'
).
click
wait_for_ajax
page
.
within
'.labels-filter'
do
expect
(
page
).
not_to
have_content
'bug'
end
expect
(
find
(
'.filtered-labels'
,
visible:
false
)).
not_to
have_content
'bug'
expect
(
find
(
'.labels-filter'
)).
not_to
have_content
'bug'
end
end
...
...
spec/features/issues/filter_issues_spec.rb
浏览文件 @
363fa597
require
'rails_helper'
describe
'Filter issues'
,
feature:
true
do
include
WaitForAjax
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:user
)
{
create
(
:user
)}
...
...
@@ -21,7 +22,7 @@ describe 'Filter issues', feature: true do
find
(
'.dropdown-menu-user-link'
,
text:
user
.
username
).
click
sleep
2
wait_for_ajax
end
context
'assignee'
,
js:
true
do
...
...
@@ -53,7 +54,7 @@ describe 'Filter issues', feature: true do
find
(
'.milestone-filter .dropdown-content a'
,
text:
milestone
.
title
).
click
sleep
2
wait_for_ajax
end
context
'milestone'
,
js:
true
do
...
...
@@ -80,23 +81,21 @@ describe 'Filter issues', feature: true do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'.js-label-select'
).
click
wait_for_ajax
end
it
'should filter by any label'
do
find
(
'.dropdown-menu-labels a'
,
text:
'Any Label'
).
click
page
.
first
(
'.labels-filter .dropdown-title .dropdown-menu-close-icon'
).
click
sleep
2
wait_for_ajax
page
.
within
'.labels-filter'
do
expect
(
page
).
to
have_content
'Any Label'
end
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
'Any Label'
)
expect
(
find
(
'.labels-filter'
)).
to
have_content
'Label'
end
it
'should filter by no label'
do
find
(
'.dropdown-menu-labels a'
,
text:
'No Label'
).
click
page
.
first
(
'.labels-filter .dropdown-title .dropdown-menu-close-icon'
).
click
sleep
2
wait_for_ajax
page
.
within
'.labels-filter'
do
expect
(
page
).
to
have_content
'No Label'
...
...
@@ -122,14 +121,14 @@ describe 'Filter issues', feature: true do
find
(
'.dropdown-menu-user-link'
,
text:
user
.
username
).
click
sleep
2
wait_for_ajax
find
(
'.js-label-select'
).
click
find
(
'.dropdown-menu-labels .dropdown-content a'
,
text:
label
.
title
).
click
page
.
first
(
'.labels-filter .dropdown-title .dropdown-menu-close-icon'
).
click
sleep
2
wait_for_ajax
end
context
'assignee and label'
,
js:
true
do
...
...
@@ -276,9 +275,12 @@ describe 'Filter issues', feature: true do
it
'should be able to filter and sort issues'
do
click_button
'Label'
wait_for_ajax
page
.
within
'.labels-filter'
do
click_link
'bug'
end
find
(
'.dropdown-menu-close-icon'
).
click
wait_for_ajax
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
...
...
@@ -288,6 +290,7 @@ describe 'Filter issues', feature: true do
page
.
within
'.dropdown-menu-sort'
do
click_link
'Oldest created'
end
wait_for_ajax
page
.
within
'.issues-list'
do
expect
(
first
(
'.issue'
)).
to
have_content
(
'Frontend'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录