Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/unit/bootstrap-tooltip.js')
-rw-r--r--js/tests/unit/bootstrap-tooltip.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js
index ef21bd96b4..94f40f339f 100644
--- a/js/tests/unit/bootstrap-tooltip.js
+++ b/js/tests/unit/bootstrap-tooltip.js
@@ -251,4 +251,22 @@ $(function () {
ok(!$("#qunit-fixture > .tooltip").length, 'not found in parent')
tooltip.tooltip('hide')
})
+
+ test("should place tooltip inside window", function(){
+ $("#qunit-fixture").show();
+ var tooltip = $("<a href='#' title='Very very very very very very very very long tooltip'></a>")
+ .css({position: "absolute", top:0, left: 0})
+ .appendTo("#qunit-fixture")
+ .tooltip({placement: "top"})
+ .tooltip("show");
+
+ stop();
+
+ setTimeout(function(){
+ ok($(".tooltip").offset().left >= 0);
+
+ start();
+ $("#qunit-fixture").hide();
+ }, 200)
+ });
})