Aitema-gmbh commented on code in PR #39230:
URL: https://github.com/apache/superset/pull/39230#discussion_r3232530777


##########
superset-frontend/src/components/Chart/Chart.test.tsx:
##########
@@ -71,6 +71,38 @@ test('shows backend error instead of loading spinner when 
datasource is still a
   ).toBeInTheDocument();
 });
 
+test('chart container has role="img" and aria-label with vizType when no 
slice_name', () => {
+  render(
+    <Chart
+      {...baseProps}
+      chartStatus="success"
+      queriesResponse={[{ data: [{ value: 1 }] }]}
+    />,
+  );
+
+  const container = screen.getByRole('img');
+  expect(container).toBeInTheDocument();
+  expect(container).toHaveAttribute('aria-label', 'table chart');
+});

Review Comment:
   Addressed in 09113cb8 — replaced getByRole('img') with getByLabelText so the 
tests verify accessible name without coupling to the role landing on the outer 
wrapper. Resolving — thanks for the catch.



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