diff --git a/test/unit/common.js b/test/unit/common.js
index c6fd49e..468c48e 100644
--- a/test/unit/common.js
+++ b/test/unit/common.js
@@ -122,7 +122,17 @@
ok(!p.is(':visible'), 'popover closed');
});
-
+ test("should not wrap buttons when parent has position:absolute", function () {
+ var d = $('
').appendTo(fx),
+ e = $('
abc').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.
/*
diff --git a/test/unit/date.js b/test/unit/date.js
index 83f6707..16ca25a 100644
--- a/test/unit/date.js
+++ b/test/unit/date.js
@@ -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
diff --git a/test/unit/dateui.js b/test/unit/dateui.js
index f6a1d20..5af7255 100644
--- a/test/unit/dateui.js
+++ b/test/unit/dateui.js
@@ -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);
});