Skip to content

Commit ba350bc

Browse files
add data test subject
1 parent 63a615f commit ba350bc

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function PackageCard({
3131
integration,
3232
url,
3333
release,
34+
id,
3435
}: PackageCardProps) {
3536
let releaseBadge: React.ReactNode | null = null;
3637

@@ -47,8 +48,10 @@ export function PackageCard({
4748
);
4849
}
4950

51+
const testid = `integration-card:${id}`;
5052
return (
5153
<Card
54+
data-test-subj={testid}
5255
layout="horizontal"
5356
title={title || ''}
5457
titleSize="xs"

x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/available_packages.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const packageListToIntegrationsList = (packages: PackageList): PackageList => {
7979
const allCategories = [...topCategories, ...categories];
8080
return {
8181
...restOfPackage,
82-
id: `${restOfPackage}-${name}`,
82+
id: `${restOfPackage.id}-${name}`,
8383
integration: name,
8484
title,
8585
description,

x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const mapToCard = (
6767
}
6868

6969
return {
70-
id: `${item.type === 'ui_link' ? 'ui_link' : 'epr'}-${item.id}`,
70+
id: `${item.type === 'ui_link' ? 'ui_link' : 'epr'}:${item.id}`,
7171
description: item.description,
7272
icons: !item.icons || !item.icons.length ? [] : item.icons,
7373
title: item.title,

0 commit comments

Comments
 (0)