diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-04-17 15:26:40 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2017-05-14 12:41:19 +0300 |
commit | 53ee455bc735af9fc54de586ed4d23ac56b69ab8 (patch) | |
tree | 8a29be55e1f709a3604c898360e0c31b8ac75cba /js/tests/unit/tooltip.js | |
parent | 69de65180f750cadf5f96a774d2524f69d19beab (diff) |
Handle dropup for Dropdown
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r-- | js/tests/unit/tooltip.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index f47a97e30c..c0cafefe51 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -456,7 +456,7 @@ $(function () { assert.expect(1) var done = assert.async() - var containerHTML = '<div>' + var containerHTML = '<div id="test">' + '<p style="margin-top: 200px">' + '<a href="#" title="very very very very very very very long tooltip">Hover me</a>' + '</p>' @@ -482,7 +482,12 @@ $(function () { }) .on('shown.bs.tooltip', function () { var $tooltip = $($(this).data('bs.tooltip').tip) - assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) >= Math.round($(this).offset().top)) + if (/iPhone|iPad|iPod/.test(navigator.userAgent)) { + assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) <= Math.round($(this).offset().top)) + } + else { + assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) >= Math.round($(this).offset().top)) + } done() }) .bootstrapTooltip('show') |