From 22e1f94b52b741c62d3f7d9d7891b395e7bb2372 Mon Sep 17 00:00:00 2001
From: Chris Rebert <code@rebertia.com>
Date: Mon, 27 Oct 2014 15:53:41 -0700
Subject: [PATCH] Increase timeouts in tooltip unit tests to avoid spurious
 Sauce failures

Fixes #14851
---
 js/tests/unit/tooltip.js | 62 ++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index 351dd61cb5..4fbd91dc37 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -803,16 +803,16 @@ $(function () {
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: 15 })
+      .bootstrapTooltip({ delay: 150 })
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip is not faded in')
-    }, 10)
+      ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip is not faded in')
+    }, 100)
 
     setTimeout(function () {
-      ok($('.tooltip').is('.fade.in'), '20ms: tooltip is faded in')
+      ok($('.tooltip').is('.fade.in'), '200ms: tooltip is faded in')
       start()
-    }, 20)
+    }, 200)
 
     $tooltip.trigger('mouseenter')
   })
@@ -822,17 +822,17 @@ $(function () {
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: 15 })
+      .bootstrapTooltip({ delay: 150 })
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
       $tooltip.trigger('mouseout')
-    }, 10)
+    }, 100)
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in')
       start()
-    }, 20)
+    }, 200)
 
     $tooltip.trigger('mouseenter')
   })
@@ -842,21 +842,21 @@ $(function () {
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: { show: 0, hide: 15 }})
+      .bootstrapTooltip({ delay: { show: 0, hide: 150 }})
 
     setTimeout(function () {
       ok($('.tooltip').is('.fade.in'), '1ms: tooltip faded in')
       $tooltip.trigger('mouseout')
 
       setTimeout(function () {
-        ok($('.tooltip').is('.fade.in'), '10ms: tooltip still faded in')
+        ok($('.tooltip').is('.fade.in'), '100ms: tooltip still faded in')
         $tooltip.trigger('mouseenter')
-      }, 10)
+      }, 100)
 
       setTimeout(function () {
-        ok($('.tooltip').is('.fade.in'), '20ms: tooltip still faded in')
+        ok($('.tooltip').is('.fade.in'), '200ms: tooltip still faded in')
         start()
-      }, 20)
+      }, 200)
     }, 0)
 
     $tooltip.trigger('mouseenter')
@@ -867,17 +867,17 @@ $(function () {
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: 15 })
+      .bootstrapTooltip({ delay: 150 })
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
       $tooltip.trigger('mouseout')
-    }, 10)
+    }, 100)
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in')
       start()
-    }, 20)
+    }, 200)
 
     $tooltip.trigger('mouseenter')
   })
@@ -887,27 +887,27 @@ $(function () {
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: { show: 15, hide: 0 }})
+      .bootstrapTooltip({ delay: { show: 150, hide: 0 }})
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
       $tooltip.trigger('mouseout')
-    }, 10)
+    }, 100)
 
     setTimeout(function () {
-      ok(!$('.tooltip').is('.fade.in'), '25ms: tooltip not faded in')
+      ok(!$('.tooltip').is('.fade.in'), '250ms: tooltip not faded in')
       start()
-    }, 25)
+    }, 250)
 
     $tooltip.trigger('mouseenter')
   })
 
-  test('should wait 20ms before hiding the tooltip', function () {
+  test('should wait 200ms before hiding the tooltip', function () {
     stop()
 
     var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
       .appendTo('#qunit-fixture')
-      .bootstrapTooltip({ delay: { show: 0, hide: 15 }})
+      .bootstrapTooltip({ delay: { show: 0, hide: 150 }})
 
     setTimeout(function () {
       ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '1ms: tooltip faded in')
@@ -915,13 +915,13 @@ $(function () {
       $tooltip.trigger('mouseout')
 
       setTimeout(function () {
-        ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '10ms: tooltip still faded in')
-      }, 10)
+        ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '100ms: tooltip still faded in')
+      }, 100)
 
       setTimeout(function () {
-        ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '20ms: tooltip removed')
+        ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '200ms: tooltip removed')
         start()
-      }, 20)
+      }, 200)
 
     }, 0)
 
-- 
GitLab