diff --git a/CLAUDE.md b/CLAUDE.md index a7987720b3..fe6d39bc11 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -73,6 +73,8 @@ motion (public API) ## Writing Tests +**IMPORTANT: Always write a failing test FIRST before implementing any bug fix or feature.** This ensures the issue is reproducible and the fix is verified. For UI interaction bugs (like gesture handling), prefer E2E tests using Playwright or Cypress. + When waiting for the next frame in async tests: ```javascript diff --git a/dev/react/src/tests/drag-input-propagation.tsx b/dev/react/src/tests/drag-input-propagation.tsx new file mode 100644 index 0000000000..61fb5e0f45 --- /dev/null +++ b/dev/react/src/tests/drag-input-propagation.tsx @@ -0,0 +1,112 @@ +import { motion } from "framer-motion" + +/** + * Test page for issue #1674: Interactive elements inside draggable elements + * should not trigger drag when clicked/interacted with. + */ +export const App = () => { + return ( +
+ + +