diff --git a/public/app.scss b/public/app.scss index 8c0b500d..a580c547 100644 --- a/public/app.scss +++ b/public/app.scss @@ -17,3 +17,5 @@ @import 'pages/createDetector/index.scss'; @import 'pages/Dashboard/index.scss'; @import 'pages/DetectorConfig/index.scss'; +@import 'pages/AnomalyCharts/index.scss'; +@import 'pages/DetectorResults/index.scss'; diff --git a/public/pages/EditFeatures/components/AggregationSelector/__tests__/AggregationSelector.test.tsx b/public/pages/EditFeatures/components/AggregationSelector/__tests__/AggregationSelector.test.tsx index 4731cda1..bee4c3b1 100644 --- a/public/pages/EditFeatures/components/AggregationSelector/__tests__/AggregationSelector.test.tsx +++ b/public/pages/EditFeatures/components/AggregationSelector/__tests__/AggregationSelector.test.tsx @@ -23,7 +23,7 @@ import { mockedStore, } from '../../../../../redux/utils/testUtils'; import { FeaturesFormikValues } from '../../../containers/utils/formikToFeatures'; -import { INITIAL_VALUES } from '../../../containers/utils/constants'; +import { INITIAL_VALUES } from '../../../utils/constants'; const renderAggregationSelector = (initialValue: FeaturesFormikValues) => ({ ...render( diff --git a/public/pages/EditFeatures/components/CustomAggregation/__tests__/CustomAggregation.test.tsx b/public/pages/EditFeatures/components/CustomAggregation/__tests__/CustomAggregation.test.tsx index 4206ee9a..7148d68e 100644 --- a/public/pages/EditFeatures/components/CustomAggregation/__tests__/CustomAggregation.test.tsx +++ b/public/pages/EditFeatures/components/CustomAggregation/__tests__/CustomAggregation.test.tsx @@ -20,7 +20,7 @@ import { Provider } from 'react-redux'; import { mockedStore } from '../../../../../redux/utils/testUtils'; import { Formik } from 'formik'; import { FeaturesFormikValues } from '../../../../EditFeatures/containers/utils/formikToFeatures'; -import { INITIAL_VALUES } from '../../../../EditFeatures/containers/utils/constants'; +import { INITIAL_VALUES } from '../../../../EditFeatures/utils/constants'; const renderWithFormik = (initialValue: FeaturesFormikValues) => ({ ...render( diff --git a/public/redux/reducers/__tests__/ad.test.ts b/public/redux/reducers/__tests__/ad.test.ts index 9d1a1e08..d577db69 100644 --- a/public/redux/reducers/__tests__/ad.test.ts +++ b/public/redux/reducers/__tests__/ad.test.ts @@ -11,6 +11,7 @@ import reducer, { updateDetector, } from '../ad'; import { getRandomDetector } from './utils'; +import { get } from 'lodash'; describe('detector reducer actions', () => { let store: MockStore; @@ -197,13 +198,15 @@ describe('detector reducer actions', () => { requesting: true, }); expect(actions[1].type).toBe('ad/UPDATE_DETECTOR_SUCCESS'); - expect(reducer(initialDetectorsState, actions[1])).toEqual({ + const result = reducer(initialDetectorsState, actions[1]); + expect(result).toEqual({ ...initialDetectorsState, requesting: false, detectors: { [detectorId]: { ...randomDetector, id: detectorId, + lastUpdateTime: get(result, `detectors.${detectorId}.lastUpdateTime`) }, }, }); diff --git a/public/redux/reducers/__tests__/anomalyResults.test.ts b/public/redux/reducers/__tests__/anomalyResults.test.ts index 0cff3c14..af14bbeb 100644 --- a/public/redux/reducers/__tests__/anomalyResults.test.ts +++ b/public/redux/reducers/__tests__/anomalyResults.test.ts @@ -44,6 +44,7 @@ describe('elasticsearch reducer actions', () => { requesting: false, total: response.totalAnomalies, anomalies: response.results, + "featureData": undefined, }); expect(httpMockedClient.get).toHaveBeenCalledWith( `..${AD_NODE_API.DETECTOR}/${tempDetectorId}/results`, diff --git a/public/utils/utils.ts b/public/utils/utils.ts index a2256657..286f25b5 100644 --- a/public/utils/utils.ts +++ b/public/utils/utils.ts @@ -22,7 +22,6 @@ import { ALERTING_PLUGIN_NAME, NAME_REGEX } from './constants'; import { MAX_FEATURE_NAME_SIZE } from './constants'; export const validateName = (featureName: string): string | undefined => { - debugger; if (isEmpty(featureName)) { return 'Required'; }