5
5
addTestResultTool ,
6
6
listTestRunsTool ,
7
7
updateTestRunTool ,
8
- uploadFileTestManagementTool ,
8
+ uploadProductRequirementFileTool ,
9
9
createTestCasesFromFileTool
10
10
} from '../../src/tools/testmanagement' ;
11
11
import addTestManagementTools from '../../src/tools/testmanagement' ;
@@ -443,12 +443,12 @@ const mockFileId = 12345;
443
443
const mockDownloadUrl = "https://cdn.browserstack.com/mock.pdf" ;
444
444
const mockContext = { sendNotification : vi . fn ( ) , _meta : { progressToken : "test-progress-token" } } ;
445
445
446
- describe ( "uploadFileTestManagementTool " , ( ) => {
446
+ describe ( "uploadProductRequirementFileTool " , ( ) => {
447
447
beforeEach ( ( ) => vi . resetAllMocks ( ) ) ;
448
448
449
449
it ( "returns error when file does not exist" , async ( ) => {
450
450
( fs . existsSync as Mock ) . mockReturnValue ( false ) ;
451
- const res = await uploadFileTestManagementTool ( { project_identifier : testProjectId , file_path : testFilePath } ) ;
451
+ const res = await uploadProductRequirementFileTool ( { project_identifier : testProjectId , file_path : testFilePath } ) ;
452
452
expect ( res . isError ) . toBe ( true ) ;
453
453
expect ( res . content [ 0 ] . text ) . toContain ( "does not exist" ) ;
454
454
} ) ;
@@ -472,7 +472,7 @@ describe("uploadFileTestManagementTool", () => {
472
472
} ;
473
473
mockedAxios . get . mockResolvedValue ( { data : { success : true , projects : [ { identifier : testProjectId , id : "999" } ] } } ) ;
474
474
mockedAxios . post . mockResolvedValue ( mockUpload ) ;
475
- const res = await uploadFileTestManagementTool ( { project_identifier : testProjectId , file_path : testFilePath } ) ;
475
+ const res = await uploadProductRequirementFileTool ( { project_identifier : testProjectId , file_path : testFilePath } ) ;
476
476
expect ( res . isError ?? false ) . toBe ( false ) ;
477
477
expect ( res . content [ 1 ] . text ) . toContain ( "documentID" ) ;
478
478
} ) ;
0 commit comments