Commit 16ecb913 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-09-14

# Conflicts:
#	app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
#	app/assets/javascripts/filtered_search/filtered_search_manager.js
#	app/assets/javascripts/pages/groups/issues/index.js
#	app/assets/javascripts/pages/groups/merge_requests/index.js
#	app/assets/javascripts/pages/projects/issues/index/index.js
#	app/assets/javascripts/pages/projects/merge_requests/index/index.js
#	app/controllers/admin/runners_controller.rb
#	app/helpers/sorting_helper.rb
#	app/models/ci/runner.rb
#	app/views/admin/runners/index.html.haml
#	lib/api/runners.rb
#	locale/gitlab.pot
#	spec/javascripts/filtered_search/components/recent_searches_dropdown_content_spec.js
#	spec/javascripts/filtered_search/dropdown_user_spec.js
#	spec/javascripts/filtered_search/dropdown_utils_spec.js
#	spec/javascripts/filtered_search/filtered_search_manager_spec.js
#	spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js

[ci skip]
parents 1e650461 4d029537
......@@ -11,8 +11,10 @@ export default () => ({
endpoint: '',
basePath: '',
commit: null,
startVersion: null,
diffFiles: [],
mergeRequestDiffs: [],
mergeRequestDiff: null,
diffLineCommentForms: {},
diffViewType: viewTypeFromQueryString || viewTypeFromCookie || defaultViewType,
});
......@@ -3,10 +3,10 @@ import * as getters from '../getters';
import mutations from '../mutations';
import createState from './diff_state';
export default {
export default () => ({
namespaced: true,
state: createState(),
getters,
actions,
mutations,
};
});
......@@ -97,12 +97,15 @@ export default class FilteredSearchDropdownManager {
gl: NullDropdown,
element: this.container.querySelector('#js-dropdown-admin-runner-status'),
},
<<<<<<< HEAD
weight: {
reference: null,
gl: DropdownWeight,
element: this.container.querySelector('#js-dropdown-weight'),
},
=======
>>>>>>> upstream/master
};
supportedTokens.forEach(type => {
......
......@@ -3,7 +3,11 @@ import {
getParameterByName,
getUrlParamsArray,
} from '~/lib/utils/common_utils';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
import { visitUrl } from '../lib/utils/url_utility';
import Flash from '../flash';
import FilteredSearchContainer from './container';
......@@ -23,7 +27,11 @@ export default class FilteredSearchManager {
isGroup = false,
isGroupAncestor = true,
isGroupDecendent = false,
<<<<<<< HEAD
filteredSearchTokenKeys = IssuesFilteredSearchTokenKeys,
=======
filteredSearchTokenKeys = IssuableFilteredSearchTokenKeys,
>>>>>>> upstream/master
stateFiltersSelector = '.issues-state-filters',
}) {
this.isGroup = isGroup;
......
import FilteredSearchTokenKeys from './filtered_search_token_keys';
const tokenKeys = [{
key: 'author',
type: 'string',
param: 'username',
symbol: '@',
icon: 'pencil',
tag: '@author',
}, {
key: 'assignee',
type: 'string',
param: 'username',
symbol: '@',
icon: 'user',
tag: '@assignee',
}, {
key: 'milestone',
type: 'string',
param: 'title',
symbol: '%',
icon: 'clock-o',
tag: '%milestone',
}, {
key: 'label',
type: 'array',
param: 'name[]',
symbol: '~',
icon: 'tag',
tag: '~label',
}];
if (gon.current_user_id) {
// Appending tokenkeys only logged-in
tokenKeys.push({
key: 'my-reaction',
type: 'string',
param: 'emoji',
symbol: '',
icon: 'thumbs-up',
tag: 'emoji',
});
}
const alternativeTokenKeys = [{
key: 'label',
type: 'string',
param: 'name',
symbol: '~',
}];
const conditions = [{
url: 'assignee_id=0',
tokenKey: 'assignee',
value: 'none',
}, {
url: 'milestone_title=No+Milestone',
tokenKey: 'milestone',
value: 'none',
}, {
url: 'milestone_title=%23upcoming',
tokenKey: 'milestone',
value: 'upcoming',
}, {
url: 'milestone_title=%23started',
tokenKey: 'milestone',
value: 'started',
}, {
url: 'label_name[]=No+Label',
tokenKey: 'label',
value: 'none',
}];
const IssuableFilteredSearchTokenKeys =
new FilteredSearchTokenKeys(tokenKeys, alternativeTokenKeys, conditions);
export default IssuableFilteredSearchTokenKeys;
......@@ -9,7 +9,7 @@ Vue.use(Vuex);
export default new Vuex.Store({
modules: {
page: mrPageModule,
notes: notesModule,
diffs: diffsModule,
notes: notesModule(),
diffs: diffsModule(),
},
});
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
import * as getters from './getters';
import mutations from './mutations';
import module from './modules';
import notesModule from './modules';
Vue.use(Vuex);
export default () =>
new Vuex.Store({
state: module.state,
actions,
getters,
mutations,
});
new Vuex.Store(notesModule());
......@@ -2,7 +2,7 @@ import * as actions from '../actions';
import * as getters from '../getters';
import mutations from '../mutations';
export default {
export default () => ({
state: {
discussions: [],
targetNoteHash: null,
......@@ -24,4 +24,4 @@ export default {
actions,
getters,
mutations,
};
});
import projectSelect from '~/project_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import { FILTERED_SEARCH } from '~/pages/constants';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeysEE from 'ee/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: FILTERED_SEARCH.ISSUES,
isGroupDecendent: true,
<<<<<<< HEAD
filteredSearchTokenKeys: IssuesFilteredSearchTokenKeysEE,
=======
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
>>>>>>> upstream/master
});
projectSelect();
});
import projectSelect from '~/project_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
import { FILTERED_SEARCH } from '~/pages/constants';
document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: FILTERED_SEARCH.MERGE_REQUESTS,
isGroupDecendent: true,
<<<<<<< HEAD
filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys,
=======
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
>>>>>>> upstream/master
});
projectSelect();
});
......@@ -4,6 +4,7 @@ import IssuableIndex from '~/issuable_index';
import ShortcutsNavigation from '~/shortcuts_navigation';
import UsersSelect from '~/users_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import { FILTERED_SEARCH } from '~/pages/constants';
import { ISSUABLE_INDEX } from '~/pages/projects/constants';
import IssuesFilteredSearchTokenKeysEE from 'ee/filtered_search/issues_filtered_search_token_keys';
......@@ -11,7 +12,11 @@ import IssuesFilteredSearchTokenKeysEE from 'ee/filtered_search/issues_filtered_
document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: FILTERED_SEARCH.ISSUES,
<<<<<<< HEAD
filteredSearchTokenKeys: IssuesFilteredSearchTokenKeysEE,
=======
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
>>>>>>> upstream/master
});
new IssuableIndex(ISSUABLE_INDEX.ISSUE);
......
......@@ -2,14 +2,22 @@ import IssuableIndex from '~/issuable_index';
import ShortcutsNavigation from '~/shortcuts_navigation';
import UsersSelect from '~/users_select';
import initFilteredSearch from '~/pages/search/init_filtered_search';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
import { FILTERED_SEARCH } from '~/pages/constants';
import { ISSUABLE_INDEX } from '~/pages/projects/constants';
document.addEventListener('DOMContentLoaded', () => {
initFilteredSearch({
page: FILTERED_SEARCH.MERGE_REQUESTS,
<<<<<<< HEAD
filteredSearchTokenKeys: IssuesFilteredSearchTokenKeys,
=======
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
>>>>>>> upstream/master
});
new IssuableIndex(ISSUABLE_INDEX.MERGE_REQUEST); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new
......
......@@ -5,7 +5,11 @@ class Admin::RunnersController < Admin::ApplicationController
def index
finder = Admin::RunnersFinder.new(params: params)
@runners = finder.execute
<<<<<<< HEAD
@active_runners_cnt = Ci::Runner.online.count
=======
@active_runners_count = Ci::Runner.online.count
>>>>>>> upstream/master
@sort = finder.sort_key
end
# rubocop: enable CodeReuse/ActiveRecord
......
......@@ -22,7 +22,7 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
private
def group_milestones
groups = GroupsFinder.new(current_user, all_available: true).execute
groups = GroupsFinder.new(current_user, all_available: false).execute
DashboardGroupMilestone.build_collection(groups)
end
......
......@@ -29,8 +29,12 @@ module SortingHelper
sort_value_popularity => sort_title_popularity,
sort_value_priority => sort_title_priority,
sort_value_upvotes => sort_title_upvotes,
<<<<<<< HEAD
sort_value_contacted_date => sort_title_contacted_date,
sort_value_weight => sort_title_weight
=======
sort_value_contacted_date => sort_title_contacted_date
>>>>>>> upstream/master
}
end
......@@ -395,8 +399,11 @@ module SortingHelper
def sort_value_contacted_date
'contacted_asc'
end
<<<<<<< HEAD
def sort_value_weight
'weight'
end
=======
>>>>>>> upstream/master
end
......@@ -32,6 +32,15 @@ module Ci
scope :active, -> { where(active: true) }
scope :paused, -> { where(active: false) }
scope :online, -> { where('contacted_at > ?', contact_time_deadline) }
<<<<<<< HEAD
=======
# The following query using negation is cheaper than using `contacted_at <= ?`
# because there are less runners online than have been created. The
# resulting query is quickly finding online ones and then uses the regular
# indexed search and rejects the ones that are in the previous set. If we
# did `contacted_at <= ?` the query would effectively have to do a seq
# scan.
>>>>>>> upstream/master
scope :offline, -> { where.not(id: online) }
scope :ordered, -> { order(id: :desc) }
......
......@@ -73,19 +73,10 @@ module Clusters
"clientSecret" => oauth_application.secret,
"callbackUrl" => callback_url
}
},
"singleuser" => {
"extraEnv" => {
"GITLAB_PROJECT_ID" => project_id
}
}
}
end
def project_id
cluster&.project&.id
end
def gitlab_url
Gitlab.config.gitlab.url
end
......
......@@ -13,7 +13,7 @@ class DashboardGroupMilestone < GlobalMilestone
end
def self.build_collection(groups)
MilestonesFinder.new(group_ids: groups.pluck(:id)).execute.map { |m| new(m) } # rubocop: disable CodeReuse/Finder
MilestonesFinder.new(group_ids: groups.select(:id)).execute.map { |m| new(m) } # rubocop: disable CodeReuse/Finder
end
override :group_milestone?
......
......@@ -47,7 +47,11 @@
.bs-callout
%p
<<<<<<< HEAD
= _('Runners currently online: %{active_runners_cnt}') % { active_runners_cnt: @active_runners_cnt }
=======
= _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count }
>>>>>>> upstream/master
.row-content-block.second-block
= form_tag admin_runners_path, id: 'runners-search', method: :get, class: 'filter-form js-filter-form' do
......@@ -68,13 +72,21 @@
#js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
<<<<<<< HEAD
%button.btn.btn-link
=======
= button_tag class: %w[btn btn-link] do
>>>>>>> upstream/master
= icon('search')
%span
= _('Press Enter or click to search')
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
%li.filter-dropdown-item
<<<<<<< HEAD
%button.btn.btn-link
=======
= button_tag class: %w[btn btn-link] do
>>>>>>> upstream/master
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%i.fa{ class: "#{'{{icon}}'}" }
......@@ -86,9 +98,15 @@
%ul{ data: { dropdown: true } }
- Ci::Runner::AVAILABLE_STATUSES.each do |status|
%li.filter-dropdown-item{ data: { value: status } }
<<<<<<< HEAD
%button.btn.btn-link
= status.titleize
%button.clear-search.hidden{ type: 'button' }
=======
= button_tag class: %w[btn btn-link] do
= status.titleize
= button_tag class: %w[clear-search hidden] do
>>>>>>> upstream/master
= icon('times')
.filter-dropdown-container
= render 'sort_dropdown'
......
---
title: Filter group milestones based on user membership.
merge_request: 21660
author:
type: fixed
......@@ -14,7 +14,11 @@ module API
use :pagination
end
get do
<<<<<<< HEAD
runners = filter_runners(current_user.ci_owned_runners, params[:scope], only: Ci::Runner::AVAILABLE_STATUSES)
=======
runners = filter_runners(current_user.ci_owned_runners, params[:scope], allowed_scopes: Ci::Runner::AVAILABLE_STATUSES)
>>>>>>> upstream/master
present paginate(runners), with: Entities::Runner
end
......@@ -160,12 +164,19 @@ module API
end
helpers do
<<<<<<< HEAD
def filter_runners(runners, scope, only: nil)
return runners unless scope.present?
available_scopes = only || ::Ci::Runner::AVAILABLE_SCOPES
unless available_scopes.include?(scope)
=======
def filter_runners(runners, scope, allowed_scopes: ::Ci::Runner::AVAILABLE_SCOPES)
return runners unless scope.present?
unless allowed_scopes.include?(scope)
>>>>>>> upstream/master
render_api_error!('Scope contains invalid value', 400)
end
......
......@@ -6480,7 +6480,11 @@ msgstr ""
msgid "Runners can be placed on separate users, servers, even on your local machine."
msgstr ""
<<<<<<< HEAD
msgid "Runners currently online: %{active_runners_cnt}"
=======
msgid "Runners currently online: %{active_runners_count}"
>>>>>>> upstream/master
msgstr ""
msgid "Runners page"
......@@ -8125,9 +8129,12 @@ msgstr ""
msgid "Version"
msgstr ""
<<<<<<< HEAD
msgid "View epics list"
msgstr ""
=======
>>>>>>> upstream/master
msgid "View file @ "
msgstr ""
......
......@@ -3,9 +3,11 @@ require 'spec_helper'
describe Dashboard::MilestonesController do
let(:project) { create(:project) }
let(:group) { create(:group) }
let(:public_group) { create(:group, :public) }
let(:user) { create(:user) }
let(:project_milestone) { create(:milestone, project: project) }
let(:group_milestone) { create(:milestone, group: group) }
let!(:public_milestone) { create(:milestone, group: public_group) }
let(:milestone) do
DashboardMilestone.build(
[project],
......@@ -43,13 +45,13 @@ describe Dashboard::MilestonesController do
end
describe "#index" do
it 'should contain group and project milestones' do
it 'returns group and project milestones to which the user belongs' do
get :index, format: :json
expect(response).to have_gitlab_http_status(200)
expect(json_response.size).to eq(2)
expect(json_response.map { |i| i["first_milestone"]["id"] }).to include(group_milestone.id, project_milestone.id)
expect(json_response.map { |i| i["group_name"] }).to include(group.name)
expect(json_response.map { |i| i["first_milestone"]["id"] }).to match_array([group_milestone.id, project_milestone.id])
expect(json_response.map { |i| i["group_name"] }.compact).to match_array(group.name)
end
end
end
......@@ -17,8 +17,9 @@ describe 'Dashboard > Milestones' do
let(:project) { create(:project, namespace: user.namespace) }
let!(:milestone) { create(:milestone, project: project) }
let!(:milestone2) { create(:milestone, group: group) }
before do
project.add_maintainer(user)
group.add_developer(user)
sign_in(user)
visit dashboard_milestones_path
end
......
// TODO: https://gitlab.com/gitlab-org/gitlab-ce/issues/48034
import Vue from 'vue';
import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { TEST_HOST } from 'spec/test_constants';
import App from '~/diffs/components/app.vue';
import createDiffsStore from '../create_diffs_store';
describe('diffs/components/app', () => {
const oldMrTabs = window.mrTabs;
const Component = Vue.extend(App);
let vm;
beforeEach(() => {
// setup globals (needed for component to mount :/)
window.mrTabs = jasmine.createSpyObj('mrTabs', ['resetViewContainer']);
// setup component
const store = createDiffsStore();
store.state.diffs.isLoading = false;
vm = mountComponentWithStore(Component, {
store,
props: {
endpoint: `${TEST_HOST}/diff/endpoint`,
projectPath: 'namespace/project',
currentUser: {},
},
});
});
afterEach(() => {
// reset globals
window.mrTabs = oldMrTabs;
// reset component
vm.$destroy();
});
it('shows comments message, with commit', done => {
vm.$store.state.diffs.commit = {};
vm.$nextTick()
.then(() => {
expect(vm.$el).toContainText('Only comments from the following commit are shown below');
})
.then(done)
.catch(done.fail);
});
it('shows comments message, with old mergeRequestDiff', done => {
vm.$store.state.diffs.mergeRequestDiff = { latest: false };
vm.$nextTick()
.then(() => {
expect(vm.$el).toContainText("Not all comments are displayed because you're viewing an old version of the diff.");
})
.then(done)
.catch(done.fail);
});
it('shows comments message, with startVersion', done => {
vm.$store.state.diffs.startVersion = 'test';
vm.$nextTick()
.then(() => {
expect(vm.$el).toContainText("Not all comments are displayed because you're comparing two versions of the diff.");
})
.then(done)
.catch(done.fail);
});
});
......@@ -8,7 +8,7 @@ describe('ChangedFiles', () => {
const Component = Vue.extend(changedFiles);
const store = new Vuex.Store({
modules: {
diffs: diffsModule,
diffs: diffsModule(),
},
});
......
......@@ -16,8 +16,8 @@ describe('diff_file_header', () => {
const store = new Vuex.Store({
modules: {
diffs: diffsModule,
notes: notesModule,
diffs: diffsModule(),
notes: notesModule(),
},
});
......@@ -450,13 +450,14 @@ describe('diff_file_header', () => {
propsCopy.diffFile.deletedFile = true;
const discussionGetter = () => [diffDiscussionMock];
notesModule.getters.discussions = discussionGetter;
const notesModuleMock = notesModule();
notesModuleMock.getters.discussions = discussionGetter;
vm = mountComponentWithStore(Component, {
props: propsCopy,
store: new Vuex.Store({
modules: {
diffs: diffsModule,
notes: notesModule,
diffs: diffsModule(),
notes: notesModuleMock,
},
}),
});
......
import Vue from 'vue';
import Vuex from 'vuex';
import diffsModule from '~/diffs/store/modules';
import notesModule from '~/notes/stores/modules';
Vue.use(Vuex);
export default function createDiffsStore() {
return new Vuex.Store({
modules: {
diffs: diffsModule(),
notes: notesModule(),
},
});
}
import Vue from 'vue';
import eventHub from '~/filtered_search/event_hub';
import RecentSearchesDropdownContent from '~/filtered_search/components/recent_searches_dropdown_content.vue';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
const createComponent = (propsData) => {
const Component = Vue.extend(RecentSearchesDropdownContent);
......@@ -18,14 +22,22 @@ const trimMarkupWhitespace = text => text.replace(/(\n|\s)+/gm, ' ').trim();
describe('RecentSearchesDropdownContent', () => {
const propsDataWithoutItems = {
items: [],
<<<<<<< HEAD
allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(),
=======
allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(),
>>>>>>> upstream/master
};
const propsDataWithItems = {
items: [
'foo',
'author:@root label:~foo bar',
],
<<<<<<< HEAD
allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(),
=======
allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(),
>>>>>>> upstream/master
};
let vm;
......
import DropdownUtils from '~/filtered_search/dropdown_utils';
import DropdownUser from '~/filtered_search/dropdown_user';
import FilteredSearchTokenizer from '~/filtered_search/filtered_search_tokenizer';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
describe('Dropdown User', () => {
describe('getSearchInput', () => {
......@@ -14,7 +18,11 @@ describe('Dropdown User', () => {
spyOn(DropdownUtils, 'getSearchInput').and.callFake(() => {});
dropdownUser = new DropdownUser({
<<<<<<< HEAD
tokenKeys: IssuesFilteredSearchTokenKeys,
=======
tokenKeys: IssuableFilteredTokenKeys,
>>>>>>> upstream/master
});
});
......
import DropdownUtils from '~/filtered_search/dropdown_utils';
import FilteredSearchDropdownManager from '~/filtered_search/filtered_search_dropdown_manager';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
import FilteredSearchSpecHelper from '../helpers/filtered_search_spec_helper';
describe('Dropdown Utils', () => {
......@@ -137,7 +141,11 @@ describe('Dropdown Utils', () => {
`);
input = document.getElementById('test');
<<<<<<< HEAD
allowedKeys = IssuesFilteredSearchTokenKeys.getKeys();
=======
allowedKeys = IssuableFilteredSearchTokenKeys.getKeys();
>>>>>>> upstream/master
});
function config() {
......
import RecentSearchesService from '~/filtered_search/services/recent_searches_service';
import RecentSearchesServiceError from '~/filtered_search/services/recent_searches_service_error';
import RecentSearchesRoot from '~/filtered_search/recent_searches_root';
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
>>>>>>> upstream/master
import '~/lib/utils/common_utils';
import DropdownUtils from '~/filtered_search/dropdown_utils';
import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens';
......@@ -86,7 +90,11 @@ describe('Filtered Search Manager', function () {
expect(RecentSearchesService.isAvailable).toHaveBeenCalled();
expect(RecentSearchesStoreSpy).toHaveBeenCalledWith({
isLocalStorageAvailable,
<<<<<<< HEAD
allowedKeys: IssuesFilteredSearchTokenKeys.getKeys(),
=======
allowedKeys: IssuableFilteredSearchTokenKeys.getKeys(),
>>>>>>> upstream/master
});
});
});
......
<<<<<<< HEAD
import IssuesFilteredSearchTokenKeys from '~/filtered_search/issues_filtered_search_token_keys';
import FilteredSearchTokenizer from '~/filtered_search/filtered_search_tokenizer';
describe('Filtered Search Tokenizer', () => {
const allowedKeys = IssuesFilteredSearchTokenKeys.getKeys();
=======
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import FilteredSearchTokenizer from '~/filtered_search/filtered_search_tokenizer';
describe('Filtered Search Tokenizer', () => {
const allowedKeys = IssuableFilteredSearchTokenKeys.getKeys();
>>>>>>> upstream/master
describe('processTokens', () => {
it('returns for input containing only search value', () => {
......
......@@ -108,17 +108,8 @@ describe Clusters::Applications::Jupyter do
expect(values).to include('rbac')
expect(values).to include('proxy')
expect(values).to include('auth')
expect(values).to include('singleuser')
expect(values).to match(/clientId: '?#{application.oauth_application.uid}/)
expect(values).to match(/callbackUrl: '?#{application.callback_url}/)
end
context 'when cluster belongs to a project' do
let(:project) { application.cluster.first_project }
it 'sets GitLab project id' do
expect(values).to match(/GITLAB_PROJECT_ID: '?#{project.id}/)
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