Skip to content

Commit

Permalink
add data test subject
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Oct 18, 2021
1 parent 63a615f commit ba350bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function PackageCard({
integration,
url,
release,
id,
}: PackageCardProps) {
let releaseBadge: React.ReactNode | null = null;

Expand All @@ -47,8 +48,10 @@ export function PackageCard({
);
}

const testid = `integration-card:${id}`;
return (
<Card
data-test-subj={testid}
layout="horizontal"
title={title || ''}
titleSize="xs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const packageListToIntegrationsList = (packages: PackageList): PackageList => {
const allCategories = [...topCategories, ...categories];
return {
...restOfPackage,
id: `${restOfPackage}-${name}`,
id: `${restOfPackage.id}-${name}`,
integration: name,
title,
description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const mapToCard = (
}

return {
id: `${item.type === 'ui_link' ? 'ui_link' : 'epr'}-${item.id}`,
id: `${item.type === 'ui_link' ? 'ui_link' : 'epr'}:${item.id}`,
description: item.description,
icons: !item.icons || !item.icons.length ? [] : item.icons,
title: item.title,
Expand Down

0 comments on commit ba350bc

Please sign in to comment.