[Uptime] remove extra response body docs external link icon (#99064)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Dominique Clarke 2021-05-12 11:05:28 -04:00 committed by GitHub
parent 497cc5a8e8
commit e2e046850a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 34 deletions

View file

@ -1,25 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`PingListExpandedRow renders expected elements for valid props 1`] = `
<EuiText>
<FormattedMessage
defaultMessage="Body not recorded. Read our {docsLink} for more information on recording response bodies."
id="xpack.uptime.pingList.expandedRow.response_body.notRecorded"
values={
Object {
"docsLink": <EuiLink
href="https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#monitor-http-response"
target="_blank"
>
docs
 
<EuiIcon
size="s"
type="popout"
/>
</EuiLink>,
}
}
/>
</EuiText>
`;

View file

@ -174,10 +174,7 @@ exports[`PingListExpandedRow renders link to docs if body is not recorded but it
rel="noopener"
target="_blank"
>
docs 
<span
data-euiicon-type="popout"
/>
docs
<span
aria-label="External link"
class="euiLink__externalIcon"

View file

@ -5,12 +5,19 @@
* 2.0.
*/
import { shallowWithIntl } from '@kbn/test/jest';
import React from 'react';
import { screen } from '@testing-library/react';
import { render } from '../../../lib/helper/rtl_helpers';
import { DocLinkForBody } from './doc_link_body';
describe('PingListExpandedRow', () => {
it('renders expected elements for valid props', () => {
expect(shallowWithIntl(<DocLinkForBody />)).toMatchSnapshot();
render(<DocLinkForBody />);
expect(screen.getByText(/Body not recorded. Read our/));
expect(
screen.getByRole('link', { name: 'docs External link (opens in a new tab or window)' })
).toBeInTheDocument();
expect(screen.getByText(/for more information on recording response bodies./));
});
});

View file

@ -8,7 +8,7 @@
import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { EuiIcon, EuiLink, EuiText } from '@elastic/eui';
import { EuiLink, EuiText } from '@elastic/eui';
const bodyDocsLink =
'https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#monitor-http-response';
@ -20,8 +20,6 @@ export const DocLinkForBody = () => {
defaultMessage: 'docs',
description: 'Docs link to set response body',
})}
&nbsp;
<EuiIcon size="s" type="popout" />
</EuiLink>
);