codeant-ai-for-open-source[bot] commented on code in PR #36889:
URL: https://github.com/apache/superset/pull/36889#discussion_r3635470244


##########
superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.test.tsx:
##########
@@ -199,4 +201,24 @@ describe('TabsRenderer', () => {
     expect(screen.getByText('Tab 1 Content')).toBeInTheDocument();
     expect(screen.queryByText('Tab 2 Content')).not.toBeInTheDocument(); // 
Not active
   });
+
+  test('activates dragging when the pointer starts on a tab title input', () 
=> {
+    // Tab titles render a textarea that covers most of the tab in edit mode
+    const textarea = document.createElement('textarea');
+    document.body.appendChild(textarea);
+    const nativeEvent = new MouseEvent('pointerdown', { button: 0 });
+    Object.defineProperty(nativeEvent, 'isPrimary', { value: true });
+    textarea.dispatchEvent(nativeEvent);
+
+    const [activator] = PointerSensor.activators;
+    const onActivation = jest.fn();
+    const activated = activator.handler(
+      { nativeEvent } as unknown as PointerEvent<HTMLElement>,
+      { onActivation },
+    );
+
+    expect(nativeEvent.target).toBe(textarea);
+    expect(activated).toBe(true);
+    expect(onActivation).toHaveBeenCalled();
+  });

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag tests that assert drag activation is allowed from the tab 
title in TabsRenderer; this is an intentional regression guard for the 
cursor-only behavior, not a bug.
   
   **Applied to:**
     - 
`superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/**`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



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