diff --git a/src/components/Tool/Appeal/Modals/PledgeModal/PledgeModal.test.tsx b/src/components/Tool/Appeal/Modals/PledgeModal/PledgeModal.test.tsx index b979901b5c..d3d94cac6b 100644 --- a/src/components/Tool/Appeal/Modals/PledgeModal/PledgeModal.test.tsx +++ b/src/components/Tool/Appeal/Modals/PledgeModal/PledgeModal.test.tsx @@ -465,12 +465,13 @@ describe('PledgeModal', () => { userEvent.click(getByRole('combobox', { name: 'Status' })); userEvent.click(getByRole('option', { name: 'Received' })); + const warning = queryByTestId('received-warnings'); if (expectToFindWarnings) { // eslint-disable-next-line jest/no-conditional-expect - expect(queryByTestId('received-warnings')).toBeInTheDocument(); + expect(warning).toBeInTheDocument(); } else { // eslint-disable-next-line jest/no-conditional-expect - expect(queryByTestId('received-warnings')).not.toBeInTheDocument(); + expect(warning).not.toBeInTheDocument(); } }); });