@@ -46,7 +46,6 @@ class MockSamDeployWizardContext implements SamDeployWizardContext {
4646 }
4747
4848 public constructor (
49- public readonly templateUris : vscode . Uri [ ] ,
5049 private readonly workspaceFoldersResponses : ( vscode . Uri [ ] | undefined ) [ ] = [ ] ,
5150 private readonly promptForSamTemplateResponses : ( QuickPickUriResponseItem | undefined ) [ ] = [ ] ,
5251 private readonly promptForRegionResponses : ( QuickPickRegionResponseItem | undefined ) [ ] = [ ] ,
@@ -132,23 +131,16 @@ function normalizePath(...paths: string[]): string {
132131describe ( 'SamDeployWizard' , async ( ) => {
133132 describe ( 'TEMPLATE' , async ( ) => {
134133 it ( 'fails gracefully when no templates are found' , async ( ) => {
135- const wizard = new SamDeployWizard ( new MockSamDeployWizardContext ( [ ] , [ [ ] ] , [ undefined ] , [ ] , [ ] ) )
134+ const wizard = new SamDeployWizard ( new MockSamDeployWizardContext ( [ [ ] ] , [ undefined ] , [ ] , [ ] ) )
136135 const result = await wizard . run ( )
137136
138137 assert . ok ( ! result )
139138 } )
140139
141140 it ( 'exits wizard when cancelled' , async ( ) => {
142141 const workspaceFolderPath = normalizePath ( 'my' , 'workspace' , 'folder' )
143- const templatePath = normalizePath ( workspaceFolderPath , 'template.yaml' )
144142 const wizard = new SamDeployWizard (
145- new MockSamDeployWizardContext (
146- [ vscode . Uri . file ( templatePath ) ] ,
147- [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
148- [ undefined ] ,
149- [ ] ,
150- [ ]
151- )
143+ new MockSamDeployWizardContext ( [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] , [ undefined ] , [ ] , [ ] )
152144 )
153145 const result = await wizard . run ( )
154146
@@ -160,7 +152,6 @@ describe('SamDeployWizard', async () => {
160152 const templatePath = normalizePath ( workspaceFolderPath , 'template.yaml' )
161153 const wizard = new SamDeployWizard (
162154 new MockSamDeployWizardContext (
163- [ vscode . Uri . file ( templatePath ) ] ,
164155 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
165156 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
166157 [ createQuickPickRegionResponseItem ( 'asdf' ) ] ,
@@ -194,8 +185,6 @@ describe('SamDeployWizard', async () => {
194185 stackName ?: string
195186 } ) : SamDeployWizardContext {
196187 return {
197- // It's fine to return an empty list if promptUserForSamTemplate is overridden.
198- templateUris : [ ] ,
199188 // It's fine to return an empty list if promptUserForSamTemplate is overridden.
200189 workspaceFolders : [ ] ,
201190
@@ -383,7 +372,6 @@ describe('SamDeployWizard', async () => {
383372
384373 const wizard = new SamDeployWizard (
385374 new MockSamDeployWizardContext (
386- [ vscode . Uri . file ( templatePath ) ] ,
387375 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
388376 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
389377 [ createQuickPickRegionResponseItem ( region ) ] ,
@@ -406,7 +394,6 @@ describe('SamDeployWizard', async () => {
406394
407395 const wizard = new SamDeployWizard (
408396 new MockSamDeployWizardContext (
409- [ vscode . Uri . file ( templatePath1 ) , vscode . Uri . file ( templatePath2 ) ] ,
410397 [ [ vscode . Uri . file ( workspaceFolderPath1 ) ] , [ vscode . Uri . file ( workspaceFolderPath2 ) ] ] ,
411398 [
412399 createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath1 ) ) ,
@@ -438,7 +425,6 @@ describe('SamDeployWizard', async () => {
438425
439426 const wizard = new SamDeployWizard (
440427 new MockSamDeployWizardContext (
441- [ vscode . Uri . file ( templatePath1 ) , vscode . Uri . file ( templatePath2 ) ] ,
442428 [ [ vscode . Uri . file ( workspaceFolderPath1 ) ] , [ vscode . Uri . file ( workspaceFolderPath2 ) ] ] ,
443429 [
444430 createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath1 ) ) ,
@@ -464,7 +450,6 @@ describe('SamDeployWizard', async () => {
464450 const templatePath = normalizePath ( workspaceFolderPath , 'template.yaml' )
465451 const wizard = new SamDeployWizard (
466452 new MockSamDeployWizardContext (
467- [ vscode . Uri . file ( templatePath ) ] ,
468453 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
469454 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
470455 [ createQuickPickRegionResponseItem ( 'asdf' ) ] ,
@@ -485,7 +470,6 @@ describe('SamDeployWizard', async () => {
485470 const templatePath = normalizePath ( workspaceFolderPath , 'template.yaml' )
486471 const wizard = new SamDeployWizard (
487472 new MockSamDeployWizardContext (
488- [ vscode . Uri . file ( templatePath ) ] ,
489473 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
490474 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
491475 [ createQuickPickRegionResponseItem ( 'asdf' ) ] ,
@@ -504,7 +488,6 @@ describe('SamDeployWizard', async () => {
504488 const templatePath = normalizePath ( workspaceFolderPath , 'template.yaml' )
505489 const wizard = new SamDeployWizard (
506490 new MockSamDeployWizardContext (
507- [ vscode . Uri . file ( templatePath ) ] ,
508491 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
509492 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
510493 [ createQuickPickRegionResponseItem ( 'asdf' ) ] ,
@@ -526,7 +509,6 @@ describe('SamDeployWizard', async () => {
526509 try {
527510 await new SamDeployWizard (
528511 new MockSamDeployWizardContext (
529- [ vscode . Uri . file ( templatePath ) ] ,
530512 [ [ vscode . Uri . file ( workspaceFolderPath ) ] ] ,
531513 [ createQuickPickUriResponseItem ( vscode . Uri . file ( templatePath ) ) ] ,
532514 [ createQuickPickRegionResponseItem ( 'asdf' ) ] ,
0 commit comments