Skip to content

Commit

Permalink
Adjust styling for Finding details flyout opensearch-project#369
Browse files Browse the repository at this point in the history
Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed Jan 24, 2023
1 parent ff8117e commit b308059
Show file tree
Hide file tree
Showing 4 changed files with 504 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { detectorMock } from '../../InterfacesMock.test';

const notificationsStart: NotificationsStart = {};
const notificationsStart = {
toasts: [],
};
export default {
detector: detectorMock,
rulesCanFold: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { FieldMapping } from '../../../../../models/interfaces';
import { detectorMock } from '../../InterfacesMock.test';
const notificationsStart = {
toasts: [],
};

const fieldMapping: FieldMapping = {
indexFieldName: 'indexFieldName',
ruleFieldName: 'ruleFieldName',
};
export default {
detector: detectorMock,
existingMappings: [fieldMapping, fieldMapping],
editFieldMappings: jest.fn(),
notifications: notificationsStart,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React from 'react';
import { render } from '@testing-library/react';
import props from '../../../../models/Detectors/components/FieldMappingsView/FieldMappingsViewMock.test';
import { expect } from '@jest/globals';
import { FieldMappingsView } from './FieldMappingsView';

describe('<FieldMappingsView /> spec', () => {
it('renders the component', () => {
const view = render(<FieldMappingsView {...props} />);
expect(view).toMatchSnapshot();
});
});
Loading

0 comments on commit b308059

Please sign in to comment.