@@ -393,21 +393,6 @@ describe('Api.prototype.eventHandlerFactory : ', () => {
393
393
}
394
394
} ) ;
395
395
} ) ;
396
- describe ( 'Api.prototype.getCopyPerviouseData' , ( ) => {
397
- test ( 'In the onLoad event, return data is equal to getInitialState() and getCopyData()' , ( ) => {
398
- expect . assertions ( 3 ) ;
399
- const _state = { selectedTabID : 'tab1' , openTabIDs : [ 'tab1' , 'tab2' ] } ;
400
- obj . setOption ( 'onLoad' , function ( ) {
401
- const perviousData = this . getCopyPerviousData ( ) ;
402
- const data = this . getCopyData ( ) ;
403
- expect ( perviousData ) . toEqual ( _state ) ;
404
- expect ( perviousData ) . toEqual ( data ) ;
405
- expect ( perviousData !== null ) . toBe ( true ) ;
406
- } ) ;
407
- obj . updateStateRef ( _state , ( ) => { } ) ;
408
- obj . trigger ( 'onLoad' , obj . userProxy ) ;
409
- } ) ;
410
- } ) ;
411
396
describe ( 'Api.prototype.getCopyPerviousData' , ( ) => {
412
397
test ( 'returned data should be equal to optionsManager.initialState in onLoad event' , ( ) => {
413
398
expect . assertions ( 2 ) ;
@@ -428,6 +413,19 @@ describe('Api.prototype.getCopyPerviousData', () => {
428
413
obj . updateStateRef ( { selectedTabID : 'tab1' , openTabIDs : [ 'tab1' , 'tab2' ] } , ( ) => { } ) ;
429
414
obj . trigger ( 'onLoad' , obj . userProxy ) ;
430
415
} ) ;
416
+ test ( 'In the onLoad event, return data is equal to getInitialState() and getCopyData()' , ( ) => {
417
+ expect . assertions ( 3 ) ;
418
+ const _state = { selectedTabID : 'tab1' , openTabIDs : [ 'tab1' , 'tab2' ] } ;
419
+ obj . setOption ( 'onLoad' , function ( ) {
420
+ const perviousData = this . getCopyPerviousData ( ) ;
421
+ const data = this . getCopyData ( ) ;
422
+ expect ( perviousData ) . toEqual ( _state ) ;
423
+ expect ( perviousData ) . toEqual ( data ) ;
424
+ expect ( perviousData !== null ) . toBe ( true ) ;
425
+ } ) ;
426
+ obj . updateStateRef ( _state , ( ) => { } ) ;
427
+ obj . trigger ( 'onLoad' , obj . userProxy ) ;
428
+ } ) ;
431
429
} ) ;
432
430
describe ( 'Api.prototype.setTab : ' , ( ) => {
433
431
test ( 'it should call optionsManager.validateObjectiveTabData and validatePanelComponent internally' , ( ) => {
0 commit comments