eulloa10 commented on code in PR #26602:
URL: https://github.com/apache/superset/pull/26602#discussion_r1567863322


##########
superset-frontend/src/components/MetadataBar/MetadataBar.test.tsx:
##########
@@ -265,3 +265,27 @@ test('correctly renders the tags tooltip', async () => {
     );
   });
 });
+
+test('renders StyledItem with role="button" when onClick is defined', () => {
+  const onClick = jest.fn();
+  const items = [
+    { ...ITEMS[0], onClick },
+    { ...ITEMS[1], onClick },
+  ];
+  render(<MetadataBar items={items} />);
+
+  const styledItems = screen.getAllByRole('button');
+
+  styledItems.forEach(styledItem => {
+    expect(styledItem).toHaveAttribute('role', 'button');
+  });

Review Comment:
   Yes, this will be changed to: 
   ```
     const styledItems = screen.getAllByRole('button');
   
     expect(styledItems.length).toBe(2);
   ```



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to