Skip to content

Commit

Permalink
[SIEM] [Cases] Use configure refactor (#64309)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic authored Apr 27, 2020
1 parent db374fc commit 60cb936
Show file tree
Hide file tree
Showing 9 changed files with 1,021 additions and 1,129 deletions.
45 changes: 23 additions & 22 deletions x-pack/legacy/plugins/siem/public/containers/case/configure/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,25 @@ import {
CasesConfigureResponse,
CasesConfigureRequest,
} from '../../../../../../../plugins/case/common/api';
import { CaseConfigure } from './types';
import { CaseConfigure, CasesConfigurationMapping } from './types';

export const mapping: CasesConfigurationMapping[] = [
{
source: 'title',
target: 'short_description',
actionType: 'overwrite',
},
{
source: 'description',
target: 'description',
actionType: 'append',
},
{
source: 'comments',
target: 'comments',
actionType: 'append',
},
];
export const connectorsMock: Connector[] = [
{
id: '123',
Expand All @@ -19,26 +36,10 @@ export const connectorsMock: Connector[] = [
config: {
apiUrl: 'https://instance1.service-now.com',
casesConfiguration: {
mapping: [
{
source: 'title',
target: 'short_description',
actionType: 'overwrite',
},
{
source: 'description',
target: 'description',
actionType: 'append',
},
{
source: 'comments',
target: 'comments',
actionType: 'append',
},
],
mapping,
},
},
isPreconfigured: true,
isPreconfigured: false,
},
{
id: '456',
Expand Down Expand Up @@ -66,7 +67,7 @@ export const connectorsMock: Connector[] = [
],
},
},
isPreconfigured: true,
isPreconfigured: false,
},
];

Expand All @@ -75,7 +76,7 @@ export const caseConfigurationResposeMock: CasesConfigureResponse = {
created_by: { username: 'elastic', full_name: 'Elastic', email: '[email protected]' },
connector_id: '123',
connector_name: 'My Connector',
closure_type: 'close-by-user',
closure_type: 'close-by-pushing',
updated_at: '2020-04-06T14:03:18.657Z',
updated_by: { username: 'elastic', full_name: 'Elastic', email: '[email protected]' },
version: 'WzHJ12',
Expand All @@ -92,7 +93,7 @@ export const caseConfigurationCamelCaseResponseMock: CaseConfigure = {
createdBy: { username: 'elastic', fullName: 'Elastic', email: '[email protected]' },
connectorId: '123',
connectorName: 'My Connector',
closureType: 'close-by-user',
closureType: 'close-by-pushing',
updatedAt: '2020-04-06T14:03:18.657Z',
updatedBy: { username: 'elastic', fullName: 'Elastic', email: '[email protected]' },
version: 'WzHJ12',
Expand Down
Loading

0 comments on commit 60cb936

Please sign in to comment.