diff --git a/test/js/components/apiErrors.test.js b/test/js/components/apiErrors.test.js
index 065797fa9..8907ede4d 100644
--- a/test/js/components/apiErrors.test.js
+++ b/test/js/components/apiErrors.test.js
@@ -20,10 +20,10 @@ describe('', () => {
const errors = [
{ id: 'err1', message: '
This is Error
' },
];
- const { findByText } = render(
+ const { getByText } = render(
,
);
- return { findByText };
+ return { getByText };
};
test('calls window.location.reload on link click', () => {
@@ -35,9 +35,11 @@ describe('', () => {
expect(window.location.reload).toHaveBeenCalledTimes(1);
});
test('for raw html error', () => {
- const { findByText } = setupforRawHTML();
+ const { getByText } = setupforRawHTML();
- findByText('Something went wrong. Please try again later.');
+ expect(
+ getByText('Something went wrong. Please try again later.'),
+ ).toBeVisible();
});
test('calls doRemoveError on close click', () => {