@@ -93,7 +93,7 @@ describe('DeployWizard', async function () {
9393 // generate samconfig.toml in temporary test folder
9494 await testFolder . write ( 'samconfig.toml' , samconfigInvalidData )
9595
96- PrompterTester . init ( )
96+ const prompterTester = PrompterTester . init ( )
9797 . handleInputBox ( 'Specify SAM parameter value for SourceBucketName' , ( inputBox ) => {
9898 inputBox . acceptValue ( 'my-source-bucket-name' )
9999 } )
@@ -143,6 +143,7 @@ describe('DeployWizard', async function () {
143143 assert . strictEqual ( parameters . region , 'us-west-2' )
144144 assert . strictEqual ( parameters . stackName , 'stack1' )
145145 assert . strictEqual ( parameters . bucketSource , 0 )
146+ prompterTester . assertAllHandlerCall ( 1 )
146147 } )
147148
148149 it ( 'happy path with valid samconfig.toml' , async ( ) => {
@@ -163,7 +164,7 @@ describe('DeployWizard', async function () {
163164 // generate samconfig.toml in temporary test folder
164165 await testFolder . write ( 'samconfig.toml' , samconfigCompleteData )
165166
166- PrompterTester . init ( )
167+ const prompterTester = PrompterTester . init ( )
167168 . handleInputBox ( 'Specify SAM parameter value for SourceBucketName' , ( inputBox ) => {
168169 inputBox . acceptValue ( 'my-source-bucket-name' )
169170 } )
@@ -194,6 +195,7 @@ describe('DeployWizard', async function () {
194195 assert ( ! parameters . region )
195196 assert ( ! parameters . stackName )
196197 assert ( ! parameters . bucketSource )
198+ prompterTester . assertAllHandlerCall ( 1 )
197199 } )
198200 } )
199201
@@ -301,7 +303,7 @@ describe('DeployWizard', async function () {
301303
302304 await testFolder . write ( 'samconfig.toml' , samconfigCompleteData )
303305
304- PrompterTester . init ( )
306+ const prompterTester = PrompterTester . init ( )
305307 . handleQuickPick ( 'Select a SAM/CloudFormation Template' , async ( quickPick ) => {
306308 // Need sometime to wait for the template to search for template file
307309 await quickPick . untilReady ( )
@@ -331,6 +333,7 @@ describe('DeployWizard', async function () {
331333 assert . strictEqual ( parameters . region , 'us-west-2' )
332334 assert ( ! parameters . stackName )
333335 assert ( ! parameters . bucketSource )
336+ prompterTester . assertAllHandlerCall ( 1 )
334337 } )
335338 } )
336339
@@ -362,7 +365,7 @@ describe('DeployWizard', async function () {
362365 * - bucketName : [Skip] automatically set for bucketSource option 1
363366 */
364367
365- PrompterTester . init ( )
368+ const prompterTester = PrompterTester . init ( )
366369 . handleInputBox ( 'Specify SAM parameter value for SourceBucketName' , ( inputBox ) => {
367370 inputBox . acceptValue ( 'my-source-bucket-name' )
368371 } )
@@ -412,6 +415,7 @@ describe('DeployWizard', async function () {
412415 assert . strictEqual ( parameters . stackName , 'stack2' )
413416 assert . strictEqual ( parameters . bucketSource , 0 )
414417 assert ( ! parameters . bucketName )
418+ prompterTester . assertAllHandlerCall ( 1 )
415419 } )
416420
417421 it ( 'happy path with valid samconfig.toml' , async ( ) => {
@@ -432,7 +436,7 @@ describe('DeployWizard', async function () {
432436 // generate samconfig.toml in temporary test folder
433437 await testFolder . write ( 'samconfig.toml' , samconfigCompleteData )
434438
435- PrompterTester . init ( )
439+ const prompterTester = PrompterTester . init ( )
436440 . handleInputBox ( 'Specify SAM parameter value for SourceBucketName' , ( inputBox ) => {
437441 inputBox . acceptValue ( 'my-source-bucket-name' )
438442 } )
@@ -463,6 +467,7 @@ describe('DeployWizard', async function () {
463467 assert ( ! parameters . region )
464468 assert ( ! parameters . stackName )
465469 assert ( ! parameters . bucketSource )
470+ prompterTester . assertAllHandlerCall ( 1 )
466471 } )
467472 } )
468473
@@ -487,7 +492,7 @@ describe('DeployWizard', async function () {
487492 const templateFile2 = vscode . Uri . file ( await testFolder2 . write ( 'template.yaml' , validTemplateData ) )
488493 await ( await globals . templateRegistry ) . addItem ( templateFile2 )
489494
490- PrompterTester . init ( )
495+ const prompterTester = PrompterTester . init ( )
491496 . handleQuickPick ( 'Select a SAM/CloudFormation Template' , async ( quickPick ) => {
492497 // Need sometime to wait for the template to search for template file
493498 await quickPick . untilReady ( )
@@ -544,6 +549,7 @@ describe('DeployWizard', async function () {
544549 assert . strictEqual ( parameters . stackName , 'stack3' )
545550 assert . strictEqual ( parameters . bucketSource , 1 )
546551 assert . strictEqual ( parameters . bucketName , 'stack-3-bucket' )
552+ prompterTester . assertAllHandlerCall ( 1 )
547553 } )
548554
549555 it ( 'happy path with samconfig.toml' , async ( ) => {
@@ -569,7 +575,7 @@ describe('DeployWizard', async function () {
569575 await testFolder . write ( 'samconfig.toml' , samconfigCompleteData )
570576 // Simulate return of deployed stacks
571577
572- PrompterTester . init ( )
578+ const prompterTester = PrompterTester . init ( )
573579 . handleQuickPick ( 'Select a SAM/CloudFormation Template' , async ( quickPick ) => {
574580 // Need sometime to wait for the template to search for template file
575581 await quickPick . untilReady ( )
@@ -596,6 +602,7 @@ describe('DeployWizard', async function () {
596602 assert ( ! parameters . region )
597603 assert ( ! parameters . stackName )
598604 assert ( ! parameters . bucketSource )
605+ prompterTester . assertAllHandlerCall ( 1 )
599606 } )
600607 } )
601608} )
0 commit comments