bbovenzi commented on code in PR #25610:
URL: https://github.com/apache/airflow/pull/25610#discussion_r945159218


##########
airflow/www/static/js/dag/useSelection.test.tsx:
##########
@@ -38,17 +38,19 @@ describe('Test useSelection hook', () => {
       selected: {
         runId,
         taskId,
+        mapIndex,
       },
     } = result.current;
 
     expect(runId).toBeNull();
     expect(taskId).toBeNull();
+    expect(mapIndex).toBeNull();
   });
 
   test.each([
-    { taskId: 'task_1', runId: 'run_1' },
-    { runId: 'run_1', taskId: null },
-    { taskId: 'task_1', runId: null },
+    { taskId: 'task_1', runId: 'run_1', mapIndex: 2 },
+    { runId: 'run_1', taskId: null, mapIndex: null },
+    { taskId: 'task_1', runId: null, mapIndex: 1 },

Review Comment:
   Let's add a test case for `mapIndex: 0` and `mapIndex: -1`.
   
   For -1, we probably need to cast it to null. Currently, I don't see anywhere 
this pops up in the UI, but a test couldn't hurt.



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

Reply via email to