sadpandajoe commented on code in PR #44531:
URL: https://github.com/apache/superset/pull/44531#discussion_r4139180689


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx:
##########
@@ -774,6 +782,116 @@ test('Clear All in horizontal bar does not re-apply 
default values', async () =>
   updateDataMaskSpy.mockRestore();
 });
 
+test('Clear All in vertical bar lets the same value be re-selected 
afterwards', async () => {
+  // Vertical counterpart to the horizontal regression test above (issue
+  // #44530). `Vertical.tsx` used to destructure `clearAllTriggers`/
+  // `onClearAllComplete` without ever forwarding them to `FilterControls`
+  // (they were also missing from the `filterControls` `useMemo` deps), so
+  // filter plugins never received the clear-all trigger and their local
+  // `useImmerReducer` state stayed pinned to the last selection. The
+  // plugin's reducer discards any action whose new state stringifies equal
+  // to that pinned state, so re-selecting the value that Clear All removed
+  // was a silent no-op: Apply never re-enabled. Without the forwarding
+  // this test fails on the last assertion.
+  fetchMock.post(

Review Comment:
   The vertical regression test never uses this mock in a full-file run: 
`horizontal-clear-chart-data` from the preceding test is still the first 
catch-all route and wins declaration-order matching. Should the horizontal 
route be removed before this route is registered so this test exercises its own 
fixture?



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