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


##########
superset-frontend/src/dashboard/components/Header/useHeaderAutoRefresh.test.tsx:
##########
@@ -152,3 +158,23 @@ test('forceRefresh normalizes a negative config value to 0 
(unstaggered)', async
     expect.objectContaining({ interval: 0 }),
   );
 });
+
+test('a silent refresh reports only the affected chart ids to 
startAutoRefresh, not the whole dashboard', async () => {
+  mockStartAutoRefresh.mockClear();
+  mockUseAutoRefreshTabPause.mockClear();
+  const { props } = renderHeaderAutoRefresh(
+    {},
+    { chartIds: [1, 2], timedRefreshImmuneSlices: [2] },

Review Comment:
   Good idea, added. There is a third chart in the test store with an empty 
`latestQueryFormData` (the unvisited-tab case), and a new test asserting both 
`startAutoRefresh` and `onRefresh` only see `[1]` when `2` is immune and `3` 
has never been queried. Thanks for the nudge!



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