@@ -717,11 +717,11 @@ describe('create-yaml-player', () => {
717717 await setupFnCallback ( ) ;
718718 }
719719
720- // Verify that when agent config is undefined, testId is still set from fileName
720+ // Verify that when agent config is undefined, reportFileName is set from fileName
721721 // and aiActionContext is not present (undefined fields are not spread)
722722 const callArgs = getMockCallArg ( vi . mocked ( agentFromAdbDevice ) , 0 , 1 ) ;
723723 expect ( callArgs ) . toMatchObject ( {
724- testId : 'script' ,
724+ reportFileName : 'script' ,
725725 deviceId : 'test-device' ,
726726 } ) ;
727727 expect ( callArgs ) . not . toHaveProperty ( 'aiActionContext' ) ;
@@ -754,11 +754,11 @@ describe('create-yaml-player', () => {
754754 await setupFnCallback ( ) ;
755755 }
756756
757- // Verify that when agent config is undefined, testId is still set from fileName
757+ // Verify that when agent config is undefined, reportFileName is set from fileName
758758 // and aiActionContext is not present (undefined fields are not spread)
759759 const callArgs = getMockCallArg ( vi . mocked ( agentFromWebDriverAgent ) , 0 , 0 ) ;
760760 expect ( callArgs ) . toMatchObject ( {
761- testId : 'script' ,
761+ reportFileName : 'script' ,
762762 } ) ;
763763 expect ( callArgs ) . not . toHaveProperty ( 'aiActionContext' ) ;
764764 } ) ;
@@ -772,7 +772,6 @@ describe('create-yaml-player', () => {
772772 url : 'test.html' ,
773773 } ,
774774 agent : {
775- testId : 'custom-test-id' ,
776775 groupName : 'Custom Group' ,
777776 groupDescription : 'Custom description' ,
778777 generateReport : true ,
@@ -820,7 +819,6 @@ describe('create-yaml-player', () => {
820819 reportFileName : 'custom-report' ,
821820 replanningCycleLimit : 25 ,
822821 aiActionContext : 'Test context' ,
823- testId : 'custom-test-id' , // YAML testId is used
824822 } ) ,
825823 undefined , // browser
826824 undefined , // page
@@ -951,7 +949,7 @@ describe('create-yaml-player', () => {
951949 ) ;
952950 } ) ;
953951
954- test ( 'should prioritize CLI preference testId over YAML testId' , async ( ) => {
952+ test ( 'should prioritize CLI legacy testId over YAML legacy testId for reportFileName ' , async ( ) => {
955953 const mockScript : MidsceneYamlScript = {
956954 web : {
957955 serve : './test' ,
@@ -987,18 +985,18 @@ describe('create-yaml-player', () => {
987985 await setupFnCallback ( ) ;
988986 }
989987
990- // CLI testId should take priority
988+ // CLI legacy testId should take priority for reportFileName
991989 expect ( puppeteerAgentForTarget ) . toHaveBeenCalledWith (
992990 expect . any ( Object ) ,
993991 expect . objectContaining ( {
994- testId : 'cli-test-id' ,
992+ reportFileName : 'cli-test-id' ,
995993 } ) ,
996994 undefined , // browser
997995 undefined , // page
998996 ) ;
999997 } ) ;
1000998
1001- test ( 'should use YAML testId when no preference testId exists' , async ( ) => {
999+ test ( 'should use YAML legacy testId as reportFileName when no explicit reportFileName exists' , async ( ) => {
10021000 const mockScript : MidsceneYamlScript = {
10031001 web : {
10041002 serve : './test' ,
@@ -1032,11 +1030,11 @@ describe('create-yaml-player', () => {
10321030 await setupFnCallback ( ) ;
10331031 }
10341032
1035- // When no explicit CLI testId is provided, YAML testId takes precedence over fileName
1033+ // When no explicit reportFileName/ CLI value is provided, YAML legacy testId takes precedence over fileName
10361034 expect ( puppeteerAgentForTarget ) . toHaveBeenCalledWith (
10371035 expect . any ( Object ) ,
10381036 expect . objectContaining ( {
1039- testId : 'yaml-test-id' ,
1037+ reportFileName : 'yaml-test-id' ,
10401038 } ) ,
10411039 undefined , // browser
10421040 undefined , // page
@@ -1182,7 +1180,7 @@ describe('create-yaml-player', () => {
11821180 expect ( puppeteerAgentForTarget ) . toHaveBeenCalledWith (
11831181 expect . any ( Object ) ,
11841182 expect . objectContaining ( {
1185- testId : 'cdp-test' ,
1183+ reportFileName : 'cdp-test' ,
11861184 groupName : 'CDP Tests' ,
11871185 } ) ,
11881186 expect . any ( Object ) ,
0 commit comments