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([
243
243
jasmine . clock ( ) . uninstall ( ) ;
244
244
} ) ;
245
245
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 ) {
247
247
var container = $ ( '<div/>' ) ,
248
248
dialog = $ ( '<div/>' ) . attr ( 'id' , 'dialog' ) . appendTo ( container ) ;
249
249
@@ -252,8 +252,6 @@ define([
252
252
253
253
container . appendTo ( 'body' ) ;
254
254
255
- jasmine . clock ( ) . install ( ) ;
256
-
257
255
dialog . dropdownDialog ( {
258
256
'timeout' : 5
259
257
} ) ;
@@ -263,11 +261,11 @@ define([
263
261
dialog . trigger ( 'mouseleave' ) ;
264
262
expect ( dialog . dropdownDialog ( 'isOpen' ) ) . toBeTruthy ( ) ;
265
263
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 ) ;
271
269
} ) ;
272
270
273
271
/*
You can’t perform that action at this time.
0 commit comments