This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch memoize-status-box
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 84f2b3738bec32d4b0a5fc16dcf588f8d0a313a1
Author: Brent Bovenzi <[email protected]>
AuthorDate: Thu Mar 10 17:42:39 2022 -0500

    fix test
---
 airflow/www/static/js/tree/renderTaskRows.test.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/airflow/www/static/js/tree/renderTaskRows.test.jsx 
b/airflow/www/static/js/tree/renderTaskRows.test.jsx
index ad47cc0..39d41fc 100644
--- a/airflow/www/static/js/tree/renderTaskRows.test.jsx
+++ b/airflow/www/static/js/tree/renderTaskRows.test.jsx
@@ -127,13 +127,15 @@ describe('Test renderTaskRows', () => {
 
     const groupName = getByText('group_1');
 
-    expect(getAllByTestId('task-instance')).toHaveLength(2);
+    expect(getAllByTestId('task-instance')).toHaveLength(1);
     expect(groupName).toBeInTheDocument();
     expect(getByTestId('closed-group')).toBeInTheDocument();
 
     fireEvent.click(groupName);
 
     expect(getByTestId('open-group')).toBeInTheDocument();
+    // task instances are only rendered when their group is expanded
+    expect(getAllByTestId('task-instance')).toHaveLength(2);
   });
 
   test('Still renders names if there are no instances', () => {

Reply via email to