codeant-ai-for-open-source[bot] commented on code in PR #42491:
URL: https://github.com/apache/superset/pull/42491#discussion_r3680237375


##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx:
##########
@@ -566,3 +566,31 @@ test('should pass filterState from dataMask to 
ChartContainer', () => {
     mockFilterState,
   );
 });
+
+test('should pass chartStackTrace to ChartContainer so dashboard chart errors 
stay expandable', () => {
+  // Regression guard for #31858: the dashboard chart wrapper stopped 
forwarding
+  // the stack trace, so failed charts rendered a flat error with no "See more"
+  // affordance while the same error in Explore stayed expandable.
+  const stackTrace = 'Traceback (most recent call last): ValueError: boom';
+
+  setup(
+    {},
+    {
+      ...defaultState,
+      charts: {
+        ...defaultState.charts,
+        [queryId]: {
+          ...defaultState.charts[queryId],
+          chartStatus: 'failed',
+          chartAlert: 'Something went wrong',
+          chartStackTrace: stackTrace,
+        },
+      },
+    },
+  );
+
+  expect(capturedChartContainerProps).toHaveProperty(
+    'chartStackTrace',
+    stackTrace,
+  );

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not require integration-level UI assertions in Chart component tests 
when the regression is limited to prop forwarding and the downstream expandable 
error rendering is covered by dedicated tests.
   
   **Applied to:**
     - `superset-frontend/src/dashboard/components/gridComponents/Chart/**`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



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