@@ -314,7 +314,6 @@ describe('Maestro', () => {
314314 platformName : 'Android' ,
315315 version : '14' ,
316316 name : 'My Test' ,
317- build : 'build-123' ,
318317 orientation : 'LANDSCAPE' ,
319318 locale : 'en_US' ,
320319 timeZone : 'America/New_York' ,
@@ -342,7 +341,6 @@ describe('Maestro', () => {
342341 platformName : 'Android' ,
343342 version : '14' ,
344343 name : 'My Test' ,
345- build : 'build-123' ,
346344 orientation : 'LANDSCAPE' ,
347345 locale : 'en_US' ,
348346 timeZone : 'America/New_York' ,
@@ -1618,77 +1616,77 @@ describe('Maestro', () => {
16181616 await expect ( maestroWithArtifacts [ 'validate' ] ( ) ) . resolves . toBe ( true ) ;
16191617 } ) ;
16201618
1621- it ( 'should generate zip filename from --build option' , async ( ) => {
1622- const optionsWithBuild = new MaestroOptions (
1619+ it ( 'should generate zip filename from --name option' , async ( ) => {
1620+ const optionsWithName = new MaestroOptions (
16231621 'path/to/app.apk' ,
16241622 'path/to/flows' ,
16251623 'Pixel 6' ,
16261624 {
16271625 downloadArtifacts : true ,
1628- build : 'my-build-123 ' ,
1626+ name : 'my-test-run ' ,
16291627 } ,
16301628 ) ;
1631- const maestroWithBuild = new Maestro ( mockCredentials , optionsWithBuild ) ;
1629+ const maestroWithName = new Maestro ( mockCredentials , optionsWithName ) ;
16321630
16331631 // Mock access to throw (file doesn't exist)
16341632 ( fs . promises . access as jest . Mock ) . mockRejectedValue ( new Error ( 'ENOENT' ) ) ;
16351633
1636- const zipName = await maestroWithBuild [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1637- expect ( zipName ) . toBe ( 'my-build-123 .zip' ) ;
1634+ const zipName = await maestroWithName [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1635+ expect ( zipName ) . toBe ( 'my-test-run .zip' ) ;
16381636 } ) ;
16391637
1640- it ( 'should sanitize build name for zip filename' , async ( ) => {
1641- const optionsWithBuild = new MaestroOptions (
1638+ it ( 'should sanitize name for zip filename' , async ( ) => {
1639+ const optionsWithName = new MaestroOptions (
16421640 'path/to/app.apk' ,
16431641 'path/to/flows' ,
16441642 'Pixel 6' ,
16451643 {
16461644 downloadArtifacts : true ,
1647- build : 'my build/ test:v1.0' ,
1645+ name : 'my test/run :v1.0' ,
16481646 } ,
16491647 ) ;
1650- const maestroWithBuild = new Maestro ( mockCredentials , optionsWithBuild ) ;
1648+ const maestroWithName = new Maestro ( mockCredentials , optionsWithName ) ;
16511649
16521650 // Mock access to throw (file doesn't exist)
16531651 ( fs . promises . access as jest . Mock ) . mockRejectedValue ( new Error ( 'ENOENT' ) ) ;
16541652
1655- const zipName = await maestroWithBuild [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1656- expect ( zipName ) . toBe ( 'my_build_test_v1_0 .zip' ) ;
1653+ const zipName = await maestroWithName [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1654+ expect ( zipName ) . toBe ( 'my_test_run_v1_0 .zip' ) ;
16571655 } ) ;
16581656
1659- it ( 'should generate timestamp-based zip filename when no --build option' , async ( ) => {
1660- const optionsWithoutBuild = new MaestroOptions (
1657+ it ( 'should generate timestamp-based zip filename when no --name option' , async ( ) => {
1658+ const optionsWithoutName = new MaestroOptions (
16611659 'path/to/app.apk' ,
16621660 'path/to/flows' ,
16631661 'Pixel 6' ,
16641662 { downloadArtifacts : true } ,
16651663 ) ;
1666- const maestroWithoutBuild = new Maestro (
1664+ const maestroWithoutName = new Maestro (
16671665 mockCredentials ,
1668- optionsWithoutBuild ,
1666+ optionsWithoutName ,
16691667 ) ;
16701668
1671- const zipName = await maestroWithoutBuild [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1669+ const zipName = await maestroWithoutName [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
16721670 expect ( zipName ) . toMatch ( / ^ m a e s t r o _ a r t i f a c t s _ \d { 4 } - \d { 2 } - \d { 2 } T .* \. z i p $ / ) ;
16731671 } ) ;
16741672
16751673 it ( 'should add timestamp suffix when zip file already exists' , async ( ) => {
1676- const optionsWithBuild = new MaestroOptions (
1674+ const optionsWithName = new MaestroOptions (
16771675 'path/to/app.apk' ,
16781676 'path/to/flows' ,
16791677 'Pixel 6' ,
16801678 {
16811679 downloadArtifacts : true ,
1682- build : 'existing-build ' ,
1680+ name : 'existing-name ' ,
16831681 } ,
16841682 ) ;
1685- const maestroWithBuild = new Maestro ( mockCredentials , optionsWithBuild ) ;
1683+ const maestroWithName = new Maestro ( mockCredentials , optionsWithName ) ;
16861684
16871685 // Mock access: file exists
16881686 ( fs . promises . access as jest . Mock ) . mockResolvedValueOnce ( undefined ) ;
16891687
1690- const zipName = await maestroWithBuild [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1691- expect ( zipName ) . toMatch ( / ^ e x i s t i n g - b u i l d _ \d + \. z i p $ / ) ;
1688+ const zipName = await maestroWithName [ 'generateArtifactZipName' ] ( '/tmp/test' ) ;
1689+ expect ( zipName ) . toMatch ( / ^ e x i s t i n g - n a m e _ \d + \. z i p $ / ) ;
16921690 } ) ;
16931691
16941692 it ( 'should fetch run details with assets' , async ( ) => {
0 commit comments