Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
roots: [`${rootDir}/common`, `${rootDir}/public`, `${rootDir}/server`],
collectCoverage: true,
collectCoverageFrom: [
...(jestConfig.collectCoverageFrom ?? []),
...(jestConfig.collectCoverageFrom || []),
'**/*.{js,mjs,jsx,ts,tsx}',
'!**/*.stories.{js,mjs,ts,tsx}',
'!**/dev_docs/**',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {
getSelectOptions,
replaceTemplateVariables,
} from '../CustomLinkFlyout/helper';
} from '../CreateEditCustomLinkFlyout/helper';
import { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction';

describe('Custom link helper', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface Props {

const filtersEmptyState: Filter[] = [{ key: '', value: '' }];

export function CustomLinkFlyout({
export function CreateEditCustomLinkFlyout({
onClose,
onSave,
onDelete,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
import { LinkPreview } from '../CustomLinkFlyout/LinkPreview';
import { LinkPreview } from '../CreateEditCustomLinkFlyout/LinkPreview';
import {
render,
getNodeText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
expectTextsInDocument,
expectTextsNotInDocument,
} from '../../../../../utils/testHelpers';
import * as saveCustomLink from './CustomLinkFlyout/saveCustomLink';
import * as saveCustomLink from './CreateEditCustomLinkFlyout/saveCustomLink';
import { MockApmPluginContextWrapper } from '../../../../../context/ApmPluginContext/MockApmPluginContext';

const data = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FETCH_STATUS, useFetcher } from '../../../../../hooks/useFetcher';
import { useLicense } from '../../../../../hooks/useLicense';
import { LicensePrompt } from '../../../../shared/LicensePrompt';
import { CreateCustomLinkButton } from './CreateCustomLinkButton';
import { CustomLinkFlyout } from './CustomLinkFlyout';
import { CreateEditCustomLinkFlyout } from './CreateEditCustomLinkFlyout';
import { CustomLinkTable } from './CustomLinkTable';
import { EmptyPrompt } from './EmptyPrompt';
import { Title } from './Title';
Expand Down Expand Up @@ -61,7 +61,7 @@ export function CustomLinkOverview() {
return (
<>
{isFlyoutOpen && (
<CustomLinkFlyout
<CreateEditCustomLinkFlyout
onClose={onCloseFlyout}
defaults={customLinkSelected}
customLinkId={customLinkSelected?.id}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/
import React from 'react';
import { render } from '@testing-library/react';
import { CustomLinkSection } from './CustomLinkSection';
import { CustomLinkList } from './CustomLinkList';
import {
expectTextsInDocument,
expectTextsNotInDocument,
} from '../../../../utils/testHelpers';
import { Transaction } from '../../../../../typings/es_schemas/ui/transaction';
import { CustomLink } from '../../../../../common/custom_link/custom_link_types';

describe('CustomLinkSection', () => {
describe('CustomLinkList', () => {
const customLinks = [
{ id: '1', label: 'foo', url: 'http://elastic.co' },
{
Expand All @@ -27,14 +27,14 @@ describe('CustomLinkSection', () => {
} as unknown) as Transaction;
it('shows links', () => {
const component = render(
<CustomLinkSection customLinks={customLinks} transaction={transaction} />
<CustomLinkList customLinks={customLinks} transaction={transaction} />
);
expectTextsInDocument(component, ['foo', 'bar']);
});

it('doesnt show any links', () => {
const component = render(
<CustomLinkSection customLinks={[]} transaction={transaction} />
<CustomLinkList customLinks={[]} transaction={transaction} />
);
expectTextsNotInDocument(component, ['foo', 'bar']);
});
Expand Down
Loading