File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
dev/tests/js/jasmine/tests/lib/mage Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ define([
243243 jasmine . clock ( ) . uninstall ( ) ;
244244 } ) ;
245245
246- it ( 'check if the dialog gets closed with the specified delay' , function ( ) {
246+ it ( 'check if the dialog gets closed with the specified delay' , function ( done ) {
247247 var container = $ ( '<div/>' ) ,
248248 dialog = $ ( '<div/>' ) . attr ( 'id' , 'dialog' ) . appendTo ( container ) ;
249249
@@ -252,8 +252,6 @@ define([
252252
253253 container . appendTo ( 'body' ) ;
254254
255- jasmine . clock ( ) . install ( ) ;
256-
257255 dialog . dropdownDialog ( {
258256 'timeout' : 5
259257 } ) ;
@@ -263,11 +261,11 @@ define([
263261 dialog . trigger ( 'mouseleave' ) ;
264262 expect ( dialog . dropdownDialog ( 'isOpen' ) ) . toBeTruthy ( ) ;
265263
266- jasmine . clock ( ) . tick ( 10 ) ;
267- expect ( dialog . dropdownDialog ( 'isOpen' ) ) . toBeFalsy ( ) ;
268- dialog . dropdownDialog ( 'destroy' ) ;
269-
270- jasmine . clock ( ) . uninstall ( ) ;
264+ setTimeout ( function ( ) {
265+ expect ( dialog . dropdownDialog ( 'isOpen' ) ) . toBeFalsy ( ) ;
266+ dialog . dropdownDialog ( 'destroy' ) ;
267+ done ( ) ;
268+ } , 6 ) ;
271269 } ) ;
272270
273271 /*
You can’t perform that action at this time.
0 commit comments