rusackas opened a new pull request, #36642:
URL: https://github.com/apache/superset/pull/36642

   ### SUMMARY
   
   Fixes flaky tests in `ExploreChartHeader.test.tsx` that were intermittently 
failing with:
   
   ```
   Unable to find an element with the text: Export All Data
   ```
   
   **Root Cause:** After hovering on the menu trigger, the tests immediately 
tried to hover on nested submenu items ("Data Export Options" → "Export All 
Data") without waiting for them to render. The `screen.getByText('Data Export 
Options')` call was synchronous while the submenu rendering was asynchronous.
   
   **Fix:**
   1. Replace all synchronous `screen.getByText('Data Export Options')` with 
async `await screen.findByText('Data Export Options')` in hover operations
   2. Remove duplicate jest spy in "Export screenshot (jpeg)" test that 
conflicted with the sinon spy from beforeEach
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A - Test fix only
   
   ### TESTING INSTRUCTIONS
   
   Run the ExploreChartHeader tests multiple times to verify stability:
   ```bash
   cd superset-frontend
   npm run test -- --testPathPatterns="ExploreChartHeader.test.tsx" 
--no-coverage
   ```
   
   All 34 tests should pass consistently.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to