bikash-barnwal opened a new pull request, #43183:
URL: https://github.com/apache/superset/pull/43183

   ### SUMMARY
   
   `useDrillDetailMenuItems.test.tsx` → *context menu when datasource opts out 
via supports_drill_to_detail=false* fails on `master`, taking down one 
`sharded-jest-tests` shard in Frontend Build CI:
   
   ```
   ● context menu when datasource opts out via supports_drill_to_detail=false
   
     fetch-mock: No response or fallback rule to cover post to 
http://localhost/log/?explode=events
       at Router.execute (node_modules/fetch-mock/dist/cjs/Router.js:115:16)
   ```
   
   Opening the context menu logs an event. The suite registers no fetch-mock 
rule for `POST /log/`, so fetch-mock throws inside the component and the 
assertion never runs. Only the context-menu variant hits it, since the dropdown 
variant doesn't log.
   
   Reproduced on a clean checkout of `master` at `0a7ebe1dd1` — 1 failed, 1 
skipped, 12 passed — so this is independent of any product change.
   
   The fix registers the endpoint exactly the way the dashboard suites already 
do (`DashboardContainer.test.tsx:32`, `DashboardBuilder.test.tsx:63`):
   
   ```ts
   fetchMock.post('glob:*/log/?*', {});
   ```
   
   Nothing the test asserts is changed; the previously-failing assertion now 
actually executes.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable — test-only change.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npm run test -- 
src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx
   ```
   
   Before: 1 failed, 1 skipped, 12 passed. After: **13 passed**, 1 skipped, 0 
failed.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] 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
   
   🤖 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