diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 29eddb95..fbe1239e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,6 +11,7 @@ A clear and concise description of the bug. **How can one reproduce the bug?** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -20,9 +21,10 @@ Steps to reproduce the behavior: A clear and concise description of what you expected to happen. **What is your host/environment?** - - OS: [e.g. iOS] - - Version [e.g. 22] - - Plugins + +- OS: [e.g. iOS] +- Version [e.g. 22] +- Plugins **Do you have any screenshots?** If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 6198f338..1bbccb57 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -5,6 +5,7 @@ title: '[FEATURE]' labels: 'enhancement, untriaged' assignees: '' --- + **Is your feature request related to a problem?** A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_ @@ -15,4 +16,4 @@ A clear and concise description of what you want to happen. A clear and concise description of any alternative solutions or features you've considered. **Do you have any additional context?** -Add any other context or screenshots about the feature request here. \ No newline at end of file +Add any other context or screenshots about the feature request here. diff --git a/global-setup.js b/global-setup.js new file mode 100644 index 00000000..3c578000 --- /dev/null +++ b/global-setup.js @@ -0,0 +1,3 @@ +export default () => { + process.env.TZ = 'UTC'; + } \ No newline at end of file diff --git a/public/components/CodeModal/__tests__/CodeModal.test.tsx b/public/components/CodeModal/__tests__/CodeModal.test.tsx index b8dfbcbc..6a7de3f3 100644 --- a/public/components/CodeModal/__tests__/CodeModal.test.tsx +++ b/public/components/CodeModal/__tests__/CodeModal.test.tsx @@ -13,7 +13,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { CodeModal } from '../CodeModal'; -describe('CodeMOdal spec', () => { +describe('CodeModal spec', () => { const onVisibilityChange = jest.fn(() => true); const onCloseModal = jest.fn(); diff --git a/public/components/CodeModal/__tests__/__snapshots__/CodeModal.test.tsx.snap b/public/components/CodeModal/__tests__/__snapshots__/CodeModal.test.tsx.snap index fcddd060..d9be998c 100644 --- a/public/components/CodeModal/__tests__/__snapshots__/CodeModal.test.tsx.snap +++ b/public/components/CodeModal/__tests__/__snapshots__/CodeModal.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CodeMOdal spec renders the component 1`] = ` +exports[`CodeModal spec renders the component 1`] = `
spec', () => { getByText('Hello'); getByText('World'); }); + + test('renders array title', () => { + const { getByText } = render( ++ Last updated time 06/06/2021 12:33 PM +
++ Detector with the most recent anomaly +
++ Most recent anomaly grade 0.00e+0 +
+- Find timestamp -
+ timestamp + spec creating detector definition renders the compon `; -exports[`+ Find indices +
++ Find timestamp +
++ minutes +
++ minutes +
++ niihduhifi +
++ logstash-* +
++ Custom expression: + + +
++ 6 Minutes +
++ Gegni fe sokvuhi luwegja evumemu dajnidu dangap id baj vejmil linsumi leem. +
++ @timestamp +
++ 04/14/20 12:13 AM +
++ 5 Minutes +
++ - +
++ Features + +
++ (2) +
+ ++ + | ++ + + Feature definition + + + | ++ + + Feature state + + + | +
---|---|---|
+
+ Feature name
+
+
+
+ HN
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Field: + HN + ++ Aggregation method: + max + + |
+
+
+ Feature state
+
+
+
+ Disabled
+
+
+ |
+
+
+ Feature name
+
+
+
+ SR
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Field: + SR + ++ Aggregation method: + min + + |
+
+
+ Feature state
+
+
+
+ Disabled
+
+
+ |
+
+ + + Categorical fields + + + | ++ + + Shingle size + + + | +
---|---|
+
+ Categorical fields
+
+
+
+ -
+
+
+ |
+
+
+ Shingle size
+
+
+
+ 8
+
+
+ |
+
+
+
+ Disabled +
++ imuovluonp +
++ logstash-* +
++ Custom expression: + + +
++ 2 Minutes +
++ 96f53081-6862-5961-8 +
++ Rijivet ub nopfauc weuj noz jinona gaceje kiljev itekep ohohve hipudo mat dutak. +
++ @timestamp +
++ 04/14/20 12:13 AM +
++ 1 Minutes +
++ - +
++ Features + +
++ (3) +
+ ++ + | ++ + + Feature definition + + + | ++ + + Feature state + + + | +
---|---|---|
+
+ Feature name
+
+
+
+ value
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Custom expression: + + + + |
+
+
+ Feature state
+
+
+
+ Enabled
+
+
+ |
+
+
+ Feature name
+
+
+
+ value
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Custom expression: + + + + |
+
+
+ Feature state
+
+
+
+ Disabled
+
+
+ |
+
+
+ Feature name
+
+
+
+ value2
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Custom expression: + + + + |
+
+
+ Feature state
+
+
+
+ Enabled
+
+
+ |
+
+ + + Categorical fields + + + | ++ + + Shingle size + + + | +
---|---|
+
+ Categorical fields
+
+
+
+ -
+
+
+ |
+
+
+ Shingle size
+
+
+
+ 8
+
+
+ |
+
+
+
+ Disabled +
+ {
);
-};
\ No newline at end of file
+};
diff --git a/public/pages/Overview/components/__tests__/SampleDetailsFlyout.test.tsx b/public/pages/Overview/components/__tests__/SampleDetailsFlyout.test.tsx
new file mode 100644
index 00000000..4f5dcbab
--- /dev/null
+++ b/public/pages/Overview/components/__tests__/SampleDetailsFlyout.test.tsx
@@ -0,0 +1,29 @@
+/*
+ * Copyright OpenSearch Contributors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import React from 'react';
+import { render } from '@testing-library/react';
+import { CoreServicesContext } from '../../../../components/CoreServices/CoreServices';
+import { coreServicesMock } from '../../../../../test/mocks';
+import { sampleHttpResponses } from '../../utils/constants';
+import { SampleDetailsFlyout } from '../SampleDetailsFlyout/SampleDetailsFlyout';
+
+describe('ModelConfigurationFields', () => {
+ test('renders the component in create mode (no ID)', async () => {
+ const { getByText } = render(
+
+ + + Category field + + + | ++ + + Shingle size + + + | +
---|---|
+
+ Category field
+
+
+
+ -
+
+
+ |
+
+
+ Shingle size
+
+
+
+ 8
+
+
+ |
+
+ Features + +
++ (2) +
+ ++ + | ++ + + Feature definition + + + | ++ + + Feature state + + + | +
---|---|---|
+
+ Feature name
+
+
+
+ TF
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Custom expression: + + + + |
+
+
+ Feature state
+
+
+
+ Disabled
+
+
+ |
+
+
+ Feature name
+
+
+
+ TR
+
+
+ |
+
+
+ Feature definition
+
+
+
+
+
+
+
+ + Custom expression: + + + + |
+
+
+ Feature state
+
+
+
+ Disabled
+
+
+ |
+
+ Custom expression: + + +
++ 10 Minutes +
++ 1 Minutes +
++ - +
++ + + Category field + + + | ++ + + Shingle size + + + | +
---|---|
+
+ Category field
+
+
+
+ -
+
+
+ |
+
+
+ Shingle size
+
+
+
+ 8
+
+
+ |
+
+ Features + +
++ (0) +
+ ++ + | ++ + + Feature definition + + + | ++ + + Feature state + + + | +
---|---|---|
+
+
+ No items found
+
+
+ |
+
+ Start automatically +
++ Disabled +
+