rusackas commented on code in PR #37141:
URL: https://github.com/apache/superset/pull/37141#discussion_r2824932691


##########
superset-frontend/src/features/home/SubMenu.test.tsx:
##########
@@ -127,3 +127,35 @@ test('should render the buttons', async () => {
   userEvent.click(testButton);
   expect(mockFunc).toHaveBeenCalled();
 });
+
+// Mobile support tests
+test('should render leftIcon when provided', async () => {
+  setup({
+    leftIcon: (
+      <button type="button" data-test="left-icon-button">
+        Search
+      </button>
+    ),
+  });
+  expect(await screen.findByTestId('left-icon-button')).toBeInTheDocument();
+});
+
+test('should render rightIcon when provided', async () => {
+  setup({
+    rightIcon: (
+      <button type="button" data-test="right-icon-button">
+        Menu
+      </button>
+    ),
+  });
+  expect(await screen.findByTestId('right-icon-button')).toBeInTheDocument();
+});
+
+test('should render both leftIcon and rightIcon together', async () => {
+  setup({
+    leftIcon: <span data-test="mobile-left">Left</span>,
+    rightIcon: <span data-test="mobile-right">Right</span>,

Review Comment:
   Additional fix in commit 50974cd: Changed the element attributes from 
`data-testid` to `data-test` to match the codebase convention configured in 
`spec/helpers/setup.ts` (testIdAttribute: 'data-test'). The initial fix only 
updated the query method, but the attributes themselves needed to be changed 
too.



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