Skip to main content

Search and Top Navigation

#4991 closed enhancement (wontfix)

Opened December 03, 2009 12:09PM UTC

Closed January 27, 2010 01:44PM UTC

Last modified October 11, 2012 09:15PM UTC

[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:
Description

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)
Change History (2)

Changed January 27, 2010 01:44PM UTC by rdworth comment:1

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.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:2

milestone: TBD

Milestone TBD deleted