From faed0c5310faaf46f660c4003561154369742912 Mon Sep 17 00:00:00 2001
From: Oleksandr Miroshnichenko <omiroshnichenko@magento.com>
Date: Thu, 18 Jan 2018 16:24:32 +0200
Subject: [PATCH] magento/magento2#12342: JSTestDriver removal - Fix timeout
 dropdown close.

---
 .../js/jasmine/tests/lib/mage/dropdown.test.js     | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/dev/tests/js/jasmine/tests/lib/mage/dropdown.test.js b/dev/tests/js/jasmine/tests/lib/mage/dropdown.test.js
index 7279047adc5..1d149efe040 100644
--- a/dev/tests/js/jasmine/tests/lib/mage/dropdown.test.js
+++ b/dev/tests/js/jasmine/tests/lib/mage/dropdown.test.js
@@ -243,7 +243,7 @@ define([
             jasmine.clock().uninstall();
         });
 
-        it('check if the dialog gets closed with the specified delay', function () {
+        it('check if the dialog gets closed with the specified delay', function (done) {
             var container = $('<div/>'),
                 dialog = $('<div/>').attr('id', 'dialog').appendTo(container);
 
@@ -252,8 +252,6 @@ define([
 
             container.appendTo('body');
 
-            jasmine.clock().install();
-
             dialog.dropdownDialog({
                 'timeout': 5
             });
@@ -263,11 +261,11 @@ define([
             dialog.trigger('mouseleave');
             expect(dialog.dropdownDialog('isOpen')).toBeTruthy();
 
-            jasmine.clock().tick(10);
-            expect(dialog.dropdownDialog('isOpen')).toBeFalsy();
-            dialog.dropdownDialog('destroy');
-
-            jasmine.clock().uninstall();
+            setTimeout(function () {
+                expect(dialog.dropdownDialog('isOpen')).toBeFalsy();
+                dialog.dropdownDialog('destroy');
+                done();
+            }, 6);
         });
 
         /*
-- 
GitLab