rusackas commented on code in PR #44366:
URL: https://github.com/apache/superset/pull/44366#discussion_r4140551103


##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.test.ts:
##########
@@ -256,3 +257,47 @@ test('restoreFilter cancels the pending removal before the 
delay elapses', () =>
 
   jest.useRealTimers();
 });
+
+function renderFilterOperations(
+  filters: Record<string, { filterType: string; dependencies?: string[] }>,
+) {
+  const params: FilterOperationsParams = {
+    form: {
+      getFieldValue: () => filters,
+    } as unknown as FilterOperationsParams['form'],
+    filterState: {
+      removedItems: {},
+    } as unknown as FilterOperationsParams['filterState'],
+    filterIds: Object.keys(filters),
+    filterConfigMap: {},
+    handleModifyItem: jest.fn(),
+    setActiveItem: jest.fn(),
+    setSaveAlertVisible: jest.fn(),
+  };
+  return renderHook(() => useFilterOperations(params)).result;
+}
+
+test('buildDependencyMap drops a parent id whose filter type no longer 
supports dependencies', () => {

Review Comment:
   Added a `removedItems.parent` case - the child's dependency map drops it as 
expected.



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