Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jest.mock('react-router-dom', () => ({
...(jest.requireActual('react-router-dom') as object),
useHistory: jest.fn(() => mockHistory),
useLocation: jest.fn(() => mockLocation),
useParams: jest.fn(() => ({})),
}));

/**
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const contentSources = [
boost: 1,
},
{
id: '123',
id: '124',
serviceType: 'jira',
searchable: true,
supportedByLicense: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { IGroupValues } from '../group_logic';

import { IGroupDetails, ISourcePriority } from '../../../types';

export const mockGroupValues = {
group: {} as IGroupDetails,
dataLoading: true,
manageUsersModalVisible: false,
managerModalFormErrors: [],
sharedSourcesModalVisible: false,
confirmDeleteModalVisible: false,
groupNameInputValue: '',
selectedGroupSources: [],
selectedGroupUsers: [],
groupPrioritiesUnchanged: true,
activeSourcePriorities: {} as ISourcePriority,
cachedSourcePriorities: {} as ISourcePriority,
} as IGroupValues;
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { IGroupsValues } from '../groups_logic';

import { IContentSource, IUser, IGroup } from '../../../types';

import { DEFAULT_META } from '../../../../shared/constants';

export const mockGroupsValues = {
groups: [] as IGroup[],
contentSources: [] as IContentSource[],
users: [] as IUser[],
groupsDataLoading: true,
groupListLoading: true,
newGroupModalOpen: false,
newGroupName: '',
hasFiltersSet: false,
newGroup: null,
newGroupNameErrors: [],
filterSourcesDropdownOpen: false,
filteredSources: [],
filterUsersDropdownOpen: false,
filteredUsers: [],
allGroupUsersLoading: false,
allGroupUsers: [],
filterValue: '',
groupsMeta: DEFAULT_META,
} as IGroupsValues;
Loading