Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#4991 closed enhancement (wontfix)

[PATCH] enhancing simulate.js to accept jquery as drop target

Reported by: dwt Owned by:
Priority: minor Milestone:
Component: ui.core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


Many tests are much easier written if you can just tell the simulate the id or jquery object you want to drop on.

Here's an example:

this.domFor(this.story1).simulate('drag', {dropTarget: this.domFor(this.task2)});
same(this.view.currentOrderOfTickets(), [1,4,5,2,3,6,7]);

So I have expanded the method a bit (see patch for details)

Attachments (1)

simulate-drop-accepts-dropTarget-arg.patch (1.5 KB) - added by dwt 13 years ago.
patch for jquery simulate

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by dwt

patch for jquery simulate

comment:1 Changed 13 years ago by rdworth

Resolution: wontfix
Status: newclosed
Type: bugenhancement

simulate is designed to simulate a true browser event, as closely as possible. The contract it provides is that the event hash you pass it the event hash that will be passed to the simulated event. Intercepting those values and mucking with them is a bit too much magic, and can simply be handled by convenience functions that call .simulate.

In other words, it's low-level and it's meant to be.

comment:2 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.