33 * Simple test to verify that update_work_item tool works correctly
44 */
55
6- import { IntegrationTestHelper } from ' ./helpers/registry-helper' ;
6+ import { IntegrationTestHelper } from " ./helpers/registry-helper" ;
77
8- describe ( ' Debug Widget Assignment' , ( ) => {
8+ describe ( " Debug Widget Assignment" , ( ) => {
99 let helper : IntegrationTestHelper ;
1010
1111 beforeAll ( async ( ) => {
1212 helper = new IntegrationTestHelper ( ) ;
1313 await helper . initialize ( ) ;
14- console . log ( ' ✅ Debug widget assignment test helper initialized' ) ;
14+ console . log ( " ✅ Debug widget assignment test helper initialized" ) ;
1515 } ) ;
1616
17- it ( ' should test update_work_item tool with simple title update' , async ( ) => {
18- console . log ( ' 🔧 Creating a simple work item for testing...' ) ;
17+ it ( " should test update_work_item tool with simple title update" , async ( ) => {
18+ console . log ( " 🔧 Creating a simple work item for testing..." ) ;
1919
2020 // Create a simple epic first
21- const epic = await helper . executeTool ( 'create_work_item' , {
22- namespace : 'test' ,
23- title : 'Debug Epic for Widget Testing' ,
24- workItemType : 'EPIC'
25- } ) as any ;
21+ const epic = ( await helper . executeTool ( "manage_work_item" , {
22+ action : "create" ,
23+ namespace : "test" ,
24+ title : "Debug Epic for Widget Testing" ,
25+ workItemType : "EPIC" ,
26+ } ) ) as any ;
2627
2728 expect ( epic ) . toBeDefined ( ) ;
2829 expect ( epic . id ) . toBeDefined ( ) ;
2930 console . log ( `✅ Created debug epic: ${ epic . id } - ${ epic . title } ` ) ;
3031
3132 // Try a simple title update first
32- console . log ( '🔧 Testing simple title update...' ) ;
33- const updatedEpic = await helper . executeTool ( 'update_work_item' , {
33+ console . log ( "🔧 Testing simple title update..." ) ;
34+ const updatedEpic = ( await helper . executeTool ( "manage_work_item" , {
35+ action : "update" ,
3436 id : epic . id ,
35- title : ' Updated Debug Epic for Widget Testing'
36- } ) as any ;
37+ title : " Updated Debug Epic for Widget Testing" ,
38+ } ) ) as any ;
3739
3840 expect ( updatedEpic ) . toBeDefined ( ) ;
39- expect ( updatedEpic . title ) . toBe ( ' Updated Debug Epic for Widget Testing' ) ;
41+ expect ( updatedEpic . title ) . toBe ( " Updated Debug Epic for Widget Testing" ) ;
4042 console . log ( `✅ Title update successful: ${ updatedEpic . title } ` ) ;
4143
4244 // Now test if the tool handles undefined widget parameters gracefully
43- console . log ( '🔧 Testing update with undefined widget parameters...' ) ;
44- const epicWithUndefined = await helper . executeTool ( 'update_work_item' , {
45+ console . log ( "🔧 Testing update with undefined widget parameters..." ) ;
46+ const epicWithUndefined = ( await helper . executeTool ( "manage_work_item" , {
47+ action : "update" ,
4548 id : epic . id ,
46- title : ' Epic with Undefined Widgets' ,
49+ title : " Epic with Undefined Widgets" ,
4750 assigneeIds : undefined ,
4851 labelIds : undefined ,
49- milestoneId : undefined
50- } ) as any ;
52+ milestoneId : undefined ,
53+ } ) ) as any ;
5154
5255 expect ( epicWithUndefined ) . toBeDefined ( ) ;
53- expect ( epicWithUndefined . title ) . toBe ( ' Epic with Undefined Widgets' ) ;
56+ expect ( epicWithUndefined . title ) . toBe ( " Epic with Undefined Widgets" ) ;
5457 console . log ( `✅ Update with undefined widgets successful: ${ epicWithUndefined . title } ` ) ;
5558
5659 // Clean up
57- console . log ( ' 🧹 Cleaning up debug epic...' ) ;
58- await helper . executeTool ( 'delete_work_item' , { id : epic . id } ) ;
59- console . log ( ' ✅ Debug epic cleaned up' ) ;
60+ console . log ( " 🧹 Cleaning up debug epic..." ) ;
61+ await helper . executeTool ( "manage_work_item" , { action : "delete" , id : epic . id } ) ;
62+ console . log ( " ✅ Debug epic cleaned up" ) ;
6063 } , 15000 ) ;
61- } ) ;
64+ } ) ;
0 commit comments