Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify testing of drag-drop interaction for components #478

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/00 Quick Start/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ it('can be tested with the testing backend', function () {
// Find the drag source ID and use it to simulate the dragging operation
var box = TestUtils.findRenderedComponentWithType(root, Box);
backend.simulateBeginDrag([box.getHandlerId()]);

// Incase your component is acting both as a DragSource and DragTarget
Copy link
Contributor

@zargold zargold Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incase = In case*

// you'd need to go down one level deeper to get the correct Id
// backend.simulateBeginDrag([box.getDecoratedComponentInstance().getHandlerId()]);

// Optionally you can pass in a clientOffset for testing operations that
// depend on mouse movements.
Expand Down