Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
deefcb19
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,发现更多精彩内容 >>
提交
deefcb19
编写于
1月 21, 2017
作者:
M
Mike Greiling
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update tests to correspond with new behavior
上级
d07acd42
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
29 deletion
+29
-29
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
...features/issues/filtered_search/dropdown_assignee_spec.rb
+4
-4
spec/features/issues/filtered_search/dropdown_author_spec.rb
spec/features/issues/filtered_search/dropdown_author_spec.rb
+2
-2
spec/features/issues/filtered_search/dropdown_label_spec.rb
spec/features/issues/filtered_search/dropdown_label_spec.rb
+8
-8
spec/features/issues/filtered_search/dropdown_milestone_spec.rb
...eatures/issues/filtered_search/dropdown_milestone_spec.rb
+9
-9
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+3
-3
spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js.es6
...tered_search/filtered_search_dropdown_manager_spec.js.es6
+3
-3
未找到文件。
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
浏览文件 @
deefcb19
...
@@ -134,14 +134,14 @@ describe 'Dropdown assignee', js: true, feature: true do
...
@@ -134,14 +134,14 @@ describe 'Dropdown assignee', js: true, feature: true do
click_button
'Assigned to me'
click_button
'Assigned to me'
end
end
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:
#{
user
.
to_reference
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:
#{
user
.
to_reference
}
"
)
end
end
it
'fills in the assignee username when the assignee has not been filtered'
do
it
'fills in the assignee username when the assignee has not been filtered'
do
click_assignee
(
user_jacob
.
name
)
click_assignee
(
user_jacob
.
name
)
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:@
#{
user_jacob
.
username
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:@
#{
user_jacob
.
username
}
"
)
end
end
it
'fills in the assignee username when the assignee has been filtered'
do
it
'fills in the assignee username when the assignee has been filtered'
do
...
@@ -149,14 +149,14 @@ describe 'Dropdown assignee', js: true, feature: true do
...
@@ -149,14 +149,14 @@ describe 'Dropdown assignee', js: true, feature: true do
click_assignee
(
user
.
name
)
click_assignee
(
user
.
name
)
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:@
#{
user
.
username
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:@
#{
user
.
username
}
"
)
end
end
it
'selects `no assignee`'
do
it
'selects `no assignee`'
do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'No Assignee'
).
click
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'No Assignee'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:none"
)
expect
(
filtered_search
.
value
).
to
eq
(
"assignee:none
"
)
end
end
end
end
...
...
spec/features/issues/filtered_search/dropdown_author_spec.rb
浏览文件 @
deefcb19
...
@@ -121,14 +121,14 @@ describe 'Dropdown author', js: true, feature: true do
...
@@ -121,14 +121,14 @@ describe 'Dropdown author', js: true, feature: true do
click_author
(
user_jacob
.
name
)
click_author
(
user_jacob
.
name
)
expect
(
page
).
to
have_css
(
js_dropdown_author
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_author
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user_jacob
.
username
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user_jacob
.
username
}
"
)
end
end
it
'fills in the author username when the author has been filtered'
do
it
'fills in the author username when the author has been filtered'
do
click_author
(
user
.
name
)
click_author
(
user
.
name
)
expect
(
page
).
to
have_css
(
js_dropdown_author
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_author
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user
.
username
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user
.
username
}
"
)
end
end
end
end
...
...
spec/features/issues/filtered_search/dropdown_label_spec.rb
浏览文件 @
deefcb19
...
@@ -159,7 +159,7 @@ describe 'Dropdown label', js: true, feature: true do
...
@@ -159,7 +159,7 @@ describe 'Dropdown label', js: true, feature: true do
click_label
(
bug_label
.
title
)
click_label
(
bug_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
bug_label
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
bug_label
.
title
}
"
)
end
end
it
'fills in the label name when the label is partially filled'
do
it
'fills in the label name when the label is partially filled'
do
...
@@ -167,49 +167,49 @@ describe 'Dropdown label', js: true, feature: true do
...
@@ -167,49 +167,49 @@ describe 'Dropdown label', js: true, feature: true do
click_label
(
bug_label
.
title
)
click_label
(
bug_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
bug_label
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
bug_label
.
title
}
"
)
end
end
it
'fills in the label name that contains multiple words'
do
it
'fills in the label name that contains multiple words'
do
click_label
(
two_words_label
.
title
)
click_label
(
two_words_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
\"
#{
two_words_label
.
title
}
\"
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
\"
#{
two_words_label
.
title
}
\"
"
)
end
end
it
'fills in the label name that contains multiple words and is very long'
do
it
'fills in the label name that contains multiple words and is very long'
do
click_label
(
long_label
.
title
)
click_label
(
long_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
\"
#{
long_label
.
title
}
\"
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
\"
#{
long_label
.
title
}
\"
"
)
end
end
it
'fills in the label name that contains double quotes'
do
it
'fills in the label name that contains double quotes'
do
click_label
(
wont_fix_label
.
title
)
click_label
(
wont_fix_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~'
#{
wont_fix_label
.
title
}
'"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~'
#{
wont_fix_label
.
title
}
'
"
)
end
end
it
'fills in the label name with the correct capitalization'
do
it
'fills in the label name with the correct capitalization'
do
click_label
(
uppercase_label
.
title
)
click_label
(
uppercase_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
uppercase_label
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
uppercase_label
.
title
}
"
)
end
end
it
'fills in the label name with special characters'
do
it
'fills in the label name with special characters'
do
click_label
(
special_label
.
title
)
click_label
(
special_label
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
special_label
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
special_label
.
title
}
"
)
end
end
it
'selects `no label`'
do
it
'selects `no label`'
do
find
(
'#js-dropdown-label .filter-dropdown-item'
,
text:
'No Label'
).
click
find
(
'#js-dropdown-label .filter-dropdown-item'
,
text:
'No Label'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_label
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:none"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:none
"
)
end
end
end
end
...
...
spec/features/issues/filtered_search/dropdown_milestone_spec.rb
浏览文件 @
deefcb19
...
@@ -127,7 +127,7 @@ describe 'Dropdown milestone', js: true, feature: true do
...
@@ -127,7 +127,7 @@ describe 'Dropdown milestone', js: true, feature: true do
click_milestone
(
milestone
.
title
)
click_milestone
(
milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
milestone
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
milestone
.
title
}
"
)
end
end
it
'fills in the milestone name when the milestone is partially filled'
do
it
'fills in the milestone name when the milestone is partially filled'
do
...
@@ -135,56 +135,56 @@ describe 'Dropdown milestone', js: true, feature: true do
...
@@ -135,56 +135,56 @@ describe 'Dropdown milestone', js: true, feature: true do
click_milestone
(
milestone
.
title
)
click_milestone
(
milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
milestone
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
milestone
.
title
}
"
)
end
end
it
'fills in the milestone name that contains multiple words'
do
it
'fills in the milestone name that contains multiple words'
do
click_milestone
(
two_words_milestone
.
title
)
click_milestone
(
two_words_milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
\"
#{
two_words_milestone
.
title
}
\"
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
\"
#{
two_words_milestone
.
title
}
\"
"
)
end
end
it
'fills in the milestone name that contains multiple words and is very long'
do
it
'fills in the milestone name that contains multiple words and is very long'
do
click_milestone
(
long_milestone
.
title
)
click_milestone
(
long_milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
\"
#{
long_milestone
.
title
}
\"
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
\"
#{
long_milestone
.
title
}
\"
"
)
end
end
it
'fills in the milestone name that contains double quotes'
do
it
'fills in the milestone name that contains double quotes'
do
click_milestone
(
wont_fix_milestone
.
title
)
click_milestone
(
wont_fix_milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%'
#{
wont_fix_milestone
.
title
}
'"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%'
#{
wont_fix_milestone
.
title
}
'
"
)
end
end
it
'fills in the milestone name with the correct capitalization'
do
it
'fills in the milestone name with the correct capitalization'
do
click_milestone
(
uppercase_milestone
.
title
)
click_milestone
(
uppercase_milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
uppercase_milestone
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
uppercase_milestone
.
title
}
"
)
end
end
it
'fills in the milestone name with special characters'
do
it
'fills in the milestone name with special characters'
do
click_milestone
(
special_milestone
.
title
)
click_milestone
(
special_milestone
.
title
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
special_milestone
.
title
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:%
#{
special_milestone
.
title
}
"
)
end
end
it
'selects `no milestone`'
do
it
'selects `no milestone`'
do
click_static_milestone
(
'No Milestone'
)
click_static_milestone
(
'No Milestone'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:none"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:none
"
)
end
end
it
'selects `upcoming milestone`'
do
it
'selects `upcoming milestone`'
do
click_static_milestone
(
'Upcoming'
)
click_static_milestone
(
'Upcoming'
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
page
).
to
have_css
(
js_dropdown_milestone
,
visible:
false
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:upcoming"
)
expect
(
filtered_search
.
value
).
to
eq
(
"milestone:upcoming
"
)
end
end
end
end
...
...
spec/features/issues/filtered_search/filter_issues_spec.rb
浏览文件 @
deefcb19
...
@@ -539,7 +539,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -539,7 +539,7 @@ describe 'Filter issues', js: true, feature: true do
click_button
user2
.
username
click_button
user2
.
username
end
end
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user2
.
username
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user2
.
username
}
"
)
end
end
it
'changes label'
do
it
'changes label'
do
...
@@ -551,7 +551,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -551,7 +551,7 @@ describe 'Filter issues', js: true, feature: true do
click_button
label
.
name
click_button
label
.
name
end
end
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user
.
username
}
label:~
#{
label
.
name
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"author:@
#{
user
.
username
}
label:~
#{
label
.
name
}
"
)
end
end
it
'changes label correctly space is in previous label'
do
it
'changes label correctly space is in previous label'
do
...
@@ -563,7 +563,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -563,7 +563,7 @@ describe 'Filter issues', js: true, feature: true do
click_button
label
.
name
click_button
label
.
name
end
end
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
label
.
name
}
"
)
expect
(
filtered_search
.
value
).
to
eq
(
"label:~
#{
label
.
name
}
"
)
end
end
end
end
...
...
spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js.es6
浏览文件 @
deefcb19
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
it('should add tokenName and tokenValue', () => {
it('should add tokenName and tokenValue', () => {
gl.FilteredSearchDropdownManager.addWordToInput('label', 'none');
gl.FilteredSearchDropdownManager.addWordToInput('label', 'none');
expect(getInputValue()).toBe('label:none');
expect(getInputValue()).toBe('label:none
');
});
});
});
});
...
@@ -45,13 +45,13 @@
...
@@ -45,13 +45,13 @@
it('should replace tokenValue', () => {
it('should replace tokenValue', () => {
setInputValue('author:roo');
setInputValue('author:roo');
gl.FilteredSearchDropdownManager.addWordToInput('author', '@root');
gl.FilteredSearchDropdownManager.addWordToInput('author', '@root');
expect(getInputValue()).toBe('author:@root');
expect(getInputValue()).toBe('author:@root
');
});
});
it('should add tokenValues containing spaces', () => {
it('should add tokenValues containing spaces', () => {
setInputValue('label:~"test');
setInputValue('label:~"test');
gl.FilteredSearchDropdownManager.addWordToInput('label', '~\'"test me"\'');
gl.FilteredSearchDropdownManager.addWordToInput('label', '~\'"test me"\'');
expect(getInputValue()).toBe('label:~\'"test me"\'');
expect(getInputValue()).toBe('label:~\'"test me"\'
');
});
});
});
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录