diff --git a/ui/.eslintrc.js b/ui/.eslintrc.js
index 5f68acd17..f160bb342 100644
--- a/ui/.eslintrc.js
+++ b/ui/.eslintrc.js
@@ -26,6 +26,7 @@ module.exports = {
// https://typescript-eslint.io/rules/no-use-before-define/#how-to-use
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { variables: false }],
+ 'jest/expect-expect': 'error',
},
root: true,
};
diff --git a/ui/src/components/SingleInputComponent/SingleInputComponent.test.tsx b/ui/src/components/SingleInputComponent/SingleInputComponent.test.tsx
index f4c2b624d..e8563e1e1 100644
--- a/ui/src/components/SingleInputComponent/SingleInputComponent.test.tsx
+++ b/ui/src/components/SingleInputComponent/SingleInputComponent.test.tsx
@@ -207,7 +207,9 @@ it('should fetch options from API when endpointUrl is provided', async () => {
/>
);
await userEvent.click(screen.getByRole('combobox'));
- await screen.findByRole('option', { name: firstEntry.content.testLabel });
+ expect(
+ await screen.findByRole('option', { name: firstEntry.content.testLabel })
+ ).toBeInTheDocument();
const secondEntry = mockedEntries[1];
rerender(
@@ -217,17 +219,23 @@ it('should fetch options from API when endpointUrl is provided', async () => {
/>
);
await userEvent.click(screen.getByRole('combobox'));
- await screen.findByRole('option', { name: secondEntry.content.testLabel });
+ expect(
+ await screen.findByRole('option', { name: secondEntry.content.testLabel })
+ ).toBeInTheDocument();
const thirdEntry = mockedEntries[2];
rerender(
);
await userEvent.click(screen.getByRole('combobox'));
- await screen.findByRole('option', { name: thirdEntry.content.testLabel });
+ expect(
+ await screen.findByRole('option', { name: thirdEntry.content.testLabel })
+ ).toBeInTheDocument();
const fourthEntry = mockedEntries[3];
rerender();
await userEvent.click(screen.getByRole('combobox'));
- await screen.findByRole('option', { name: fourthEntry.content.testLabel });
+ expect(
+ await screen.findByRole('option', { name: fourthEntry.content.testLabel })
+ ).toBeInTheDocument();
});