@@ -53,53 +53,58 @@ describe('flyout manager actions', () => {
5353
5454 describe ( 'addFlyout' , ( ) => {
5555 it ( 'should create add flyout action with required parameters' , ( ) => {
56- const action = addFlyout ( 'flyout-1' , LEVEL_MAIN ) ;
56+ const action = addFlyout ( 'flyout-1' , 'main' , LEVEL_MAIN ) ;
5757
5858 expect ( action ) . toEqual ( {
5959 type : ACTION_ADD ,
6060 flyoutId : 'flyout-1' ,
61+ title : 'main' ,
6162 level : LEVEL_MAIN ,
6263 } ) ;
6364 } ) ;
6465
6566 it ( 'should create add flyout action with all parameters' , ( ) => {
66- const action = addFlyout ( 'flyout-1' , LEVEL_MAIN , 'l' ) ;
67+ const action = addFlyout ( 'flyout-1' , 'main' , LEVEL_MAIN , 'l' ) ;
6768
6869 expect ( action ) . toEqual ( {
6970 type : ACTION_ADD ,
7071 flyoutId : 'flyout-1' ,
72+ title : 'main' ,
7173 level : LEVEL_MAIN ,
7274 size : 'l' ,
7375 } ) ;
7476 } ) ;
7577
7678 it ( 'should default to LEVEL_MAIN when level is not provided' , ( ) => {
77- const action = addFlyout ( 'flyout-1' ) ;
79+ const action = addFlyout ( 'flyout-1' , 'flyout title' ) ;
7880
7981 expect ( action ) . toEqual ( {
8082 type : ACTION_ADD ,
8183 flyoutId : 'flyout-1' ,
84+ title : 'flyout title' ,
8285 level : LEVEL_MAIN ,
8386 } ) ;
8487 } ) ;
8588
8689 it ( 'should handle child level flyouts' , ( ) => {
87- const action = addFlyout ( 'child-1' , LEVEL_CHILD , 'm' ) ;
90+ const action = addFlyout ( 'child-1' , 'child' , LEVEL_CHILD , 'm' ) ;
8891
8992 expect ( action ) . toEqual ( {
9093 type : ACTION_ADD ,
9194 flyoutId : 'child-1' ,
95+ title : 'child' ,
9296 level : LEVEL_CHILD ,
9397 size : 'm' ,
9498 } ) ;
9599 } ) ;
96100
97101 it ( 'should handle undefined size parameter' , ( ) => {
98- const action = addFlyout ( 'flyout-1' , LEVEL_MAIN , undefined ) ;
102+ const action = addFlyout ( 'flyout-1' , 'main' , LEVEL_MAIN , undefined ) ;
99103
100104 expect ( action ) . toEqual ( {
101105 type : ACTION_ADD ,
102106 flyoutId : 'flyout-1' ,
107+ title : 'main' ,
103108 level : LEVEL_MAIN ,
104109 size : undefined ,
105110 } ) ;
@@ -240,7 +245,7 @@ describe('flyout manager actions', () => {
240245
241246 describe ( 'action type safety' , ( ) => {
242247 it ( 'should have correct action type structure' , ( ) => {
243- const addAction = addFlyout ( 'test' ) ;
248+ const addAction = addFlyout ( 'test' , 'flyout title' ) ;
244249 const closeAction = closeFlyout ( 'test' ) ;
245250 const setActiveAction = setActiveFlyout ( 'test' ) ;
246251 const setWidthAction = setFlyoutWidth ( 'test' , 100 ) ;
@@ -256,7 +261,7 @@ describe('flyout manager actions', () => {
256261 } ) ;
257262
258263 it ( 'should maintain action immutability' , ( ) => {
259- const action = addFlyout ( 'test' , LEVEL_MAIN , 'm' ) ;
264+ const action = addFlyout ( 'test' , 'main' , LEVEL_MAIN , 'm' ) ;
260265 const originalAction = { ...action } ;
261266
262267 // Modify the action object
@@ -269,15 +274,15 @@ describe('flyout manager actions', () => {
269274
270275 describe ( 'edge cases' , ( ) => {
271276 it ( 'should handle empty string flyout IDs' , ( ) => {
272- const action = addFlyout ( '' , LEVEL_MAIN ) ;
277+ const action = addFlyout ( '' , 'main' , LEVEL_MAIN ) ;
273278 expect ( action . flyoutId ) . toBe ( '' ) ;
274279 } ) ;
275280
276281 it ( 'should handle special characters in flyout IDs' , ( ) => {
277282 const specialIds = [ 'flyout-1' , 'flyout_2' , 'flyout.3' , 'flyout-4' ] ;
278283
279284 specialIds . forEach ( ( id ) => {
280- const action = addFlyout ( id , LEVEL_MAIN ) ;
285+ const action = addFlyout ( id , 'main' , LEVEL_MAIN ) ;
281286 expect ( action . flyoutId ) . toBe ( id ) ;
282287 } ) ;
283288 } ) ;
0 commit comments