SEPURI-SAI-KRISHNA opened a new issue, #44322:
URL: https://github.com/apache/superset/issues/44322
### Bug description
`useExploreAdditionalActionsMenu.test.tsx` intermittently fails in
`sharded-jest-tests` with:
```
● shows 413 error toast when exportCSV fails with 413
Unable to find an element with the text: Export All Data. This could be
because the
text is broken up by multiple elements.
> 229 | userEvent.hover(await screen.findByText('Export All Data'));
```
Seen on `master`:
https://github.com/apache/superset/actions/runs/34818352387/job/103895789828
(2026-09-14)
**Cause.** After #43512 bumped `@testing-library/user-event` from 12.8.3 to
14.6.5 (merged 2026-09-12), every user-event API returns a promise and
dispatches its pointer events across `delay: 0` timer yields inside RTL's
`asyncWrapper`. This file still calls `userEvent` without `await` in 12 places:
```tsx
userEvent.hover(await screen.findByText('Data Export Options'));
userEvent.hover(await screen.findByText('Export All Data'));
userEvent.click(await screen.findByText('Export to original .CSV'));
```
The menu is a nested antd submenu — `Data Export Options` → `Export All
Data` → the leaf export items — built in
`useExploreAdditionalActionsMenu/index.tsx`. Each level only opens once the
previous hover has actually been dispatched. With the hover un-awaited, the
following `findByText` starts polling while the hover is still in flight, so
the hover's dispatch time is charged against `findByText`'s default 1000 ms
budget. On a loaded runner that budget expires before the second-level submenu
renders.
#43512 updated 114 test files for the v14 API but not this one, which it
never touched (its last commit is #42088, 2026-09-09).
**The sibling file is a natural experiment.**
`ExploreChartHeader/ExploreChartHeader.test.tsx` drives the same menu and had
the identical `Unable to find an element with the text: Export All Data`
failure, including on `master` — for example
https://github.com/apache/superset/actions/runs/34568694676/job/103166733474,
whose code frame shows the same un-awaited `userEvent.hover`. #43512 *did*
update that file and added the `await`s, and since then it has not failed this
way on `master`. The one later failure,
https://github.com/apache/superset/actions/runs/34777331944/job/103778430811,
is on `feat/i18n-asset-metadata`, a branch cut before #43512 that still carries
the un-awaited code.
So the same fix is already shown to work on the sibling file; this file was
simply missed.
Affected lines: 228–230, 244–246, 270–272, 301–303, across four tests.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
N/A (frontend test)
### Node version
18 or greater (CI: 24.16.0)
### Browser
Not applicable
### Additional context
I could not force the failure locally: the file passes 18/18 on an idle
machine. Instrumenting the equivalent flow in the sibling `ExploreChartHeader`
test showed the second-level `findByText('Export All Data')` consuming ~178 ms
of its 1000 ms budget even on an idle 12-core box, so the margin is real but
only lost under CI load.
Precedent for the same class of fix: #35918, #35993, and #44315.
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
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]