Commit 721c7cd1 authored by Phil Hughes's avatar Phil Hughes

Fixes reviewers filter being visible on issues page

parent df79193d
import { __ } from '~/locale'; import { __ } from '~/locale';
export default (IssuableTokenKeys, disableTargetBranchFilter = false) => { export default (IssuableTokenKeys, disableTargetBranchFilter = false) => {
const reviewerToken = {
formattedKey: __('Reviewer'),
key: 'reviewer',
type: 'string',
param: 'username',
symbol: '@',
icon: 'user',
tag: '@reviewer',
};
IssuableTokenKeys.tokenKeys.splice(2, 0, reviewerToken);
IssuableTokenKeys.tokenKeysWithAlternative.splice(2, 0, reviewerToken);
const draftToken = { const draftToken = {
token: { token: {
formattedKey: __('Draft'), formattedKey: __('Draft'),
......
...@@ -21,15 +21,6 @@ export const tokenKeys = [ ...@@ -21,15 +21,6 @@ export const tokenKeys = [
icon: 'user', icon: 'user',
tag: '@assignee', tag: '@assignee',
}, },
{
formattedKey: __('Reviewer'),
key: 'reviewer',
type: 'string',
param: 'username',
symbol: '@',
icon: 'user',
tag: '@reviewer',
},
{ {
formattedKey: __('Milestone'), formattedKey: __('Milestone'),
key: 'milestone', key: 'milestone',
......
...@@ -153,6 +153,14 @@ RSpec.describe 'Filter issues', :js do ...@@ -153,6 +153,14 @@ RSpec.describe 'Filter issues', :js do
end end
end end
describe 'filter by reviewer' do
it 'does not allow filtering by reviewer' do
find('.filtered-search').click
expect(page).to_not have_button('Reviewer')
end
end
describe 'filter issues by label' do describe 'filter issues by label' do
context 'only label' do context 'only label' do
it 'filters issues by searched label' do it 'filters issues by searched label' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment