-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDeployWorkspaceProjectTestScenario.ts
More file actions
50 lines (45 loc) · 1.99 KB
/
DeployWorkspaceProjectTestScenario.ts
File metadata and controls
50 lines (45 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { type DeploymentConfigurationSettings, type DeployWorkspaceProjectResults, type IActionContext } from "../../../../extension.bundle";
import { type StringOrRegExpProps } from "../../../typeUtils";
export interface DeployWorkspaceProjectTestScenario {
label: string;
folderName: string;
testCases: DeployWorkspaceProjectTestCase[];
}
export interface DeployWorkspaceProjectTestCase {
/**
* Label to display when executing the test
*/
label: string;
/**
* The list of inputs that will be passed to the test UI
*/
inputs: (string | RegExp)[];
/**
* The expected results that should be returned after executing the command
*/
expectedResults?: StringOrRegExpProps<DeployWorkspaceProjectResults>;
/**
* The expected message of the error that should be caught after executing the command
*/
expectedErrMsg?: string | RegExp;
/**
* The expected `.vscode` settings that should be present in the workspace folder root after executing the command
*/
expectedVSCodeSettings?: VSCodeSettings;
/**
* A post test callback that can be added for further verifying any of the created resources before final suite teardown
*/
postTestAssertion?: PostTestAssertion;
/**
* The name of the resource group to delete after long running tests have concluded
*/
resourceGroupToDelete?: string;
}
export type PostTestAssertion = (context: IActionContext, results: DeployWorkspaceProjectResults, errMsg?: string) => void | Promise<void>;
export interface VSCodeSettings {
deploymentConfigurations?: StringOrRegExpProps<DeploymentConfigurationSettings>[];
}