diff --git a/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx b/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx
index 70ae44bcdc..b686076e17 100644
--- a/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx
+++ b/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx
@@ -43,4 +43,22 @@ describe('', () => {
expect(rendered.getByText(alert.title)).toBeInTheDocument();
expect(rendered.getByText(alert.subtitle)).toBeInTheDocument();
});
+
+ it('renders custom title elements', async () => {
+ const rendered = await renderInTestApp(
+
+ Foo,
+ subtitle: Bar,
+ }}
+ avatar={1
}
+ />
+ ,
+ );
+
+ expect(rendered.getByText('Foo')).toBeInTheDocument();
+ expect(rendered.getByText('Bar')).toBeInTheDocument();
+ });
});
diff --git a/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx b/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx
index a651556303..f9fe985e43 100644
--- a/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx
+++ b/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx
@@ -49,6 +49,25 @@ describe('', () => {
expect(queryByText('Dismiss')).not.toBeInTheDocument();
});
+ it('renders custom title elements', () => {
+ const { getByText } = renderInContext(
+ Foo,
+ subtitle: Bar,
+ }}
+ number={1}
+ onSnooze={jest.fn()}
+ onDismiss={jest.fn()}
+ onAccept={jest.fn()}
+ />,
+ );
+
+ expect(getByText('Foo')).toBeInTheDocument();
+ expect(getByText('Bar')).toBeInTheDocument();
+ });
+
it('Hides instructions button if url is not provided', () => {
const alert: Alert = {
...mockAlert,