diff --git a/plugins/pagerduty/src/components/PagerDutyCard.test.tsx b/plugins/pagerduty/src/components/PagerDutyCard.test.tsx
index a6615aee82..a719a27f86 100644
--- a/plugins/pagerduty/src/components/PagerDutyCard.test.tsx
+++ b/plugins/pagerduty/src/components/PagerDutyCard.test.tsx
@@ -17,6 +17,7 @@ import React from 'react';
import { render, waitFor, fireEvent, act } from '@testing-library/react';
import { PagerDutyCard } from './PagerDutyCard';
import { Entity } from '@backstage/catalog-model';
+import { EntityProvider } from '@backstage/plugin-catalog-react';
import { wrapInTestApp } from '@backstage/test-utils';
import {
alertApiRef,
@@ -80,7 +81,9 @@ describe('PageDutyCard', () => {
const { getByText, queryByTestId } = render(
wrapInTestApp(
-
+
+
+
,
),
);
@@ -99,7 +102,9 @@ describe('PageDutyCard', () => {
const { getByText, queryByTestId } = render(
wrapInTestApp(
-
+
+
+
,
),
);
@@ -114,7 +119,9 @@ describe('PageDutyCard', () => {
const { getByText, queryByTestId } = render(
wrapInTestApp(
-
+
+
+
,
),
);
@@ -134,7 +141,9 @@ describe('PageDutyCard', () => {
const { getByText, queryByTestId, getByTestId, getByRole } = render(
wrapInTestApp(
-
+
+
+
,
),
);
diff --git a/plugins/pagerduty/src/components/PagerDutyCard.tsx b/plugins/pagerduty/src/components/PagerDutyCard.tsx
index f7360c01d6..e03fb0fdbe 100644
--- a/plugins/pagerduty/src/components/PagerDutyCard.tsx
+++ b/plugins/pagerduty/src/components/PagerDutyCard.tsx
@@ -58,7 +58,7 @@ export const isPluginApplicableToEntity = (entity: Entity) =>
type Props = {
/** @deprecated The entity is now grabbed from context instead */
- entity: Entity;
+ entity?: Entity;
};
export const PagerDutyCard = (_props: Props) => {