chore(NA): move uptime plugin tests out of __tests__ folder (#87416)
* chore(NA): move uptime plugin tests out of __tests__ folder * chore(NA): re-add file into __mocks__ folder
This commit is contained in:
parent
50bda81a05
commit
9a0c331ab5
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { combineFiltersAndUserSearch } from '../combine_filters_and_user_search';
|
||||
import { combineFiltersAndUserSearch } from './combine_filters_and_user_search';
|
||||
|
||||
describe('combineFiltersAndUserSearch', () => {
|
||||
it('returns only search if filters are empty', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getMLJobId } from '../ml';
|
||||
import { getMLJobId } from './ml';
|
||||
|
||||
describe('ML Anomaly API', () => {
|
||||
it('it generates a lowercase job id', async () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { stringifyKueries } from '../stringify_kueries';
|
||||
import { stringifyKueries } from './stringify_kueries';
|
||||
|
||||
describe('stringifyKueries', () => {
|
||||
let kueries: Map<string, number[] | string[]>;
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { CertMonitors } from '../cert_monitors';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { CertMonitors } from './cert_monitors';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../lib';
|
||||
|
||||
describe('CertMonitors', () => {
|
||||
const certMons = [
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { CertificateSearch } from '../cert_search';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../lib';
|
||||
import { CertificateSearch } from './cert_search';
|
||||
|
||||
describe('CertificatesSearch', () => {
|
||||
it('shallow renders expected elements for valid props', () => {
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { CertStatus } from '../cert_status';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../lib';
|
||||
import { CertStatus } from './cert_status';
|
||||
import * as redux from 'react-redux';
|
||||
import moment from 'moment';
|
||||
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithRouter } from '../../../lib';
|
||||
import { CertificateList, CertSort } from '../certificates_list';
|
||||
import { shallowWithRouter } from '../../lib';
|
||||
import { CertificateList, CertSort } from './certificates_list';
|
||||
|
||||
describe('CertificateList', () => {
|
||||
it('shallow renders expected elements for valid props', () => {
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { FingerprintCol } from '../fingerprint_col';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../lib';
|
||||
import { FingerprintCol } from './fingerprint_col';
|
||||
import moment from 'moment';
|
||||
|
||||
describe('FingerprintCol', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { ChartEmptyState } from '../chart_empty_state';
|
||||
import { ChartEmptyState } from './chart_empty_state';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
|
@ -9,9 +9,9 @@ import { EuiSpacer } from '@elastic/eui';
|
|||
import { mount } from 'enzyme';
|
||||
import { nextTick } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { ChartWrapper } from '../chart_wrapper';
|
||||
import { SnapshotHeading } from '../../../overview/snapshot/snapshot_heading';
|
||||
import { DonutChart } from '../donut_chart';
|
||||
import { ChartWrapper } from './chart_wrapper';
|
||||
import { SnapshotHeading } from '../../overview/snapshot/snapshot_heading';
|
||||
import { DonutChart } from './donut_chart';
|
||||
const SNAPSHOT_CHART_HEIGHT = 144;
|
||||
describe('ChartWrapper component', () => {
|
||||
it('renders the component with loading false', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { DonutChart } from '../donut_chart';
|
||||
import { DonutChart } from './donut_chart';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
|
|
@ -6,9 +6,9 @@
|
|||
import React from 'react';
|
||||
import { renderWithIntl } from '@kbn/test/jest';
|
||||
|
||||
import { DonutChartLegend } from '../donut_chart_legend';
|
||||
import { DonutChartLegend } from './donut_chart_legend';
|
||||
|
||||
import { STATUS_DOWN_LABEL, STATUS_UP_LABEL } from '../../translations';
|
||||
import { STATUS_DOWN_LABEL, STATUS_UP_LABEL } from '../translations';
|
||||
|
||||
describe('DonutChartLegend', () => {
|
||||
it('applies valid props as expected', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { DonutChartLegendRow } from '../donut_chart_legend_row';
|
||||
import { DonutChartLegendRow } from './donut_chart_legend_row';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import React from 'react';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import { DurationChartComponent } from '../duration_chart';
|
||||
import { MonitorDurationResult } from '../../../../../common/types';
|
||||
import { shallowWithRouter } from '../../../../lib';
|
||||
import { DurationChartComponent } from './duration_chart';
|
||||
import { MonitorDurationResult } from '../../../../common/types';
|
||||
import { shallowWithRouter } from '../../../lib';
|
||||
|
||||
describe('MonitorCharts component', () => {
|
||||
let dateMathSpy: any;
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getTickFormat } from '../get_tick_format';
|
||||
import { getTickFormat } from './get_tick_format';
|
||||
|
||||
describe('getTickFormat', () => {
|
||||
it('returns null if value is NaN', () => {
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { MonitorBarSeries, MonitorBarSeriesProps } from '../monitor_bar_series';
|
||||
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../../lib';
|
||||
import { HistogramPoint } from '../../../../../common/runtime_types';
|
||||
import { MonitorBarSeries, MonitorBarSeriesProps } from './monitor_bar_series';
|
||||
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../lib';
|
||||
import { HistogramPoint } from '../../../../common/runtime_types';
|
||||
|
||||
describe('MonitorBarSeries component', () => {
|
||||
let props: MonitorBarSeriesProps;
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { PingHistogramComponent, PingHistogramComponentProps } from '../ping_histogram';
|
||||
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../../lib';
|
||||
import { PingHistogramComponent, PingHistogramComponentProps } from './ping_histogram';
|
||||
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../lib';
|
||||
import moment from 'moment';
|
||||
|
||||
describe('PingHistogram component', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getDateRangeFromChartElement } from '../utils';
|
||||
import { getDateRangeFromChartElement } from './utils';
|
||||
import { XYChartElementEvent } from '@elastic/charts';
|
||||
|
||||
describe('Chart utils', () => {
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { PageHeader } from '../page_header';
|
||||
import { renderWithRouter, MountWithReduxProvider } from '../../../../lib';
|
||||
import { PageHeader } from './page_header';
|
||||
import { renderWithRouter, MountWithReduxProvider } from '../../../lib';
|
||||
|
||||
describe('PageHeader', () => {
|
||||
it('shallow renders with the date picker', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { withResponsiveWrapper } from '../responsive_wrapper';
|
||||
import { withResponsiveWrapper } from './responsive_wrapper';
|
||||
|
||||
interface Prop {
|
||||
isResponsive: boolean;
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { LocationLink } from '../location_link';
|
||||
import { LocationLink } from './location_link';
|
||||
|
||||
describe('LocationLink component', () => {
|
||||
it('renders the location when present', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { MonitorPageLink } from '../monitor_page_link';
|
||||
import { MonitorPageLink } from './monitor_page_link';
|
||||
|
||||
describe('MonitorPageLink component', () => {
|
||||
it('renders the link properly', () => {
|
|
@ -6,9 +6,9 @@
|
|||
import { render, fireEvent, screen } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { MonitorTags } from '../monitor_tags';
|
||||
import * as hooks from '../../../hooks/use_url_params';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { MonitorTags } from './monitor_tags';
|
||||
import * as hooks from '../../hooks/use_url_params';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../lib';
|
||||
|
||||
describe('MonitorTags component', () => {
|
||||
const summaryPing = {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { letBrowserHandleEvent } from '../index';
|
||||
import { letBrowserHandleEvent } from './index';
|
||||
|
||||
describe('letBrowserHandleEvent', () => {
|
||||
const event = {
|
|
@ -8,10 +8,10 @@ import React from 'react';
|
|||
import { shallow, mount } from 'enzyme';
|
||||
import { EuiLink, EuiButton } from '@elastic/eui';
|
||||
|
||||
import '../../../../lib/__mocks__/ut_router_history.mock';
|
||||
import '../../../lib/__mocks__/ut_router_history.mock';
|
||||
|
||||
import { ReactRouterEuiLink, ReactRouterEuiButton } from '../link_for_eui';
|
||||
import { mockHistory } from '../../../../lib/__mocks__/ut_router_history.mock';
|
||||
import { ReactRouterEuiLink, ReactRouterEuiButton } from './link_for_eui';
|
||||
import { mockHistory } from '../../../lib/__mocks__/ut_router_history.mock';
|
||||
|
||||
describe('EUI & React Router Component Helpers', () => {
|
||||
beforeEach(() => {
|
|
@ -5,16 +5,16 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { UptimeDatePicker } from '../uptime_date_picker';
|
||||
import { UptimeDatePicker } from './uptime_date_picker';
|
||||
import {
|
||||
renderWithRouter,
|
||||
shallowWithRouter,
|
||||
MountWithReduxProvider,
|
||||
mountWithRouterRedux,
|
||||
} from '../../../lib';
|
||||
import { UptimeStartupPluginsContextProvider } from '../../../contexts';
|
||||
import { startPlugins } from '../../../lib/__mocks__/uptime_plugin_start_mock';
|
||||
import { ClientPluginsStart } from '../../../apps/plugin';
|
||||
} from '../../lib';
|
||||
import { UptimeStartupPluginsContextProvider } from '../../contexts';
|
||||
import { startPlugins } from '../../lib/__mocks__/uptime_plugin_start_mock';
|
||||
import { ClientPluginsStart } from '../../apps/plugin';
|
||||
import { createMemoryHistory } from 'history';
|
||||
|
||||
describe('UptimeDatePicker component', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { ConfirmJobDeletion } from '../confirm_delete';
|
||||
import { ConfirmJobDeletion } from './confirm_delete';
|
||||
|
||||
describe('ML Confirm Job Delete', () => {
|
||||
it('shallow renders without errors', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { ShowLicenseInfo } from '../license_info';
|
||||
import { ShowLicenseInfo } from './license_info';
|
||||
import * as redux from 'react-redux';
|
||||
|
||||
describe('ShowLicenseInfo', () => {
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { MLFlyoutView } from '../ml_flyout';
|
||||
import { UptimeSettingsContext } from '../../../../contexts';
|
||||
import { CLIENT_DEFAULTS } from '../../../../../common/constants';
|
||||
import { MLFlyoutView } from './ml_flyout';
|
||||
import { UptimeSettingsContext } from '../../../contexts';
|
||||
import { CLIENT_DEFAULTS } from '../../../../common/constants';
|
||||
import * as redux from 'react-redux';
|
||||
|
||||
describe('ML Flyout component', () => {
|
|
@ -5,10 +5,10 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { MLIntegrationComponent } from '../ml_integeration';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../../lib';
|
||||
import { MLIntegrationComponent } from './ml_integeration';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import * as redux from 'react-redux';
|
||||
import { KibanaContextProvider } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { KibanaContextProvider } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
import { coreMock } from 'src/core/public/mocks';
|
||||
|
||||
const core = coreMock.createStart();
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import React from 'react';
|
||||
import { coreMock } from 'src/core/public/mocks';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../../lib';
|
||||
import { MLJobLink } from '../ml_job_link';
|
||||
import { KibanaContextProvider } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { MLJobLink } from './ml_job_link';
|
||||
import { KibanaContextProvider } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
|
||||
const core = coreMock.createStart();
|
||||
describe('ML JobLink', () => {
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
import React from 'react';
|
||||
import { coreMock } from 'src/core/public/mocks';
|
||||
import { ManageMLJobComponent } from '../manage_ml_job';
|
||||
import { ManageMLJobComponent } from './manage_ml_job';
|
||||
import * as redux from 'react-redux';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../../lib';
|
||||
import { KibanaContextProvider } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { KibanaContextProvider } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
|
||||
const core = coreMock.createStart();
|
||||
describe('Manage ML Job', () => {
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import React from 'react';
|
||||
import DateMath from '@elastic/datemath';
|
||||
import { MonitorCharts } from '../monitor_charts';
|
||||
import { shallowWithRouter } from '../../../lib';
|
||||
import { MonitorCharts } from './monitor_charts';
|
||||
import { shallowWithRouter } from '../../lib';
|
||||
|
||||
describe('MonitorCharts component', () => {
|
||||
let dateMathSpy: any;
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl, renderWithIntl } from '@kbn/test/jest';
|
||||
import { PingTimestamp } from '../ping_timestamp';
|
||||
import { mockReduxHooks } from '../../../../../lib/helper/test_helpers';
|
||||
import { Ping } from '../../../../../../common/runtime_types/ping';
|
||||
import { EuiThemeProvider } from '../../../../../../../observability/public';
|
||||
import { PingTimestamp } from './ping_timestamp';
|
||||
import { mockReduxHooks } from '../../../../lib/helper/test_helpers';
|
||||
import { Ping } from '../../../../../common/runtime_types/ping';
|
||||
import { EuiThemeProvider } from '../../../../../../observability/public';
|
||||
|
||||
mockReduxHooks();
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { DocLinkForBody } from '../doc_link_body';
|
||||
import { DocLinkForBody } from './doc_link_body';
|
||||
|
||||
describe('PingListExpandedRow', () => {
|
||||
it('renders expected elements for valid props', () => {
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import { mountWithIntl, renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { PingListExpandedRowComponent } from '../expanded_row';
|
||||
import { Ping } from '../../../../../common/runtime_types';
|
||||
import { DocLinkForBody } from '../doc_link_body';
|
||||
import { PingListExpandedRowComponent } from './expanded_row';
|
||||
import { Ping } from '../../../../common/runtime_types';
|
||||
import { DocLinkForBody } from './doc_link_body';
|
||||
|
||||
describe('PingListExpandedRow', () => {
|
||||
let ping: Ping;
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { PingHeaders } from '../headers';
|
||||
import { PingHeaders } from './headers';
|
||||
|
||||
describe('Ping Headers', () => {
|
||||
const headers = {
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { PingList } from '../ping_list';
|
||||
import { Ping, PingsResponse } from '../../../../../common/runtime_types';
|
||||
import { ExpandedRowMap } from '../../../overview/monitor_list/types';
|
||||
import { rowShouldExpand, toggleDetails } from '../columns/expand_row';
|
||||
import * as pingListHook from '../use_pings';
|
||||
import { mockReduxHooks } from '../../../../lib/helper/test_helpers';
|
||||
import { PingList } from './ping_list';
|
||||
import { Ping, PingsResponse } from '../../../../common/runtime_types';
|
||||
import { ExpandedRowMap } from '../../overview/monitor_list/types';
|
||||
import { rowShouldExpand, toggleDetails } from './columns/expand_row';
|
||||
import * as pingListHook from './use_pings';
|
||||
import { mockReduxHooks } from '../../../lib/helper/test_helpers';
|
||||
|
||||
mockReduxHooks();
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import { ResponseCodeColumn } from '../columns/response_code';
|
||||
import { ResponseCodeColumn } from './columns/response_code';
|
||||
|
||||
describe('ResponseCodeColumn', () => {
|
||||
const statusCode = '200';
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { AvailabilityReporting } from '../availability_reporting';
|
||||
import { StatusTag } from '../location_status_tags';
|
||||
import { AvailabilityReporting } from './availability_reporting';
|
||||
import { StatusTag } from './location_status_tags';
|
||||
|
||||
jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
|
||||
return {
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { MonitorLocation } from '../../../../../../common/runtime_types/monitor';
|
||||
import { LocationStatusTags } from '../index';
|
||||
import { mockMoment } from '../../../../../lib/helper/test_helpers';
|
||||
import { MonitorLocation } from '../../../../../common/runtime_types/monitor';
|
||||
import { LocationStatusTags } from './index';
|
||||
import { mockMoment } from '../../../../lib/helper/test_helpers';
|
||||
|
||||
mockMoment();
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { TagLabel } from '../tag_label';
|
||||
import { TagLabel } from './tag_label';
|
||||
|
||||
describe('TagLabel component', () => {
|
||||
it('shallow render correctly against snapshot', () => {
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { LocationAvailability } from '../location_availability';
|
||||
import { MonitorLocations } from '../../../../../../common/runtime_types';
|
||||
import { LocationMissingWarning } from '../../location_map/location_missing';
|
||||
import { LocationAvailability } from './location_availability';
|
||||
import { MonitorLocations } from '../../../../../common/runtime_types';
|
||||
import { LocationMissingWarning } from '../location_map/location_missing';
|
||||
|
||||
// Note For shallow test, we need absolute time strings
|
||||
describe('LocationAvailability component', () => {
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import lowPolyLayerFeatures from '../../low_poly_layer.json';
|
||||
import lowPolyLayerFeatures from '../low_poly_layer.json';
|
||||
|
||||
export const mockDownPointsLayer = {
|
||||
id: 'down_points',
|
|
@ -4,10 +4,10 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getLayerList } from '../map_config';
|
||||
import { getLayerList } from './map_config';
|
||||
import { mockLayerList } from './__mocks__/poly_layer_mock';
|
||||
import { LocationPoint } from '../embedded_map';
|
||||
import { UptimeAppColors } from '../../../../../../apps/uptime_app';
|
||||
import { LocationPoint } from './embedded_map';
|
||||
import { UptimeAppColors } from '../../../../../apps/uptime_app';
|
||||
|
||||
jest.mock('uuid', () => {
|
||||
return {
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { LocationMap } from '../location_map';
|
||||
import { LocationPoint } from '../embeddables/embedded_map';
|
||||
import { LocationMap } from './location_map';
|
||||
import { LocationPoint } from './embeddables/embedded_map';
|
||||
|
||||
// Note For shallow test, we need absolute time strings
|
||||
describe('LocationMap component', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { LocationMissingWarning } from '../location_missing';
|
||||
import { LocationMissingWarning } from './location_missing';
|
||||
|
||||
describe('LocationMissingWarning component', () => {
|
||||
it('shallow render correctly against snapshot', () => {
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
import moment from 'moment';
|
||||
import React from 'react';
|
||||
import { MonitorStatusBar } from '../status_bar';
|
||||
import { Ping } from '../../../../../common/runtime_types';
|
||||
import { MonitorStatusBar } from './status_bar';
|
||||
import { Ping } from '../../../../common/runtime_types';
|
||||
import * as redux from 'react-redux';
|
||||
import { renderWithRouter } from '../../../../lib';
|
||||
import { renderWithRouter } from '../../../lib';
|
||||
import { createMemoryHistory } from 'history';
|
||||
|
||||
describe('MonitorStatusBar component', () => {
|
|
@ -7,11 +7,11 @@
|
|||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
import { EuiIcon } from '@elastic/eui';
|
||||
import { Tls } from '../../../../../common/runtime_types';
|
||||
import { MonitorSSLCertificate } from '../status_bar';
|
||||
import { Tls } from '../../../../common/runtime_types';
|
||||
import { MonitorSSLCertificate } from './status_bar';
|
||||
import * as redux from 'react-redux';
|
||||
import { mountWithRouter, renderWithRouter, shallowWithRouter } from '../../../../lib';
|
||||
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../common/constants';
|
||||
import { mountWithRouter, renderWithRouter, shallowWithRouter } from '../../../lib';
|
||||
import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../common/constants';
|
||||
|
||||
describe('SSL Certificate component', () => {
|
||||
let monitorTls: Tls;
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { MonitorLocation } from '../../../../../common/runtime_types';
|
||||
import { StatusByLocations } from '../index';
|
||||
import { MonitorLocation } from '../../../../common/runtime_types';
|
||||
import { StatusByLocations } from './index';
|
||||
|
||||
describe('StatusByLocation component', () => {
|
||||
let monitorLocations: MonitorLocation[];
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { BrowserExpandedRowComponent } from '../browser_expanded_row';
|
||||
import { Ping } from '../../../../../common/runtime_types';
|
||||
import { BrowserExpandedRowComponent } from './browser_expanded_row';
|
||||
import { Ping } from '../../../../common/runtime_types';
|
||||
|
||||
describe('BrowserExpandedRowComponent', () => {
|
||||
let defStep: Ping;
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { ConsoleEvent } from '../console_event';
|
||||
import { ConsoleEvent } from './console_event';
|
||||
|
||||
describe('ConsoleEvent component', () => {
|
||||
it('renders danger color for errors', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { ConsoleOutputEventList } from '../console_output_event_list';
|
||||
import { ConsoleOutputEventList } from './console_output_event_list';
|
||||
|
||||
describe('ConsoleOutputEventList component', () => {
|
||||
it('renders a component per console event', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { EmptyJourney } from '../empty_journey';
|
||||
import { EmptyJourney } from './empty_journey';
|
||||
|
||||
describe('EmptyJourney component', () => {
|
||||
it('omits check group element when undefined', () => {
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { ExecutedJourney } from '../executed_journey';
|
||||
import { Ping } from '../../../../../common/runtime_types';
|
||||
import { ExecutedJourney } from './executed_journey';
|
||||
import { Ping } from '../../../../common/runtime_types';
|
||||
|
||||
const MONITOR_BOILERPLATE = {
|
||||
id: 'MON_ID',
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { ExecutedStep } from '../executed_step';
|
||||
import { Ping } from '../../../../../common/runtime_types';
|
||||
import { mountWithRouter } from '../../../../lib';
|
||||
import { ExecutedStep } from './executed_step';
|
||||
import { Ping } from '../../../../common/runtime_types';
|
||||
import { mountWithRouter } from '../../../lib';
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/85899
|
||||
describe.skip('ExecutedStep', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { StatusBadge } from '../status_badge';
|
||||
import { StatusBadge } from './status_badge';
|
||||
|
||||
describe('StatusBadge', () => {
|
||||
it('displays success message', () => {
|
|
@ -8,12 +8,12 @@ import { ChromeBreadcrumb } from 'kibana/public';
|
|||
import React from 'react';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { of } from 'rxjs';
|
||||
import { MountWithReduxProvider, mountWithRouter } from '../../../../../lib';
|
||||
import { KibanaContextProvider } from '../../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { useMonitorBreadcrumb } from '../use_monitor_breadcrumb';
|
||||
import { OVERVIEW_ROUTE } from '../../../../../../common/constants';
|
||||
import { Ping } from '../../../../../../common/runtime_types/ping';
|
||||
import { JourneyState } from '../../../../../state/reducers/journey';
|
||||
import { MountWithReduxProvider, mountWithRouter } from '../../../../lib';
|
||||
import { KibanaContextProvider } from '../../../../../../../../src/plugins/kibana_react/public';
|
||||
import { useMonitorBreadcrumb } from './use_monitor_breadcrumb';
|
||||
import { OVERVIEW_ROUTE } from '../../../../../common/constants';
|
||||
import { Ping } from '../../../../../common/runtime_types/ping';
|
||||
import { JourneyState } from '../../../../state/reducers/journey';
|
||||
|
||||
describe('useMonitorBreadcrumbs', () => {
|
||||
it('sets the given breadcrumbs', () => {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { shallowWithIntl, mountWithIntl } from '@kbn/test/jest';
|
||||
import React from 'react';
|
||||
import { StepScreenshotDisplay } from '../step_screenshot_display';
|
||||
import { StepScreenshotDisplay } from './step_screenshot_display';
|
||||
|
||||
jest.mock('react-use/lib/useIntersection', () => () => ({
|
||||
isIntersecting: true,
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue