@@ -32,8 +32,8 @@ describe('redux/actions.js', () => {
3232 sinon . test ( function ( ) {
3333 const store = createStore ( ( state = {
3434 '@@keys' : {
35- binderId : { active : false } ,
36- binderId2 : { active : true } ,
35+ binderId : { active : false , elements : [ { id : '1' } ] } ,
36+ binderId2 : { active : true , elements : [ { id : '2' } ] } ,
3737 } ,
3838 } ) => state ) ;
3939 listener . _init ( { store : store } ) ; // init globalStore
@@ -43,8 +43,10 @@ describe('redux/actions.js', () => {
4343 . withArgs ( {
4444 type : actions . ACTIVE_KEYBINDER ,
4545 state : {
46- binderId : { active : true , selectedId : undefined } ,
47- binderId2 : { active : false } ,
46+ binderId : { active : true , elements : { 0 : { id : '1' } } , selectedId : '1' } ,
47+ binderId2 : { active : false , elements : { 0 : { id : '2' } } } ,
48+ currentStrapeId : 'binderId' ,
49+ selectedId : '1' ,
4850 } ,
4951 } ) ;
5052 actions . _activeKeyBinder ( 'binderId' ) ;
@@ -64,7 +66,7 @@ describe('redux/actions.js', () => {
6466 it ( 'should keep in memory the selected Id when memory is true' , sinon . test ( function ( ) {
6567 const store = createStore ( ( state = {
6668 '@@keys' : {
67- binderId : { active : false } ,
69+ binderId : { active : false , selectedId : '2' , elements : [ { id : '1' } ] } ,
6870 binderId2 : { active : true , selectedId : '3' } ,
6971 } ,
7072 } ) => state ) ;
@@ -75,8 +77,10 @@ describe('redux/actions.js', () => {
7577 . withArgs ( {
7678 type : actions . ACTIVE_KEYBINDER ,
7779 state : {
78- binderId : { active : true , selectedId : undefined } ,
80+ binderId : { active : true , elements : { 0 : { id : '1' } } , selectedId : '2' } ,
7981 binderId2 : { active : false , selectedId : '3' } ,
82+ currentStrapeId : 'binderId' ,
83+ selectedId : '2' ,
8084 } ,
8185 } ) ;
8286 actions . _activeKeyBinder ( 'binderId' , null , true ) ;
@@ -142,6 +146,7 @@ describe('redux/actions.js', () => {
142146 . withArgs ( {
143147 type : actions . UPDATE_SELECTED_KEY ,
144148 state : {
149+ selectedId : 2 ,
145150 binderId : { active : false , selectedId : 2 , marginLeft : 10 } ,
146151 } ,
147152 } ) ;
0 commit comments