@@ -101,7 +101,7 @@ describe('McpMynahUi', () => {
101
101
102
102
// Verify the parameters
103
103
const callArgs = ( mynahUi . openDetailedList as sinon . SinonStub ) . firstCall . args [ 0 ]
104
- assert . strictEqual ( callArgs . detailedList . selectable , true )
104
+ assert . strictEqual ( callArgs . detailedList . selectable , 'clickable' )
105
105
assert . strictEqual ( callArgs . detailedList . textDirection , 'row' )
106
106
assert . strictEqual ( callArgs . detailedList . header . title , 'Test Title' )
107
107
assert . strictEqual ( callArgs . detailedList . header . description , 'Test Description' )
@@ -246,20 +246,22 @@ describe('McpMynahUi', () => {
246
246
sinon . assert . calledOnce ( mockSheet . close )
247
247
248
248
// Test onItemSelect event
249
- const mockItem = {
249
+ const mockSelectItem = {
250
+ id : 'mcp-server-click' ,
250
251
title : 'Server 1' ,
251
252
actions : [ { id : 'open-mcp-server' } ] ,
252
253
} as DetailedListItem
253
- events . onItemSelect ( mockItem )
254
+ events . onItemSelect ( mockSelectItem )
254
255
sinon . assert . calledWith ( messager . onMcpServerClick as sinon . SinonStub , 'open-mcp-server' , 'Server 1' )
255
256
256
257
// Test onItemClick event
257
258
const mockClickItem = {
258
259
id : 'mcp-server-click' ,
259
260
title : 'Server 1' ,
261
+ actions : [ { id : 'open-mcp-server' } ] ,
260
262
} as DetailedListItem
261
263
events . onItemClick ( mockClickItem )
262
- sinon . assert . calledWith ( messager . onMcpServerClick as sinon . SinonStub , 'mcp-server-click ' )
264
+ sinon . assert . calledWith ( messager . onMcpServerClick as sinon . SinonStub , 'open- mcp-server' , 'Server 1 ')
263
265
264
266
// Test onActionClick event
265
267
const mockAction = { id : 'add-new-mcp' } as ChatItemButton
0 commit comments