SEPURI-SAI-KRISHNA opened a new pull request, #44323: URL: https://github.com/apache/superset/pull/44323
### SUMMARY `useExploreAdditionalActionsMenu.test.tsx` intermittently fails in `sharded-jest-tests` with `Unable to find an element with the text: Export All Data` (seen on `master` in [job 103895789828](https://github.com/apache/superset/actions/runs/34818352387/job/103895789828); details in #44322). The file calls `userEvent` without `await` in 12 places. That was harmless under `@testing-library/user-event` 12, where these APIs were synchronous, but #43512 moved the repo to 14, where every call returns a promise and dispatches its pointer events across `delay: 0` timer yields. The menu under test is a nested antd submenu — `Data Export Options` → `Export All Data` → the leaf export items — and each level only opens once the previous hover has actually been dispatched. With the hover un-awaited, the following `findByText` begins polling while the hover is still in flight, so the hover's dispatch time is charged against `findByText`'s default 1000 ms budget. Under CI load that budget runs out before the second-level submenu renders. #43512 updated 114 test files for the v14 API but never touched this one (its last commit is #42088). Notably it *did* update the sibling `ExploreChartHeader/ExploreChartHeader.test.tsx`, which drives the same menu and had the identical failure on `master` before that change and has not failed this way since — so this exact fix is already demonstrated to work on the neighbouring file. This PR adds the missing `await` to all 12 calls (lines 228–230, 244–246, 270–272, 301–303). Assertions are unchanged: no widened timeouts, no retries, no new helpers. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A: test-only change. ### TESTING INSTRUCTIONS ```bash cd superset-frontend npm run test -- src/explore/components/useExploreAdditionalActionsMenu/useExploreAdditionalActionsMenu.test.tsx ``` All 18 tests pass. `oxlint`, `oxfmt --check` and the targeted `scripts/check-type.js` run clean on the changed file. Note: I could not force the original failure locally — the file passes on an idle machine. The case for the fix is the `master` CI failure linked in the issue, the mechanism above, and the sibling file's before/after history. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #44322 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
