diff --git a/x-pack/package.json b/x-pack/package.json index 47220b20cfc99..52420d236edf6 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -256,6 +256,7 @@ "react-shortcuts": "^2.0.0", "react-sticky": "^6.0.3", "react-syntax-highlighter": "^5.7.0", + "react-testing-library": "^6.0.0", "react-vis": "^1.8.1", "recompose": "^0.26.0", "reduce-reducers": "^0.4.3", diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx index 7d51ba9b1184b..3e6b8a6f2bac3 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/index.tsx @@ -5,15 +5,13 @@ */ import { connect } from 'react-redux'; -import { getServiceDetails } from 'x-pack/plugins/apm/public/store/reactReduxRequest/serviceDetails'; import { IReduxState } from 'x-pack/plugins/apm/public/store/rootReducer'; import { selectIsMLAvailable } from 'x-pack/plugins/apm/public/store/selectors/license'; import { ServiceIntegrationsView } from './view'; function mapStateToProps(state = {} as IReduxState) { return { - mlAvailable: selectIsMLAvailable(state), - serviceDetails: getServiceDetails(state).data + mlAvailable: selectIsMLAvailable(state) }; } diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/view.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/view.tsx index 8e701679fc719..336f1b1065ba1 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/view.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/ServiceIntegrations/view.tsx @@ -22,9 +22,7 @@ import { WatcherFlyout } from './WatcherFlyout'; export interface ServiceIntegrationProps { mlAvailable: boolean; location: Location; - serviceDetails: { - types: string[]; - }; + transactionTypes: string[]; urlParams: IUrlParams; } interface ServiceIntegrationState { diff --git a/x-pack/plugins/apm/public/components/app/ServiceDetails/view.tsx b/x-pack/plugins/apm/public/components/app/ServiceDetails/view.tsx index 799fa4cdb7e44..5b543f6b02223 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceDetails/view.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceDetails/view.tsx @@ -7,52 +7,55 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui'; import { Location } from 'history'; import React from 'react'; -import { ServiceDetailsRequest } from 'x-pack/plugins/apm/public/store/reactReduxRequest/serviceDetails'; import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams'; +import { useFetcher } from '../../../hooks/useFetcher'; +import { loadServiceDetails } from '../../../services/rest/apm/services'; // @ts-ignore import { FilterBar } from '../../shared/FilterBar'; import { ServiceDetailTabs } from './ServiceDetailTabs'; import { ServiceIntegrations } from './ServiceIntegrations'; -interface ServiceDetailsProps { +interface Props { urlParams: IUrlParams; location: Location; } -export class ServiceDetailsView extends React.Component { - public render() { - const { urlParams, location } = this.props; - return ( - - - - -

{urlParams.serviceName}

-
-
- - - -
- - - - - - ( - - )} - /> -
- ); +export function ServiceDetailsView({ urlParams, location }: Props) { + const { serviceName, start, end, kuery } = urlParams; + const { data: serviceDetailsData } = useFetcher(loadServiceDetails, [ + { serviceName, start, end, kuery } + ]); + + if (!serviceDetailsData) { + return null; } + + return ( + + + + +

{urlParams.serviceName}

+
+
+ + + +
+ + + + + + +
+ ); } diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx index 0d9dd1ed1381f..8bb29b285e097 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx @@ -16,7 +16,7 @@ import { asDecimal, asMillis } from '../../../../utils/formatters'; import { ITableColumn, ManagedTable } from '../../../shared/ManagedTable'; interface Props { - items: IServiceListItem[]; + items?: IServiceListItem[]; noItemsMessage?: React.ReactNode; } diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.js b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.js deleted file mode 100644 index 2a6d3f8e5fd2e..0000000000000 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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 React from 'react'; -import { shallow } from 'enzyme'; -import { ServiceOverview } from '../view'; -import { STATUS } from '../../../../constants'; -import * as apmRestServices from '../../../../services/rest/apm/status_check'; -jest.mock('../../../../services/rest/apm/status_check'); - -describe('Service Overview -> View', () => { - let mockAgentStatus; - let wrapper; - let instance; - - beforeEach(() => { - mockAgentStatus = { - dataFound: true - }; - - apmRestServices.loadAgentStatus = jest.fn(() => - Promise.resolve(mockAgentStatus) - ); - - wrapper = shallow(); - instance = wrapper.instance(); - }); - - it('should render when historical data is found', () => { - expect(wrapper).toMatchSnapshot(); - const List = wrapper - .find('ServiceListRequest') - .props() - .render({}); - expect(List.props).toMatchSnapshot(); - }); - - it('should render when historical data is not found', () => { - wrapper.setState({ historicalDataFound: false }); - expect(wrapper).toMatchSnapshot(); - const List = wrapper - .find('ServiceListRequest') - .props() - .render({}); - expect(List.props).toMatchSnapshot(); - }); - - it('should check for historical data once', () => {}); - - describe('checking for historical data', () => { - it('should set historical data to true if data is found', async () => { - const props = { - serviceList: { - status: STATUS.SUCCESS, - data: [] - } - }; - await instance.checkForHistoricalData(props); - expect(wrapper.state('historicalDataFound')).toEqual(true); - }); - - it('should set historical data state to false if data is NOT found', async () => { - const props = { - serviceList: { - status: STATUS.SUCCESS, - data: [] - } - }; - mockAgentStatus.dataFound = false; - await instance.checkForHistoricalData(props); - expect(wrapper.state('historicalDataFound')).toEqual(false); - }); - }); -}); diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.tsx b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.tsx new file mode 100644 index 0000000000000..a82be56866e39 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/ServiceOverview.test.tsx @@ -0,0 +1,132 @@ +/* + * 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 React from 'react'; +import { Provider } from 'react-redux'; +import { render, wait, waitForElement } from 'react-testing-library'; +import 'react-testing-library/cleanup-after-each'; +import * as apmRestServices from 'x-pack/plugins/apm/public/services/rest/apm/services'; +// @ts-ignore +import configureStore from 'x-pack/plugins/apm/public/store/config/configureStore'; +import * as statusCheck from '../../../../services/rest/apm/status_check'; +import { ServiceOverview } from '../view'; + +function Comp() { + const store = configureStore(); + + return ( + + + + ); +} + +describe('Service Overview -> View', () => { + afterEach(() => { + jest.resetAllMocks(); + }); + + // Suppress warnings about "act" until async/await syntax is supported: https://github.com/facebook/react/issues/14769 + /* tslint:disable:no-console */ + const originalError = console.error; + beforeAll(() => { + console.error = jest.fn(); + }); + afterAll(() => { + console.error = originalError; + }); + + it('should render services, when list is not empty', async () => { + // mock rest requests + const spy1 = jest + .spyOn(statusCheck, 'loadAgentStatus') + .mockResolvedValue(true); + const spy2 = jest + .spyOn(apmRestServices, 'loadServiceList') + .mockResolvedValue([ + { + serviceName: 'My Python Service', + agentName: 'python', + transactionsPerMinute: 100, + errorsPerMinute: 200, + avgResponseTime: 300 + }, + { + serviceName: 'My Go Service', + agentName: 'go', + transactionsPerMinute: 400, + errorsPerMinute: 500, + avgResponseTime: 600 + } + ]); + + const { container, getByText } = render(); + + // wait for requests to be made + await wait( + () => + expect(spy1).toHaveBeenCalledTimes(1) && + expect(spy2).toHaveBeenCalledTimes(1) + ); + + await waitForElement(() => getByText('My Python Service')); + + expect(container.querySelectorAll('.euiTableRow')).toMatchSnapshot(); + }); + + it('should render getting started message, when list is empty and no historical data is found', async () => { + // mock rest requests + const spy1 = jest + .spyOn(statusCheck, 'loadAgentStatus') + .mockResolvedValue(false); + + const spy2 = jest + .spyOn(apmRestServices, 'loadServiceList') + .mockResolvedValue([]); + + const { container, getByText } = render(); + + // wait for requests to be made + await wait( + () => + expect(spy1).toHaveBeenCalledTimes(1) && + expect(spy2).toHaveBeenCalledTimes(1) + ); + + // wait for elements to be rendered + await waitForElement(() => + getByText( + "Looks like you don't have any APM services installed. Let's add some!" + ) + ); + + expect(container.querySelectorAll('.euiTableRow')).toMatchSnapshot(); + }); + + it('should render empty message, when list is empty and historical data is found', async () => { + // mock rest requests + const spy1 = jest + .spyOn(statusCheck, 'loadAgentStatus') + .mockResolvedValue(true); + const spy2 = jest + .spyOn(apmRestServices, 'loadServiceList') + .mockResolvedValue([]); + + const { container, getByText } = render(); + + // wait for requests to be made + await wait( + () => + expect(spy1).toHaveBeenCalledTimes(1) && + expect(spy2).toHaveBeenCalledTimes(1) + ); + + // wait for elements to be rendered + await waitForElement(() => getByText('No services found')); + + expect(container.querySelectorAll('.euiTableRow')).toMatchSnapshot(); + }); +}); diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.js.snap b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.js.snap deleted file mode 100644 index a08ba5312ba5c..0000000000000 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.js.snap +++ /dev/null @@ -1,43 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Service Overview -> View should render when historical data is found 1`] = ` - - - -`; - -exports[`Service Overview -> View should render when historical data is found 2`] = ` -Object { - "items": Array [], - "noItemsMessage": , -} -`; - -exports[`Service Overview -> View should render when historical data is not found 1`] = ` - - - -`; - -exports[`Service Overview -> View should render when historical data is not found 2`] = ` -Object { - "items": Array [], - "noItemsMessage": , -} -`; diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap new file mode 100644 index 0000000000000..1a4b300f746c4 --- /dev/null +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/ServiceOverview.test.tsx.snap @@ -0,0 +1,296 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Service Overview -> View should render list data is found 1`] = ` +NodeList [ + + +
+ Name +
+ + + +
+ Agent +
+
+ go +
+ + +
+ Avg. response time +
+
+ 1 ms +
+ + +
+ Trans. per minute +
+
+ 400.0 tpm +
+ + +
+ Errors per minute +
+
+ 500.0 err. +
+ + , + + +
+ Name +
+ + + +
+ Agent +
+
+ python +
+ + +
+ Avg. response time +
+
+ 0 ms +
+ + +
+ Trans. per minute +
+
+ 100.0 tpm +
+ + +
+ Errors per minute +
+
+ 200.0 err. +
+ + , +] +`; + +exports[`Service Overview -> View should render message when list is empty and historical data is found 1`] = ` +NodeList [ + + +
+ +
+ +
+ No services found +
+
+ +
+
+
+ + , +] +`; + +exports[`Service Overview -> View should render message when list is empty and no historical data is found 1`] = ` +NodeList [ + + +
+ +
+ +
+ Looks like you don't have any APM services installed. Let's add some! +
+
+
+

+ Upgrading from a pre-7.x version? Make sure you've also upgraded + your APM server instance(s) to at least 7.0. +

+

+ You may also have old data that needs to be migrated. + + + Learn more by visiting the Kibana Upgrade Assistant + + . +

+
+ + + + , +] +`; diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/index.ts b/x-pack/plugins/apm/public/components/app/ServiceOverview/index.ts index 7e2ec20677c3d..378bf3118886a 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/index.ts +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/index.ts @@ -5,14 +5,12 @@ */ import { connect } from 'react-redux'; -import { getServiceList } from 'x-pack/plugins/apm/public/store/reactReduxRequest/serviceList'; import { IReduxState } from 'x-pack/plugins/apm/public/store/rootReducer'; import { getUrlParams } from 'x-pack/plugins/apm/public/store/urlParams'; import { ServiceOverview as View } from './view'; function mapStateToProps(state = {} as IReduxState) { return { - serviceList: getServiceList(state), urlParams: getUrlParams(state) }; } diff --git a/x-pack/plugins/apm/public/components/app/ServiceOverview/view.tsx b/x-pack/plugins/apm/public/components/app/ServiceOverview/view.tsx index 1c11b5deff8b4..45bf3b820ec20 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceOverview/view.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceOverview/view.tsx @@ -5,59 +5,31 @@ */ import { EuiPanel } from '@elastic/eui'; -import React, { Component } from 'react'; -import { RRRRenderResponse } from 'react-redux-request'; +import React from 'react'; import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams'; -import { IServiceListItem } from 'x-pack/plugins/apm/server/lib/services/get_services'; +import { useFetcher } from '../../../hooks/useFetcher'; +import { loadServiceList } from '../../../services/rest/apm/services'; import { loadAgentStatus } from '../../../services/rest/apm/status_check'; -import { ServiceListRequest } from '../../../store/reactReduxRequest/serviceList'; import { NoServicesMessage } from './NoServicesMessage'; import { ServiceList } from './ServiceList'; interface Props { urlParams: IUrlParams; - serviceList: RRRRenderResponse; } -interface State { - // any data submitted from APM agents found (not just in the given time range) - historicalDataFound: boolean; -} - -export class ServiceOverview extends Component { - public state = { historicalDataFound: true }; - - public async checkForHistoricalData() { - const result = await loadAgentStatus(); - this.setState({ historicalDataFound: result.dataFound }); - } - - public componentDidMount() { - this.checkForHistoricalData(); - } - - public render() { - const { urlParams } = this.props; - - // Render method here uses this.props.serviceList instead of received "data" from RRR - // to make it easier to test -- mapStateToProps uses the RRR selector so the data - // is the same either way - return ( - - ( - - } - /> - )} - /> - - ); - } +export function ServiceOverview({ urlParams }: Props) { + const { start, end, kuery } = urlParams; + const { data: agentStatus = true } = useFetcher(loadAgentStatus, []); + const { data: serviceListData } = useFetcher(loadServiceList, [ + { start, end, kuery } + ]); + + return ( + + } + /> + + ); } diff --git a/x-pack/plugins/apm/public/services/rest/apm/status_check.ts b/x-pack/plugins/apm/public/services/rest/apm/status_check.ts index 30fe628d8e7f4..0c6b660930b41 100644 --- a/x-pack/plugins/apm/public/services/rest/apm/status_check.ts +++ b/x-pack/plugins/apm/public/services/rest/apm/status_check.ts @@ -13,7 +13,9 @@ export async function loadServerStatus() { } export async function loadAgentStatus() { - return callApi<{ dataFound: boolean }>({ + const res = await callApi<{ dataFound: boolean }>({ pathname: `/api/apm/status/agent` }); + + return res.dataFound; } diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/__jest__/serviceList.test.js b/x-pack/plugins/apm/public/store/reactReduxRequest/__jest__/serviceList.test.js deleted file mode 100644 index b45d3bbc76b1c..0000000000000 --- a/x-pack/plugins/apm/public/store/reactReduxRequest/__jest__/serviceList.test.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 React from 'react'; -import * as rest from '../../../services/rest/apm/services'; -import { getServiceList, ServiceListRequest } from '../serviceList'; -import { mountWithStore } from '../../../utils/testHelpers'; - -describe('serviceList', () => { - describe('getServiceList', () => { - it('should return default value when empty', () => { - const state = { reactReduxRequest: {}, sorting: { service: {} } }; - expect(getServiceList(state)).toEqual({ data: [] }); - }); - - it('should return serviceList when not empty', () => { - const state = { - reactReduxRequest: { serviceList: { data: [{ foo: 'bar' }] } }, - sorting: { service: {} } - }; - expect(getServiceList(state)).toEqual({ data: [{ foo: 'bar' }] }); - }); - }); - - describe('ServiceListRequest', () => { - let loadSpy; - let renderSpy; - let wrapper; - - beforeEach(() => { - const state = { - reactReduxRequest: { - serviceList: { status: 'my-status', data: [{ foo: 'bar' }] } - }, - sorting: { service: {} } - }; - - loadSpy = jest.spyOn(rest, 'loadServiceList').mockReturnValue(); - renderSpy = jest.fn().mockReturnValue(
rendered
); - - wrapper = mountWithStore( - , - state - ); - }); - - it('should call render method', () => { - expect(renderSpy).toHaveBeenCalledWith({ - data: [{ foo: 'bar' }], - status: 'my-status' - }); - }); - - it('should call "loadServiceList"', () => { - expect(loadSpy).toHaveBeenCalledWith({ - start: 'myStart', - end: 'myEnd' - }); - }); - - it('should render component', () => { - expect(wrapper.html()).toEqual('
rendered
'); - }); - }); -}); diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/serviceDetails.tsx b/x-pack/plugins/apm/public/store/reactReduxRequest/serviceDetails.tsx deleted file mode 100644 index 274f620c7f933..0000000000000 --- a/x-pack/plugins/apm/public/store/reactReduxRequest/serviceDetails.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { first, get } from 'lodash'; -import React from 'react'; -import { Request, RRRRender } from 'react-redux-request'; -import { IUrlParams } from 'x-pack/plugins/apm/public/store/urlParams'; -import { ServiceAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_service'; -import { loadServiceDetails } from '../../services/rest/apm/services'; -import { IReduxState } from '../rootReducer'; -import { createInitialDataSelector } from './helpers'; - -const ID = 'serviceDetails'; -const INITIAL_DATA = { types: [] }; -const withInitialData = createInitialDataSelector(INITIAL_DATA); - -export function getServiceDetails(state: IReduxState) { - return withInitialData(state.reactReduxRequest[ID]); -} - -export function getDefaultTransactionType(state: IReduxState) { - const types: string[] = get(state.reactReduxRequest[ID], 'data.types'); - return first(types); -} - -export function ServiceDetailsRequest({ - urlParams, - render -}: { - urlParams: IUrlParams; - render: RRRRender; -}) { - const { serviceName, start, end, kuery } = urlParams; - - if (!(serviceName && start && end)) { - return null; - } - - return ( - - ); -} diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/serviceList.tsx b/x-pack/plugins/apm/public/store/reactReduxRequest/serviceList.tsx deleted file mode 100644 index 22ea86e906502..0000000000000 --- a/x-pack/plugins/apm/public/store/reactReduxRequest/serviceList.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 React from 'react'; -import { Request, RRRRender, RRRRenderResponse } from 'react-redux-request'; -import { ServiceListAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_services'; -import { loadServiceList } from '../../services/rest/apm/services'; -import { IReduxState } from '../rootReducer'; -import { IUrlParams } from '../urlParams'; -import { createInitialDataSelector } from './helpers'; - -const ID = 'serviceList'; -const INITIAL_DATA: ServiceListAPIResponse = []; -const withInitialData = createInitialDataSelector( - INITIAL_DATA -); - -export function getServiceList( - state: IReduxState -): RRRRenderResponse { - return withInitialData(state.reactReduxRequest[ID]); -} - -export function ServiceListRequest({ - urlParams, - render -}: { - urlParams: IUrlParams; - render: RRRRender; -}) { - const { start, end, kuery } = urlParams; - - if (!(start && end)) { - return null; - } - - return ( - - ); -} diff --git a/x-pack/plugins/apm/public/store/urlParams.ts b/x-pack/plugins/apm/public/store/urlParams.ts index 9b15c994e283c..27cb3ea616913 100644 --- a/x-pack/plugins/apm/public/store/urlParams.ts +++ b/x-pack/plugins/apm/public/store/urlParams.ts @@ -13,7 +13,6 @@ import { toQuery } from '../components/shared/Links/url_helpers'; import { LOCATION_UPDATE } from './location'; -import { getDefaultTransactionType } from './reactReduxRequest/serviceDetails'; import { getDefaultDistributionSample } from './reactReduxRequest/transactionDistribution'; import { IReduxState } from './rootReducer'; @@ -189,20 +188,7 @@ export function updateTimePicker(time: TimeUpdate) { // Selectors export const getUrlParams = createSelector( (state: IReduxState) => state.urlParams, - getDefaultTransactionType, - getDefaultDistributionSample, - ( - urlParams, - transactionType: string, - { traceId, transactionId } - ): IUrlParams => { - return { - transactionType, - transactionId, - traceId, - ...urlParams - }; - } + urlParams => urlParams ); export interface IUrlParams { diff --git a/yarn.lock b/yarn.lock index 4f238c9ecc5a7..e9e3e19408570 100644 --- a/yarn.lock +++ b/yarn.lock @@ -741,6 +741,13 @@ dependencies: regenerator-runtime "^0.12.0" +"@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" + integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g== + dependencies: + regenerator-runtime "^0.12.0" + "@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" @@ -1105,6 +1112,11 @@ dependencies: url-pattern "^1.0.3" +"@sheerun/mutationobserver-shim@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b" + integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q== + "@sindresorhus/is@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" @@ -8348,6 +8360,16 @@ dom-serializer@0, dom-serializer@~0.1.0: domelementtype "^1.3.0" entities "^1.1.1" +dom-testing-library@^3.13.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/dom-testing-library/-/dom-testing-library-3.17.1.tgz#3291bc3cf68c555ba5e663697ee77d604aaa122b" + integrity sha512-SbkaRfQvuLjnv+xFgSo/cmKoN9tjBL6Rh1f3nQH9jnjUe5q+keRwacYSi3uSpcB4D1K768iavCayKH3ZN9ea+g== + dependencies: + "@babel/runtime" "^7.3.4" + "@sheerun/mutationobserver-shim" "^0.3.2" + pretty-format "^24.0.0" + wait-for-expect "^1.1.0" + dom-walk@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" @@ -19402,6 +19424,14 @@ react-test-renderer@^16.0.0-0, react-test-renderer@^16.8.0: react-is "^16.8.2" scheduler "^0.13.2" +react-testing-library@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-6.0.0.tgz#81edfcfae8a795525f48685be9bf561df45bb35d" + integrity sha512-h0h+YLe4KWptK6HxOMnoNN4ngu3W8isrwDmHjPC5gxc+nOZOCurOvbKVYCvvuAw91jdO7VZSm/5KR7TxKnz0qA== + dependencies: + "@babel/runtime" "^7.3.1" + dom-testing-library "^3.13.1" + react-textarea-autosize@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-7.0.4.tgz#4e4be649b544a88713e7b5043f76950f35d3d503" @@ -24583,6 +24613,11 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" +wait-for-expect@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.1.0.tgz#6607375c3f79d32add35cd2c87ce13f351a3d453" + integrity sha512-vQDokqxyMyknfX3luCDn16bSaRcOyH6gGuUXMIbxBLeTo6nWuEWYqMTT9a+44FmW8c2m6TRWBdNvBBjA1hwEKg== + walk@2.3.x: version "2.3.9" resolved "https://registry.yarnpkg.com/walk/-/walk-2.3.9.tgz#31b4db6678f2ae01c39ea9fb8725a9031e558a7b"