You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('should log a warning if set_static is called.',function(){
373
+
console.warn=jasmine.createSpy('log');
374
+
varoptions={
375
+
cellHeight: 80,
376
+
verticalMargin: 10
377
+
};
378
+
$('.grid-stack').gridstack(options);
379
+
vargrid=$('.grid-stack').data('gridstack');
380
+
grid.set_static(true);
381
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `set_static` is deprecated as of v0.2.5 and has been replaced with `setStatic`. It will be **completely** removed in v1.0.');
382
+
});
383
+
it('should log a warning if _set_static_class is called.',function(){
384
+
console.warn=jasmine.createSpy('log');
385
+
varoptions={
386
+
cellHeight: 80,
387
+
verticalMargin: 10
388
+
};
389
+
$('.grid-stack').gridstack(options);
390
+
vargrid=$('.grid-stack').data('gridstack');
391
+
grid._set_static_class();
392
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_set_static_class` is deprecated as of v0.2.5 and has been replaced with `_setStaticClass`. It will be **completely** removed in v1.0.');
393
+
});
394
+
it('should log a warning if is_area_empty is called.',function(){
395
+
console.warn=jasmine.createSpy('log');
396
+
varoptions={
397
+
cellHeight: 80,
398
+
verticalMargin: 10
399
+
};
400
+
$('.grid-stack').gridstack(options);
401
+
vargrid=$('.grid-stack').data('gridstack');
402
+
grid.is_area_empty(1,1,1,1);
403
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `is_area_empty` is deprecated as of v0.2.5 and has been replaced with `isAreaEmpty`. It will be **completely** removed in v1.0.');
404
+
});
405
+
it('should log a warning if batch_update is called.',function(){
406
+
console.warn=jasmine.createSpy('log');
407
+
varoptions={
408
+
cellHeight: 80,
409
+
verticalMargin: 10
410
+
};
411
+
$('.grid-stack').gridstack(options);
412
+
vargrid=$('.grid-stack').data('gridstack');
413
+
grid.batch_update();
414
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `batch_update` is deprecated as of v0.2.5 and has been replaced with `batchUpdate`. It will be **completely** removed in v1.0.');
415
+
});
416
+
it('should log a warning if get_cell_from_pixel is called.',function(){
417
+
console.warn=jasmine.createSpy('log');
418
+
varoptions={
419
+
cellHeight: 80,
420
+
verticalMargin: 10
421
+
};
422
+
$('.grid-stack').gridstack(options);
423
+
vargrid=$('.grid-stack').data('gridstack');
424
+
varpixel={top: 100,left: 72};
425
+
grid.get_cell_from_pixel(pixel);
426
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `get_cell_from_pixel` is deprecated as of v0.2.5 and has been replaced with `getCellFromPixel`. It will be **completely** removed in v1.0.');
427
+
});
428
+
it('should log a warning if cell_width is called.',function(){
429
+
console.warn=jasmine.createSpy('log');
430
+
varoptions={
431
+
cellHeight: 80,
432
+
verticalMargin: 10
433
+
};
434
+
$('.grid-stack').gridstack(options);
435
+
vargrid=$('.grid-stack').data('gridstack');
436
+
grid.cell_width();
437
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `cell_width` is deprecated as of v0.2.5 and has been replaced with `cellWidth`. It will be **completely** removed in v1.0.');
438
+
});
439
+
it('should log a warning if cell_height is called.',function(){
440
+
console.warn=jasmine.createSpy('log');
441
+
varoptions={
442
+
cellHeight: 80,
443
+
verticalMargin: 10
444
+
};
445
+
$('.grid-stack').gridstack(options);
446
+
vargrid=$('.grid-stack').data('gridstack');
447
+
grid.cell_height();
448
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `cell_height` is deprecated as of v0.2.5 and has been replaced with `cellHeight`. It will be **completely** removed in v1.0.');
449
+
});
450
+
it('should log a warning if _update_element is called.',function(){
451
+
console.warn=jasmine.createSpy('log');
452
+
varoptions={
453
+
cellHeight: 80,
454
+
verticalMargin: 10
455
+
};
456
+
$('.grid-stack').gridstack(options);
457
+
vargrid=$('.grid-stack').data('gridstack');
458
+
grid._update_element();
459
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_update_element` is deprecated as of v0.2.5 and has been replaced with `_updateElement`. It will be **completely** removed in v1.0.');
460
+
});
461
+
it('should log a warning if min_width is called.',function(){
462
+
console.warn=jasmine.createSpy('log');
463
+
varoptions={
464
+
cellHeight: 80,
465
+
verticalMargin: 10
466
+
};
467
+
$('.grid-stack').gridstack(options);
468
+
vargrid=$('.grid-stack').data('gridstack');
469
+
varitems=$('.grid-stack-item');
470
+
for(vari=0;i<items.length;i++){
471
+
grid.min_width(items[i],2);
472
+
}
473
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `min_width` is deprecated as of v0.2.5 and has been replaced with `minWidth`. It will be **completely** removed in v1.0.');
474
+
});
475
+
it('should log a warning if min_height is called.',function(){
476
+
console.warn=jasmine.createSpy('log');
477
+
varoptions={
478
+
cellHeight: 80,
479
+
verticalMargin: 10
480
+
};
481
+
$('.grid-stack').gridstack(options);
482
+
vargrid=$('.grid-stack').data('gridstack');
483
+
varitems=$('.grid-stack-item');
484
+
for(vari=0;i<items.length;i++){
485
+
grid.min_height(items[i],2);
486
+
}
487
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `min_height` is deprecated as of v0.2.5 and has been replaced with `minHeight`. It will be **completely** removed in v1.0.');
488
+
});
489
+
it('should log a warning if remove_all is called.',function(){
490
+
console.warn=jasmine.createSpy('log');
491
+
varoptions={
492
+
cellHeight: 80,
493
+
verticalMargin: 10
494
+
};
495
+
$('.grid-stack').gridstack(options);
496
+
vargrid=$('.grid-stack').data('gridstack');
497
+
grid.remove_all();
498
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `remove_all` is deprecated as of v0.2.5 and has been replaced with `removeAll`. It will be **completely** removed in v1.0.');
499
+
});
500
+
it('should log a warning if remove_widget is called.',function(){
501
+
console.warn=jasmine.createSpy('log');
502
+
varoptions={
503
+
cellHeight: 80,
504
+
verticalMargin: 10
505
+
};
506
+
$('.grid-stack').gridstack(options);
507
+
vargrid=$('.grid-stack').data('gridstack');
508
+
varitems=$('.grid-stack-item');
509
+
for(vari=0;i<items.length;i++){
510
+
grid.remove_widget(items[i]);
511
+
}
512
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `remove_widget` is deprecated as of v0.2.5 and has been replaced with `removeWidget`. It will be **completely** removed in v1.0.');
513
+
});
514
+
it('should log a warning if will_it_fit is called.',function(){
515
+
console.warn=jasmine.createSpy('log');
516
+
varoptions={
517
+
cellHeight: 80,
518
+
verticalMargin: 10
519
+
};
520
+
$('.grid-stack').gridstack(options);
521
+
vargrid=$('.grid-stack').data('gridstack');
522
+
grid.will_it_fit(0,0,1,1,false);
523
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `will_it_fit` is deprecated as of v0.2.5 and has been replaced with `willItFit`. It will be **completely** removed in v1.0.');
524
+
});
525
+
it('should log a warning if make_widget is called.',function(){
526
+
console.warn=jasmine.createSpy('log');
527
+
varoptions={
528
+
cellHeight: 80,
529
+
verticalMargin: 10
530
+
};
531
+
$('.grid-stack').gridstack(options);
532
+
vargrid=$('.grid-stack').data('gridstack');
533
+
varitems=$('.grid-stack-item');
534
+
for(vari=0;i<items.length;i++){
535
+
grid.make_widget(items[i]);
536
+
}
537
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `make_widget` is deprecated as of v0.2.5 and has been replaced with `makeWidget`. It will be **completely** removed in v1.0.');
538
+
});
539
+
it('should log a warning if add_widget is called.',function(){
540
+
console.warn=jasmine.createSpy('log');
541
+
varoptions={
542
+
cellHeight: 80,
543
+
verticalMargin: 10
544
+
};
545
+
$('.grid-stack').gridstack(options);
546
+
vargrid=$('.grid-stack').data('gridstack');
547
+
varitems=$('.grid-stack-item');
548
+
for(vari=0;i<items.length;i++){
549
+
grid.add_widget(items[i]);
550
+
}
551
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `add_widget` is deprecated as of v0.2.5 and has been replaced with `addWidget`. It will be **completely** removed in v1.0.');
552
+
});
553
+
it('should log a warning if set_animation is called.',function(){
554
+
console.warn=jasmine.createSpy('log');
555
+
varoptions={
556
+
cellHeight: 80,
557
+
verticalMargin: 10
558
+
};
559
+
$('.grid-stack').gridstack(options);
560
+
vargrid=$('.grid-stack').data('gridstack');
561
+
grid.set_animation(true);
562
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `set_animation` is deprecated as of v0.2.5 and has been replaced with `setAnimation`. It will be **completely** removed in v1.0.');
563
+
});
564
+
it('should log a warning if _prepare_element is called.',function(){
565
+
console.warn=jasmine.createSpy('log');
566
+
varoptions={
567
+
cellHeight: 80,
568
+
verticalMargin: 10
569
+
};
570
+
$('.grid-stack').gridstack(options);
571
+
vargrid=$('.grid-stack').data('gridstack');
572
+
varitems=$('.grid-stack-item');
573
+
for(vari=0;i<items.length;i++){
574
+
grid._prepare_element(items[i]);
575
+
}
576
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_prepare_element` is deprecated as of v0.2.5 and has been replaced with `_prepareElement`. It will be **completely** removed in v1.0.');
577
+
});
578
+
it('should log a warning if _is_one_column_mode is called.',function(){
579
+
console.warn=jasmine.createSpy('log');
580
+
varoptions={
581
+
cellHeight: 80,
582
+
verticalMargin: 10
583
+
};
584
+
$('.grid-stack').gridstack(options);
585
+
vargrid=$('.grid-stack').data('gridstack');
586
+
grid._is_one_column_mode();
587
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_is_one_column_mode` is deprecated as of v0.2.5 and has been replaced with `_isOneColumnMode`. It will be **completely** removed in v1.0.');
588
+
});
589
+
it('should log a warning if _update_container_height is called.',function(){
590
+
console.warn=jasmine.createSpy('log');
591
+
varoptions={
592
+
cellHeight: 80,
593
+
verticalMargin: 10
594
+
};
595
+
$('.grid-stack').gridstack(options);
596
+
vargrid=$('.grid-stack').data('gridstack');
597
+
grid._update_container_height();
598
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_update_container_height` is deprecated as of v0.2.5 and has been replaced with `_updateContainerHeight`. It will be **completely** removed in v1.0.');
599
+
});
600
+
it('should log a warning if _update_styles is called.',function(){
601
+
console.warn=jasmine.createSpy('log');
602
+
varoptions={
603
+
cellHeight: 80,
604
+
verticalMargin: 10
605
+
};
606
+
$('.grid-stack').gridstack(options);
607
+
vargrid=$('.grid-stack').data('gridstack');
608
+
grid._update_styles();
609
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_update_styles` is deprecated as of v0.2.5 and has been replaced with `_updateStyles`. It will be **completely** removed in v1.0.');
610
+
});
611
+
it('should log a warning if _init_styles is called.',function(){
612
+
console.warn=jasmine.createSpy('log');
613
+
varoptions={
614
+
cellHeight: 80,
615
+
verticalMargin: 10
616
+
};
617
+
$('.grid-stack').gridstack(options);
618
+
vargrid=$('.grid-stack').data('gridstack');
619
+
grid._init_styles();
620
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_init_styles` is deprecated as of v0.2.5 and has been replaced with `_initStyles`. It will be **completely** removed in v1.0.');
621
+
});
622
+
it('should log a warning if _trigger_change_event is called.',function(){
623
+
console.warn=jasmine.createSpy('log');
624
+
varoptions={
625
+
cellHeight: 80,
626
+
verticalMargin: 10
627
+
};
628
+
$('.grid-stack').gridstack(options);
629
+
vargrid=$('.grid-stack').data('gridstack');
630
+
grid._trigger_change_event();
631
+
expect(console.warn).toHaveBeenCalledWith('gridstack.js: Function `_trigger_change_event` is deprecated as of v0.2.5 and has been replaced with `_triggerChangeEvent`. It will be **completely** removed in v1.0.');
0 commit comments