Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7459b779
Commit
7459b779
authored
Jan 04, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add author token filtering support
Add ability to filter test cases with author username.
parent
8467c199
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
ee/app/assets/javascripts/test_case_list/components/test_case_list_root.vue
...scripts/test_case_list/components/test_case_list_root.vue
+13
-0
ee/app/assets/javascripts/test_case_list/queries/project_test_cases.query.graphql
...s/test_case_list/queries/project_test_cases.query.graphql
+2
-0
ee/changelogs/unreleased/292721-test-case-author-filtering.yml
...angelogs/unreleased/292721-test-case-author-filtering.yml
+5
-0
ee/spec/features/projects/quality/test_case_list_spec.rb
ee/spec/features/projects/quality/test_case_list_spec.rb
+10
-0
No files found.
ee/app/assets/javascripts/test_case_list/components/test_case_list_root.vue
View file @
7459b779
<
script
>
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
Api
from
'
~/api
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -8,6 +9,7 @@ import { urlParamsToObject } from '~/lib/utils/common_utils';
import
{
updateHistory
,
setUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
IssuableList
from
'
~/issuable_list/components/issuable_list_root.vue
'
;
import
AuthorToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/author_token.vue
'
;
import
LabelToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/label_token.vue
'
;
import
TestCaseListEmptyState
from
'
./test_case_list_empty_state.vue
'
;
...
...
@@ -215,6 +217,17 @@ export default {
},
getFilteredSearchTokens
()
{
return
[
{
type
:
'
author_username
'
,
icon
:
'
user
'
,
title
:
__
(
'
Author
'
),
unique
:
true
,
symbol
:
'
@
'
,
token
:
AuthorToken
,
operators
:
[{
value
:
'
=
'
,
description
:
__
(
'
is
'
),
default
:
'
true
'
}],
fetchPath
:
this
.
projectFullPath
,
fetchAuthors
:
Api
.
projectUsers
.
bind
(
Api
),
},
{
type
:
'
label_name
'
,
icon
:
'
labels
'
,
...
...
ee/app/assets/javascripts/test_case_list/queries/project_test_cases.query.graphql
View file @
7459b779
...
...
@@ -6,6 +6,7 @@ query projectIssues(
$projectPath
:
ID
!
$types
:
[
IssueType
!]
$state
:
IssuableState
$authorUsername
:
String
=
""
$labelName
:
[
String
]
$search
:
String
=
""
$sortBy
:
IssueSort
=
created_desc
...
...
@@ -19,6 +20,7 @@ query projectIssues(
issues
(
types
:
$types
state
:
$state
authorUsername
:
$authorUsername
labelName
:
$labelName
search
:
$search
sort
:
$sortBy
...
...
ee/changelogs/unreleased/292721-test-case-author-filtering.yml
0 → 100644
View file @
7459b779
---
title
:
Add author token filtering support for Test Cases
merge_request
:
50747
author
:
type
:
added
ee/spec/features/projects/quality/test_case_list_spec.rb
View file @
7459b779
...
...
@@ -55,6 +55,16 @@ RSpec.describe 'Test Cases', :js do
end
end
it
'shows filter tokens author and label'
do
page
.
within
(
'.vue-filtered-search-bar-container .gl-search-box-by-click'
)
do
page
.
find
(
'input'
).
click
expect
(
page
.
find
(
'.gl-filtered-search-suggestion-list'
)).
to
have_selector
(
'li'
,
count:
2
)
expect
(
page
.
find
(
'.gl-filtered-search-suggestion-list li:nth-child(1)'
)).
to
have_content
(
'Author'
)
expect
(
page
.
find
(
'.gl-filtered-search-suggestion-list li:nth-child(2)'
)).
to
have_content
(
'Label'
)
end
end
context
'open tab'
do
it
'shows list of all open test cases'
do
page
.
within
(
'.issuable-list-container .issuable-list'
)
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment