@@ -105,8 +105,14 @@ describe('SyncWizard', async function () {
105105 } )
106106
107107 it ( 'prompts for ECR repo if template has image-based resource' , async function ( ) {
108- const template = { uri : vscode . Uri . file ( '/' ) , data : createBaseImageTemplate ( ) }
109- const tester = await createTester ( { template } )
108+ const workspaceUri = vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri || vscode . Uri . file ( '/' )
109+ const rootFolderUri = vscode . Uri . joinPath ( workspaceUri , 'my' )
110+ const templateUri = vscode . Uri . joinPath ( rootFolderUri , 'template.yaml' )
111+ const template = { uri : templateUri , data : createBaseImageTemplate ( ) }
112+ const tester = await createTester ( {
113+ template,
114+ paramsSource : ParamsSource . Flags ,
115+ } )
110116 tester . ecrRepoUri . assertShow ( )
111117 } )
112118
@@ -116,6 +122,12 @@ describe('SyncWizard', async function () {
116122 tester . ecrRepoUri . assertDoesNotShow ( )
117123 } )
118124
125+ it ( 'skips prompt for ECR repo if param source is to use samconfig' , async function ( ) {
126+ const template = { uri : vscode . Uri . file ( '/' ) , data : createBaseTemplate ( ) }
127+ const tester = await createTester ( { template, paramsSource : ParamsSource . SamConfig } )
128+ tester . ecrRepoUri . assertDoesNotShow ( )
129+ } )
130+
119131 it ( "uses the template's workspace subfolder as the project root is not set" , async function ( ) {
120132 const workspaceUri = vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri
121133 assert . ok ( workspaceUri )
0 commit comments