You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jl...@apache.org on 2025/12/18 05:27:23 UTC

(superset) branch master updated: fix(tests): resolve flakey selectOption helper race condition (#36719)

This is an automated email from the ASF dual-hosted git repository.

jli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new f51f7f3307 fix(tests): resolve flakey selectOption helper race condition (#36719)
f51f7f3307 is described below

commit f51f7f3307758515e7c66573c91a0f603fe1e462
Author: Joe Li <jo...@preset.io>
AuthorDate: Wed Dec 17 21:27:17 2025 -0800

    fix(tests): resolve flakey selectOption helper race condition (#36719)
    
    Co-authored-by: Claude <no...@anthropic.com>
---
 superset-frontend/spec/helpers/testing-library.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/spec/helpers/testing-library.tsx b/superset-frontend/spec/helpers/testing-library.tsx
index f7fbf44b20..1a841a3248 100644
--- a/superset-frontend/spec/helpers/testing-library.tsx
+++ b/superset-frontend/spec/helpers/testing-library.tsx
@@ -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 } : {},
   );