mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(tests): resolve flakey selectOption helper race condition (#36719)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,8 @@ export { customRender as render };
|
||||
export { default as userEvent } from '@testing-library/user-event';
|
||||
|
||||
export async function selectOption(option: string, selectName?: string) {
|
||||
const select = screen.getByRole(
|
||||
// Use findByRole (async) to wait for element to be ready, preventing race conditions on slow CI
|
||||
const select = await screen.findByRole(
|
||||
'combobox',
|
||||
selectName ? { name: selectName } : {},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user