@@ -82,7 +82,7 @@ describe('deploy metadata quick NUTs', () => {
8282 } ) ;
8383
8484 describe ( '--job-id' , ( ) => {
85- it ( 'should deploy previously validated deployment' , async ( ) => {
85+ it ( 'should deploy previously validated deployment (async) ' , async ( ) => {
8686 const validation = await testkit . execute < DeployResultJson > ( 'project:deploy:validate' , {
8787 args : '--source-dir force-app' ,
8888 json : true ,
@@ -97,6 +97,26 @@ describe('deploy metadata quick NUTs', () => {
9797 exitCode : 0 ,
9898 } ) ;
9999 assert ( deploy ) ;
100+ assert ( deploy . result . id !== validation . result . id , 'deploy result ID should not be the validation ID' ) ;
101+ await testkit . expect . filesToBeDeployed ( [ 'force-app/**/*' ] , [ 'force-app/test/**/*' ] ) ;
102+ } ) ;
103+
104+ it ( 'should deploy previously validated deployment (poll)' , async ( ) => {
105+ const validation = await testkit . execute < DeployResultJson > ( 'project:deploy:validate' , {
106+ args : '--source-dir force-app' ,
107+ json : true ,
108+ exitCode : 0 ,
109+ } ) ;
110+ assert ( validation ) ;
111+ await testkit . expect . filesToBeDeployed ( [ 'force-app/**/*' ] , [ 'force-app/test/**/*' ] ) ;
112+
113+ const deploy = await testkit . execute < DeployResultJson > ( 'project:deploy:quick' , {
114+ args : `--job-id ${ validation . result . id } --wait 20` ,
115+ json : true ,
116+ exitCode : 0 ,
117+ } ) ;
118+ assert ( deploy ) ;
119+ assert ( deploy . result . id !== validation . result . id , 'deploy result ID should not be the validation ID' ) ;
100120 await testkit . expect . filesToBeDeployed ( [ 'force-app/**/*' ] , [ 'force-app/test/**/*' ] ) ;
101121 } ) ;
102122
0 commit comments