diff --git a/public/models/Detectors/components/DetectorRulesView/DetectorRulesViewMock.test.ts b/public/models/Detectors/components/DetectorRulesView/DetectorRulesViewMock.test.ts
index 7cd0ed1e0..d0688d7ec 100644
--- a/public/models/Detectors/components/DetectorRulesView/DetectorRulesViewMock.test.ts
+++ b/public/models/Detectors/components/DetectorRulesView/DetectorRulesViewMock.test.ts
@@ -1,6 +1,8 @@
import { detectorMock } from '../../InterfacesMock.test';
-const notificationsStart: NotificationsStart = {};
+const notificationsStart = {
+ toasts: [],
+};
export default {
detector: detectorMock,
rulesCanFold: true,
diff --git a/public/models/Detectors/components/FieldMappingsView/FieldMappingsViewMock.test.ts b/public/models/Detectors/components/FieldMappingsView/FieldMappingsViewMock.test.ts
new file mode 100644
index 000000000..294df7d1f
--- /dev/null
+++ b/public/models/Detectors/components/FieldMappingsView/FieldMappingsViewMock.test.ts
@@ -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,
+};
diff --git a/public/pages/Detectors/components/FieldMappingsView/FieldMappingsView.test.tsx b/public/pages/Detectors/components/FieldMappingsView/FieldMappingsView.test.tsx
new file mode 100644
index 000000000..a66339994
--- /dev/null
+++ b/public/pages/Detectors/components/FieldMappingsView/FieldMappingsView.test.tsx
@@ -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('
+ + + Rule field name + + + | ++ + + Mapped index field name + + + | +
---|---|
+
+ Rule field name
+
+
+
+ ruleFieldName
+
+
+ |
+
+
+ Mapped index field name
+
+
+
+ indexFieldName
+
+
+ |
+
+
+ Rule field name
+
+
+
+ ruleFieldName
+
+
+ |
+
+
+ Mapped index field name
+
+
+
+ indexFieldName
+
+
+ |
+
+ + + Rule field name + + + | ++ + + Mapped index field name + + + | +
---|---|
+
+ Rule field name
+
+
+
+ ruleFieldName
+
+
+ |
+
+
+ Mapped index field name
+
+
+
+ indexFieldName
+
+
+ |
+
+
+ Rule field name
+
+
+
+ ruleFieldName
+
+
+ |
+
+
+ Mapped index field name
+
+
+
+ indexFieldName
+
+
+ |
+