/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
import React from 'react';
import { render } from '@testing-library/react';
import { DetectorJobs } from '../DetectorJobs';
import { DETECTOR_STATE } from '../../../../../server/utils/constants';
describe(' spec', () => {
test('renders with real-time non-HC detector', () => {
const { getByText } = render(
);
getByText('Real-time detector');
getByText(DETECTOR_STATE.INIT);
});
test('renders with real-time HC detector', () => {
const { getByText } = render(
);
getByText('Real-time detector');
getByText(DETECTOR_STATE.INIT);
});
test('renders with disabled historical analysis', () => {
const { getByText } = render(
);
getByText('Historical analysis detector');
getByText('Disabled');
});
test('renders with historical non-HC detector', () => {
const { getByText, queryByText } = render(
);
getByText('Historical analysis detector');
expect(queryByText('Disabled')).toBeNull();
});
test('renders with historical HC detector', () => {
const { getByText, queryByText } = render(
);
getByText('Historical analysis detector');
expect(queryByText('Disabled')).toBeNull();
});
});