Merge branch 'main' into avm99963-monorail
Merged commit 4137ed7879acadbf891e8c471108acb874dae886.
GitOrigin-RevId: b6100ffc5b1da355a35f37b13fcaaf746ee8b307
diff --git a/static_src/react/issue-wizard/SelectMenu.test.tsx b/static_src/react/issue-wizard/SelectMenu.test.tsx
index 13efef6..b25baea 100644
--- a/static_src/react/issue-wizard/SelectMenu.test.tsx
+++ b/static_src/react/issue-wizard/SelectMenu.test.tsx
@@ -14,7 +14,7 @@
let container: React.RenderResult;
beforeEach(() => {
- container = render(<SelectMenu />).container;
+ container = render(<SelectMenu optionsList = {['op1', 'op2']} />).container;
});
it('renders', () => {
@@ -22,7 +22,7 @@
assert.isNotNull(form)
});
- it('renders options on click', () => {
+ it('renders options on click', async () => {
const input = document.getElementById('outlined-select-category');
if (!input) {
throw new Error('Input is undefined');
@@ -31,8 +31,8 @@
userEvent.click(input)
// 14 is the current number of options in the select menu
- const count = screen.getAllByTestId('select-menu-item').length;
+ const count = (await screen.findAllByTestId('select-menu-item')).length;
- assert.equal(count, 14);
+ assert.equal(count, 2);
});
-});
\ No newline at end of file
+});