diff --git a/x-pack/plugins/uptime/common/graphql/types.ts b/x-pack/plugins/uptime/common/graphql/types.ts index 7ef05699d121c2..c8beb91d807d56 100644 --- a/x-pack/plugins/uptime/common/graphql/types.ts +++ b/x-pack/plugins/uptime/common/graphql/types.ts @@ -299,6 +299,18 @@ export interface Resolve { rtt?: Duration | null; } +export interface Socks5 { + rtt?: Rtt | null; +} + +export interface Rtt { + connect?: Duration | null; + + handshake?: Duration | null; + + validate?: Duration | null; +} + export interface Summary { up?: number | null; @@ -319,18 +331,6 @@ export interface Location { lon?: number | null; } -export interface Socks5 { - rtt?: Rtt | null; -} - -export interface Rtt { - connect?: Duration | null; - - handshake?: Duration | null; - - validate?: Duration | null; -} - export interface Tcp { port?: number | null; @@ -411,21 +411,7 @@ export interface State { monitor?: MonitorState | null; - summary: { - up?: number | null; - - down?: number | null; - - geo?: { - name?: string | null; - - location?: { - lat?: number | null; - - lon?: number | null; - } | null; - } | null; - }; + summary: Summary; timestamp: UnsignedInteger; /** Transport encryption information. */ diff --git a/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_status.bar.test.tsx.snap b/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_status.bar.test.tsx.snap deleted file mode 100644 index 17588ae53ed00d..00000000000000 --- a/x-pack/plugins/uptime/public/components/functional/__tests__/__snapshots__/monitor_status.bar.test.tsx.snap +++ /dev/null @@ -1,55 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`MonitorStatusBar component renders duration in ms, not us 1`] = ` -
-
-
-

- Up in 2 Locations -

-
-
-
- -
-
- -

- id1 -

-
-
-
-
-
-`; diff --git a/x-pack/plugins/uptime/public/components/functional/charts/__tests__/chart_empty_state.test.tsx b/x-pack/plugins/uptime/public/components/functional/charts/__tests__/chart_empty_state.test.tsx new file mode 100644 index 00000000000000..2e25dddc0b4edf --- /dev/null +++ b/x-pack/plugins/uptime/public/components/functional/charts/__tests__/chart_empty_state.test.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { ChartEmptyState } from '../chart_empty_state'; +import { shallowWithIntl } from 'test_utils/enzyme_helpers'; +import React from 'react'; +import { FormattedMessage } from '@kbn/i18n/react'; + +describe('ChartEmptyState', () => { + it('renders string values', () => { + expect( + shallowWithIntl() + ).toMatchSnapshot(); + }); + + it('renders JSX values', () => { + expect( + shallowWithIntl( + down }} + /> + } + title={} + /> + ) + ).toMatchSnapshot(); + }); +}); diff --git a/x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/__snapshots__/monitor_status.bar.test.tsx.snap b/x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/__snapshots__/monitor_status_bar.test.tsx.snap similarity index 100% rename from x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/__snapshots__/monitor_status.bar.test.tsx.snap rename to x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/__snapshots__/monitor_status_bar.test.tsx.snap diff --git a/x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/monitor_status.bar.test.tsx b/x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/monitor_status_bar.test.tsx similarity index 100% rename from x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/monitor_status.bar.test.tsx rename to x-pack/plugins/uptime/public/components/functional/monitor_status_details/__test__/monitor_status_bar.test.tsx