Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic authored Apr 12, 2019
1 parent 181ce0f commit 3b37b25
Show file tree
Hide file tree
Showing 64 changed files with 1,838 additions and 1,681 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/uptime/common/domain_types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/

export * from './pings';
export * from './monitors';

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { ErrorListItem } from '../../../../common/graphql/types';
import { ErrorList } from '../error_list';
import { ErrorListComponent } from '../error_list';

describe('ErrorList component', () => {
let getErrorListResponse: { errorList: ErrorListItem[] };
Expand Down Expand Up @@ -57,7 +57,7 @@ describe('ErrorList component', () => {

it('renders the error list without errors', () => {
const { errorList } = getErrorListResponse;
const component = shallowWithIntl(<ErrorList loading={false} errorList={errorList} />);
const component = shallowWithIntl(<ErrorListComponent loading={false} data={{ errorList }} />);
expect(component).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { FilterBar } from '../filter_bar';
import { FilterBarComponent } from '../filter_bar';

describe('FilterBar component', () => {
const data = {
Expand All @@ -28,10 +28,17 @@ describe('FilterBar component', () => {
schemes: ['tcp', 'http'],
},
};
let currentQuery;

it('renders the component without errors', () => {
currentQuery = undefined;
const component = shallowWithIntl(
<FilterBar filterBar={data.filterBar} updateQuery={jest.fn()} />
<FilterBarComponent
currentQuery={currentQuery}
data={data}
loading={false}
updateQuery={jest.fn()}
/>
);
expect(component).toMatchSnapshot();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

import React from 'react';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import { MonitorCharts } from '../monitor_charts';
import { MonitorChartsComponent } from '../monitor_charts';
import { MonitorChart } from '../../../../common/graphql/types';

describe('MonitorCharts component', () => {
const chartResponse = {
const chartResponse: { monitorChartsData: MonitorChart } = {
monitorChartsData: {
durationArea: [
{ x: 1548697620000, yMin: 106421, yMax: 3120392 },
Expand Down Expand Up @@ -57,11 +58,10 @@ describe('MonitorCharts component', () => {

it('renders the component without errors', () => {
const component = shallowWithIntl(
<MonitorCharts
checkDomainLimits={[0, 75]}
<MonitorChartsComponent
danger="dangerColor"
durationDomainLimits={[0, 75]}
monitorChartsData={chartResponse.monitorChartsData}
data={{ monitorChartsData: chartResponse.monitorChartsData }}
loading={false}
mean="mean"
range="range"
success="success"
Expand Down
Loading

0 comments on commit 3b37b25

Please sign in to comment.