Commit a4274e82 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'fix-filtered-search-group-runners-list-view' into 'master'

Fix bug in group Runners filtered search

See merge request gitlab-org/gitlab!37626
parents 68922862 ad2b0ee6
import { __ } from '~/locale';
import FilteredSearchTokenKeys from './filtered_search_token_keys';
const tokenKeys = [
{
formattedKey: __('Status'),
key: 'status',
type: 'string',
param: 'status',
symbol: '',
icon: 'messages',
tag: 'status',
},
{
formattedKey: __('Type'),
key: 'type',
type: 'string',
param: 'type',
symbol: '',
icon: 'cube',
tag: 'type',
},
];
const GroupRunnersFilteredSearchTokenKeys = new FilteredSearchTokenKeys(tokenKeys);
export default GroupRunnersFilteredSearchTokenKeys;
......@@ -2,7 +2,7 @@ import initSettingsPanels from '~/settings_panels';
import AjaxVariableList from '~/ci_variable_list/ajax_variable_list';
import initVariableList from '~/ci_variable_list';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import AdminRunnersFilteredSearchTokenKeys from '~/filtered_search/admin_runners_filtered_search_token_keys';
import GroupRunnersFilteredSearchTokenKeys from '~/filtered_search/group_runners_filtered_search_token_keys';
import { FILTERED_SEARCH } from '~/pages/constants';
document.addEventListener('DOMContentLoaded', () => {
......@@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: FILTERED_SEARCH.ADMIN_RUNNERS,
filteredSearchTokenKeys: AdminRunnersFilteredSearchTokenKeys,
filteredSearchTokenKeys: GroupRunnersFilteredSearchTokenKeys,
anchor: FILTERED_SEARCH.GROUP_RUNNERS_ANCHOR,
});
......
---
title: Fix bug in group runners filtered search
merge_request: 37626
author: Arthur de Lapertosa Lisboa
type: fixed
......@@ -450,5 +450,19 @@ RSpec.describe 'Runners' do
expect(all(:link, href: group_runner_path(group, runner)).length).to eq(1)
end
end
context 'filtered search' do
it 'allows user to search by status and type', :js do
visit group_settings_ci_cd_path(group)
find('.filtered-search').click
page.within('#js-dropdown-hint') do
expect(page).to have_content('Status')
expect(page).to have_content('Type')
expect(page).not_to have_content('Tag')
end
end
end
end
end
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