SEPURI-SAI-KRISHNA opened a new pull request, #44335: URL: https://github.com/apache/superset/pull/44335
### SUMMARY #43512 bumped `@testing-library/user-event` from 12.8.3 to 14.6.5 and updated 114 test files for the new API. A number of files were missed, and still call `userEvent` without `await`. Under v12 these APIs were synchronous. Under v14 every call returns a promise and dispatches its pointer events across `delay: 0` timer yields inside RTL's `asyncWrapper`. When the call is not awaited, the following query or assertion starts while the events are still in flight, so the interaction's dispatch time is charged against the next `waitFor`/`findBy*` budget (default 1000 ms). On a loaded CI runner that budget can expire before the UI settles, which produces intermittent `sharded-jest-tests` failures. That mechanism has already been confirmed twice on `master`: #44314 / #44315 (`ControlPanelsContainer`) and #44322 / #44323 (`useExploreAdditionalActionsMenu`). This PR finishes the migration for the remaining files so the same class of flake cannot resurface. This change adds `await` to the **133 `userEvent` calls across 39 test files** that sit directly inside an `async` function, so the edit is purely mechanical. No assertions, timeouts, retries, helpers or production code are touched. Call sites were located with the TypeScript compiler API rather than a regex, matching only `userEvent.<method>(...)` used as an expression statement, not already awaited, whose nearest enclosing function is `async`. **Deliberately excluded:** - `src/explore/components/ControlPanelsContainer.test.tsx` — already fixed in #44315. - 7 call sites that are *not* in an `async` function and need restructuring rather than a mechanical `await`: two are inside a `waitFor` callback (`src/pages/Home/Home.test.tsx`, `src/features/datasets/AddDataset/Footer/Footer.test.tsx`), one is in a synchronous helper whose signature would have to change (`src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx`), and four are in synchronous `test()` callbacks where awaiting would change what the assertion actually verifies (`src/components/RowCountLabel/RowCountLabel.test.tsx`). These are better handled separately, per file, with the behaviour change reviewed on its own. <details> <summary>Files changed, with per-file call counts (133 total)</summary> | File | Calls awaited | |---|---| | `src/explore/components/controls/ColorSchemeControl/ColorSchemeControl.test.tsx` | 12 | | `src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx` | 10 | | `src/components/Chart/ChartContextMenu/ChartContextMenu.test.tsx` | 10 | | `src/features/home/Menu.test.tsx` | 9 | | `src/explore/components/DataTablesPane/test/DataTablesPane.test.tsx` | 9 | | `src/features/versionHistory/RelatedUpdateRow.test.tsx` | 6 | | `src/features/home/RightMenu.test.tsx` | 6 | | `src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx` | 6 | | `src/features/datasets/AddDataset/Footer/Footer.test.tsx` | 5 | | `src/components/CopyToClipboard/CopyToClipboard.test.tsx` | 5 | | `src/SqlLab/components/QueryLimitSelect/QueryLimitSelect.test.tsx` | 4 | | `src/explore/components/ExploreViewContainer/ExploreViewContainer.test.tsx` | 4 | | `src/dashboard/components/URLShortLinkButton/URLShortLinkButton.test.tsx` | 4 | | `src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx` | 3 | | `src/features/home/ChartTable.test.tsx` | 3 | | `src/features/alerts/components/AlertStatusIcon.test.tsx` | 3 | | `src/explore/components/DataTablesPane/test/DataTableControls.test.tsx` | 3 | | `packages/superset-ui-chart-controls/test/shared-controls/components/RadioButtonControl.test.tsx` | 3 | | `src/explore/components/DataTablesPane/test/useResultsPane.test.tsx` | 2 | | `src/explore/components/DataTableControl/CopyToClipboardButton.test.tsx` | 2 | | `src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx` | 2 | | `src/components/RowCountLabel/RowCountLabel.test.tsx` | 2 | | `src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx` | 2 | | `src/components/DatabaseSelector/DatabaseSelector.test.tsx` | 2 | | `plugins/plugin-chart-word-cloud/test/ColorSchemeControl.test.tsx` | 2 | | `src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx` | 1 | | `src/SqlLab/components/SqlEditorLeftBar/SqlEditorLeftBar.test.tsx` | 1 | | `src/SqlLab/components/SouthPane/SouthPane.test.tsx` | 1 | | `src/SqlLab/components/SaveDatasetActionButton/SaveDatasetActionButton.test.tsx` | 1 | | `src/pages/Home/Home.test.tsx` | 1 | | `src/features/home/LanguagePicker.test.tsx` | 1 | | `src/explore/components/controls/MetricControl/MetricDefinitionOption.test.tsx` | 1 | | `src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.subdirectory.test.tsx` | 1 | | `src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterDivider.test.tsx` | 1 | | `src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControlShared.test.tsx` | 1 | | `src/dashboard/components/gridComponents/ChartHolder/ChartHolder.test.tsx` | 1 | | `src/dashboard/components/AddSliceCard/AddSliceCard.test.tsx` | 1 | | `src/components/Chart/DrillBy/useResultsTableView.test.ts` | 1 | | `src/chartCustomizations/components/DynamicGroupBy/DynamicGroupByPlugin.test.tsx` | 1 | </details> ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A: test-only change. ### TESTING INSTRUCTIONS Run the affected suites: ```bash cd superset-frontend npm run test -- $(git diff --name-only origin/master -- '*.test.ts' '*.test.tsx' | sed 's|^superset-frontend/||') ``` All 39 suites pass locally on Node 24.16.0: **356 passed, 1 skipped, 0 failed**. `oxlint`, `oxfmt --check` and `scripts/check-type.js` are clean across the changed files. ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #44334 - [ ] 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]
