fix tests for abs position and date clear
This commit is contained in:
parent
18f29820f3
commit
02c4c685ae
@ -122,7 +122,17 @@
|
||||
ok(!p.is(':visible'), 'popover closed');
|
||||
});
|
||||
|
||||
|
||||
test("should not wrap buttons when parent has position:absolute", function () {
|
||||
var d = $('<div style="position: absolute; top: 200px">').appendTo(fx),
|
||||
e = $('<a href="#" data-pk="1" data-url="post.php" data-name="text1">abc</a>').appendTo(d).editable();
|
||||
|
||||
e.click();
|
||||
var p = tip(e);
|
||||
ok(p.find('button').offset().top < p.find('.editable-input').offset().top + p.find('.editable-input').height(), 'buttons top ok');
|
||||
ok(p.find('button').offset().left > p.find('.editable-input').offset().left + p.find('.editable-input').width(), 'buttons left ok');
|
||||
|
||||
d.remove();
|
||||
});
|
||||
|
||||
//unfortunatly, testing this feature does not always work in browsers. Tested manually.
|
||||
/*
|
||||
|
@ -153,7 +153,7 @@ $(function () {
|
||||
equal(frmt(e.data('editable').value, f), d, 'day set correct');
|
||||
equal(p.find('td.day.active').text(), 15, 'day shown correct');
|
||||
|
||||
var clear = p.find('.editable-clear');
|
||||
var clear = p.find('.editable-clear a');
|
||||
equal(clear.text(), 'abc', 'clear link shown');
|
||||
|
||||
//click clear
|
||||
|
@ -105,7 +105,7 @@ $(function () {
|
||||
equal(frmt(e.data('editable').value, f), d, 'day set correct');
|
||||
equal(p.find('a.ui-state-active').text(), 15, 'day shown correct');
|
||||
|
||||
var clear = p.find('.editable-clear');
|
||||
var clear = p.find('.editable-clear a');
|
||||
equal(clear.text(), 'abc', 'clear link shown');
|
||||
|
||||
//click clear
|
||||
@ -118,7 +118,7 @@ $(function () {
|
||||
equal(e.text(), e.data('editable').options.emptytext, 'empty text shown');
|
||||
e.remove();
|
||||
start();
|
||||
}, timeout);
|
||||
}, 500);
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user