Event.simulateMouse

2 views
Skip to first unread message

kalle

unread,
Jun 15, 2008, 1:54:19 AM6/15/08
to JavaScript Project Generator
hey folks,
i try to test a resizable javascript function my test function looks
like this:

testResiazable: function() { with(this) {
var resize_handle = $$(".event").first().down(".resize_handle")
var oldHeight = resize_handle.up(".inner").getHeight();
Event.simulateMouse(resize_handle, 'mousedown');
Event.simulateMouse(resize_handle, 'mousemove', { pointerX: -400,
pointerY: 0 });
wait(1000, function() {
Event.simulateMouse(resize_handle, 'mouseup');
var height = resize_handle.up(".inner").getHeight();
assertNotEqual(oldHeight, height, 'Should not be equal');
});
}},

if i look at the html page ti happens nothing. and i get this
feedback:

0 assertions, 1 failures, 0 errors
Failure: Should not be equal
expected <22>, actual: <22> Line #139

ok, i suppose its not working like i hope it would, have you any deas
how i could test this ?

chears,
kalle
Reply all
Reply to author
Forward
0 new messages