forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Fix focus map link on service map (elastic#73338) (elastic#73360)
The link was including `serviceName` from the `urlParams` so it was linking to the wrong service. Overwrite the service name so the link is correct. Fixes elastic#72911.
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
x-pack/plugins/apm/public/components/app/ServiceMap/Popover/Buttons.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 { Buttons } from './Buttons'; | ||
import { render } from '@testing-library/react'; | ||
|
||
describe('Popover Buttons', () => { | ||
it('renders', () => { | ||
expect(() => | ||
render(<Buttons selectedNodeServiceName="test service name" />) | ||
).not.toThrowError(); | ||
}); | ||
|
||
it('handles focus click', async () => { | ||
const onFocusClick = jest.fn(); | ||
const result = render( | ||
<Buttons | ||
onFocusClick={onFocusClick} | ||
selectedNodeServiceName="test service name" | ||
/> | ||
); | ||
const focusButton = await result.findByText('Focus map'); | ||
|
||
focusButton.click(); | ||
|
||
expect(onFocusClick).toHaveBeenCalledTimes(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters