@@ -115,27 +115,27 @@ describe("ContextManagementSettings", () => {
115115 render ( < ContextManagementSettings { ...defaultProps } /> )
116116 const checkbox = screen . getByTestId ( "enable-context-synthesization-checkbox" )
117117 fireEvent . click ( checkbox )
118- expect ( defaultProps . setEnableContextSummarization ) . toHaveBeenCalledWith ( true )
118+ expect ( defaultProps . setCachedStateField ) . toHaveBeenCalledWith ( "enableContextSummarization" , true )
119119 } )
120120
121121 it ( "updates synthesization trigger threshold" , ( ) => {
122122 render ( < ContextManagementSettings { ...defaultProps } enableContextSummarization = { true } /> ) // Enable first
123123 const input = screen . getByTestId ( "context-synthesization-trigger-threshold-input" )
124124 fireEvent . change ( input , { target : { value : "95" } } )
125- expect ( defaultProps . setContextSummarizationTriggerThreshold ) . toHaveBeenCalledWith ( 95 )
125+ expect ( defaultProps . setCachedStateField ) . toHaveBeenCalledWith ( "contextSummarizationTriggerThreshold" , 95 )
126126 } )
127127
128128 it ( "updates initial turns to keep" , ( ) => {
129129 render ( < ContextManagementSettings { ...defaultProps } enableContextSummarization = { true } /> ) // Enable first
130130 const input = screen . getByTestId ( "context-synthesization-initial-turns-input" )
131131 fireEvent . change ( input , { target : { value : "3" } } )
132- expect ( defaultProps . setContextSummarizationInitialStaticTurns ) . toHaveBeenCalledWith ( 3 )
132+ expect ( defaultProps . setCachedStateField ) . toHaveBeenCalledWith ( "contextSummarizationInitialStaticTurns" , 3 )
133133 } )
134134
135135 it ( "updates recent turns to keep" , ( ) => {
136136 render ( < ContextManagementSettings { ...defaultProps } enableContextSummarization = { true } /> ) // Enable first
137137 const input = screen . getByTestId ( "context-synthesization-recent-turns-input" )
138138 fireEvent . change ( input , { target : { value : "12" } } )
139- expect ( defaultProps . setContextSummarizationRecentTurns ) . toHaveBeenCalledWith ( 12 )
139+ expect ( defaultProps . setCachedStateField ) . toHaveBeenCalledWith ( "contextSummarizationRecentTurns" , 12 )
140140 } )
141141} )
0 commit comments