add model v4 and model v2 tests and test only create new project
This commit is contained in:
Родитель
13a497d781
Коммит
7280626bfa
|
@ -37,7 +37,10 @@ export interface ParallelSuiteOptions {
|
|||
}
|
||||
|
||||
export function addParallelSuite(parallelTests: ParallelTest[], options: ParallelSuiteOptions): void {
|
||||
suite(options.title, function (this: Mocha.Suite): void {
|
||||
if (!options.title.includes("Create New Project")) {
|
||||
return;
|
||||
}
|
||||
suite.only(options.title, function (this: Mocha.Suite): void {
|
||||
this.timeout(options.timeoutMS || 30 * 1000);
|
||||
|
||||
suiteSetup(async function (this: Mocha.Context): Promise<void> {
|
||||
|
|
|
@ -23,8 +23,10 @@ interface CreateProjectAndDeployTestCase extends ICreateProjectAndDeployOptions
|
|||
}
|
||||
|
||||
const testCases: CreateProjectAndDeployTestCase[] = [
|
||||
{ title: 'JavaScript', ...getJavaScriptValidateOptions(true), createProjectInputs: [/Model V3/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'TypeScript', ...getTypeScriptValidateOptions(), createProjectInputs: [/Model V3/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'JavaScript (Model V3)', ...getJavaScriptValidateOptions(true), createProjectInputs: [/Model V3/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'JavaScript (Model V4)', ...getJavaScriptValidateOptions(true), createProjectInputs: [/Model V4/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'TypeScript (Model V3)', ...getTypeScriptValidateOptions(), createProjectInputs: [/Model V3/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'TypeScript (Model V4)', ...getTypeScriptValidateOptions(), createProjectInputs: [/Model V4/], deployInputs: [getRotatingNodeVersion()] },
|
||||
{ title: 'Ballerina', ...getBallerinaValidateOptions(), deployInputs: [/java.*11/i] },
|
||||
// All C# tests on mac and .NET 6 on windows are consistently timing out for some unknown reason. Will skip for now
|
||||
// { title: 'C# .NET Core 3.1', buildMachineOsToSkip: 'darwin', ...getCSharpValidateOptions('netcoreapp3.1'), createProjectInputs: [/net.*3/i], deployInputs: [/net.*3/i], createFunctionInputs: ['Company.Function'] },
|
||||
|
|
|
@ -25,7 +25,9 @@ const testCases: CreateProjectTestCase[] = [
|
|||
|
||||
testCases.push(
|
||||
{ ...getJavaScriptValidateOptions(true /* hasPackageJson */, FuncVersion.v4), inputs: ['Model V3'] },
|
||||
{ ...getJavaScriptValidateOptions(true /* hasPackageJson */, FuncVersion.v4), inputs: ['Model V4'] },
|
||||
{ ...getTypeScriptValidateOptions({ version: FuncVersion.v4 }), inputs: ['Model V3'] },
|
||||
{ ...getTypeScriptValidateOptions({ version: FuncVersion.v4 }), inputs: ['Model V4'] },
|
||||
{ ...getPowerShellValidateOptions(FuncVersion.v4) },
|
||||
{ ...getDotnetScriptValidateOptions(ProjectLanguage.CSharpScript, FuncVersion.v4), isHiddenLanguage: true },
|
||||
{ ...getDotnetScriptValidateOptions(ProjectLanguage.FSharpScript, FuncVersion.v4), isHiddenLanguage: true },
|
||||
|
@ -37,6 +39,12 @@ testCases.push({
|
|||
inputs: [/Model V1/i, TestInput.UseDefaultValue]
|
||||
});
|
||||
|
||||
// test python v2 model
|
||||
testCases.push({
|
||||
...getPythonValidateOptions('.venv', FuncVersion.v4),
|
||||
inputs: [/Model V2/i, TestInput.UseDefaultValue]
|
||||
});
|
||||
|
||||
const appName: string = 'javaApp';
|
||||
const javaBaseInputs: (TestInput | string | RegExp)[] = [/8/, TestInput.UseDefaultValue, TestInput.UseDefaultValue, TestInput.UseDefaultValue, TestInput.UseDefaultValue, appName];
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@ import { FuncVersion, JavaBuildTool, ProjectLanguage, extensionId, getContaining
|
|||
|
||||
export const defaultTestFuncVersion: FuncVersion = FuncVersion.v4;
|
||||
|
||||
// export enum JSModelVersion {
|
||||
// v3 = 'Model V3',
|
||||
// v4 = 'Model V4'
|
||||
// }
|
||||
|
||||
export function getJavaScriptValidateOptions(hasPackageJson: boolean = false, version: FuncVersion = defaultTestFuncVersion, projectSubpath?: string, workspaceFolder?: string): IValidateProjectOptions {
|
||||
const expectedSettings: { [key: string]: string } = {
|
||||
'azureFunctions.projectLanguage': ProjectLanguage.JavaScript,
|
||||
|
|
Загрузка…
Ссылка в новой задаче