You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jl...@apache.org on 2026/08/18 20:52:02 UTC

(superset) branch master updated: test(chart): mock the event log endpoint in the drill-to-detail menu test (#43183)

This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 34cd50cc484 test(chart): mock the event log endpoint in the drill-to-detail menu test (#43183)
34cd50cc484 is described below

commit 34cd50cc4840d72636f5d33c196ba3e0fcb8a7db
Author: Bikash <bi...@gmail.com>
AuthorDate: Wed Aug 19 02:21:54 2026 +0530

    test(chart): mock the event log endpoint in the drill-to-detail menu test (#43183)
    
    Co-authored-by: bikashJMV <bi...@jmv.co.in>
    Co-authored-by: Claude Opus 5 (1M context) <no...@anthropic.com>
    Co-authored-by: Joe Li <jo...@preset.io>
---
 .../Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx
index 8338d3e6bd3..bbd7db3fa60 100644
--- a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx
+++ b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx
@@ -17,6 +17,7 @@
  * under the License.
  */
 import { useState } from 'react';
+import fetchMock from 'fetch-mock';
 import {
   cleanup,
   render,
@@ -35,6 +36,10 @@ import { useDrillDetailMenuItems, DrillDetailMenuItemsProps } from './index';
 
 /* eslint jest/expect-expect: ["warn", { "assertFunctionNames": ["expect*"] }] */
 
+// Opening the context menu logs an event, and an unmatched request makes
+// fetch-mock throw inside the component.
+fetchMock.post('glob:*/log/?*', {});
+
 jest.mock(
   '../DrillDetail/DrillDetailPane',
   () =>