diff --git a/src/components/Tool/Appeal/AppealsDetailsPage.test.tsx b/src/components/Tool/Appeal/AppealsDetailsPage.test.tsx
index ac59647c7..c8fc6bf25 100644
--- a/src/components/Tool/Appeal/AppealsDetailsPage.test.tsx
+++ b/src/components/Tool/Appeal/AppealsDetailsPage.test.tsx
@@ -117,17 +117,18 @@ const Components = ({ router = defaultRouter }: { router?: object }) => (
describe('AppealsDetailsPage', () => {
describe('Contact drawer', () => {
it('should open and close on List view', async () => {
- const { getByText, findByTestId, getByRole, queryByRole } = render(
- ,
- );
+ const { getByText, findByTestId, getByRole, getAllByRole, queryByRole } =
+ render(
+ ,
+ );
await waitFor(() => expect(getByText('Test Person')).toBeInTheDocument());
@@ -140,7 +141,7 @@ describe('AppealsDetailsPage', () => {
expect(getByRole('tab', { name: 'Tasks' })).toBeInTheDocument(),
);
- userEvent.click(getByRole('img', { name: 'Close' }));
+ userEvent.click(getAllByRole('img', { name: 'Close' })[0]);
await waitFor(() =>
expect(queryByRole('tab', { name: 'Tasks' })).not.toBeInTheDocument(),