diff --git a/test/nightly/deploy.test.ts b/test/nightly/deploy.test.ts index 5049c984f..20db9e280 100644 --- a/test/nightly/deploy.test.ts +++ b/test/nightly/deploy.test.ts @@ -24,6 +24,7 @@ interface ITestCase { workspaceFolder: string | undefined; runtimePrefix: string; versions: IVersionInfo[]; + zipFile?: string | undefined; } interface IVersionInfo { @@ -55,6 +56,14 @@ suite('Create Web App and deploy', function (this: Mocha.Suite): void { { version: '16', supportedAppOs: 'Both', displayText: '16 LTS' } ] }, + { + runtimePrefix: 'Node', + workspaceFolder: 'testFolder', + zipFile: 'node-hello-1.zip', + versions: [ + { version: '16', supportedAppOs: 'Both', displayText: '16 LTS' } + ] + }, { runtimePrefix: '.NET', workspaceFolder: undefined, @@ -111,7 +120,7 @@ suite('Create Web App and deploy', function (this: Mocha.Suite): void { }); } - async function testCreateWebAppAndDeploy(os: string, promptForOs: boolean, runtime: string, workspacePath: string, expectedVersion: string): Promise { + async function testCreateWebAppAndDeploy(os: string, promptForOs: boolean, runtime: string, workspacePath: string, expectedVersion: string, zipFile?: string): Promise { const resourceName: string = getRandomHexString(); const resourceGroupName = getRandomHexString(); resourceGroupsToDelete.push(resourceGroupName); @@ -132,8 +141,13 @@ suite('Create Web App and deploy', function (this: Mocha.Suite): void { assert.ok(createdApp); await runWithTestActionContext('Deploy', async context => { + await context.ui.runWithInputs([workspacePath, resourceName, 'Deploy'], async () => { - await deploy(context); + if (zipFile) { + await vscode.commands.executeCommand('appService.Deploy', vscode.Uri.file(path.join(workspacePath, zipFile)), undefined, true /*isNewApp*/); + } else { + await deploy(context); + } }); }); diff --git a/test/nightly/testFolder/node-hello-1.zip b/test/nightly/testFolder/node-hello-1.zip new file mode 100644 index 000000000..370664ee9 Binary files /dev/null and b/test/nightly/testFolder/node-hello-1.zip differ