@eclipse-che/che-e2e 7.56.1-dev-bc892b9 → 7.56.1-dev-6dff8fe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TestConstants.ts +12 -7
- package/build/dockerfiles/Dockerfile +4 -3
- package/dist/TestConstants.js +6 -2
- package/dist/TestConstants.js.map +1 -1
- package/dist/driver/CheReporter.js +10 -31
- package/dist/driver/CheReporter.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/inversify.config.js +3 -0
- package/dist/inversify.config.js.map +1 -1
- package/dist/inversify.types.js +1 -0
- package/dist/inversify.types.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +36 -2
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +10 -2
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/ide/theia/Ide.js +1 -1
- package/dist/pageobjects/ide/theia/Ide.js.map +1 -1
- package/dist/tests/MochaHooks.js +75 -0
- package/dist/tests/MochaHooks.js.map +1 -0
- package/dist/tests/devfiles/che-code/EmptyWorkspace.spec.js +11 -24
- package/dist/tests/devfiles/che-code/EmptyWorkspace.spec.js.map +1 -1
- package/dist/tests/devfiles/theia/DotNetCore.spec.js.map +1 -1
- package/dist/tests/devfiles/theia/JavaMaven.spec.js.map +1 -1
- package/dist/tests/e2e/theia/FactoryUrl.spec.js.map +1 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +1 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +1 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +1 -1
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js +2 -2
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js.map +1 -1
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js +1 -1
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js.map +1 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js +29 -19
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +1 -1
- package/dist/testsLibrary/che-code/ProjectAndFileTestsCheCode.js +54 -0
- package/dist/testsLibrary/che-code/ProjectAndFileTestsCheCode.js.map +1 -0
- package/dist/testsLibrary/theia/LanguageServerTestsTheia.js.map +1 -1
- package/dist/testsLibrary/theia/ProjectAndFileTestsTheia.js.map +1 -1
- package/dist/utils/DriverHelper.js +0 -3
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/VCS/github/GitHubUtil.js +2 -2
- package/dist/utils/VCS/github/GitHubUtil.js.map +1 -1
- package/driver/CheReporter.ts +9 -32
- package/index.ts +1 -0
- package/inversify.config.ts +3 -0
- package/inversify.types.ts +1 -0
- package/mocha-all-devfiles-che-code.json +12 -0
- package/mocha-all-devfiles-theia.json +13 -10
- package/mocha-all-factories-che-code.json +14 -0
- package/mocha-all-factories-theia.json +14 -11
- package/mocha-all-plugins-che-code.json +13 -0
- package/mocha-all-plugins-theia.json +13 -10
- package/mocha-che-code.json +12 -0
- package/mocha-connector-theia.json +10 -7
- package/mocha-devworkspace-happy-path-che-code.json +13 -0
- package/mocha-devworkspace-happy-path-theia.json +12 -9
- package/mocha-factory-che-code.json +13 -0
- package/mocha-factory-theia.json +12 -9
- package/mocha-git-publish-branch-theia.json +12 -9
- package/mocha-git-self-sign-cert-theia.json +12 -9
- package/mocha-git-ssh-theia.json +12 -9
- package/mocha-happy-path-che-code.json +14 -0
- package/mocha-happy-path-theia.json +13 -10
- package/mocha-java-maven.json +11 -7
- package/mocha-java-springboot-che-code.json +12 -0
- package/mocha-java-springboot-theia.json +11 -7
- package/mocha-java-vertx-che-code.json +12 -0
- package/mocha-java-vertx-theia.json +11 -7
- package/mocha-load-theia.json +10 -7
- package/mocha-scala.json +11 -7
- package/mocha-single-devfile.json +9 -6
- package/mocha-theia.json +10 -6
- package/mocha-ws-creation-and-ls-theia.json +10 -7
- package/mocha.intelij.json +11 -7
- package/mocha.ocp.link.json +9 -6
- package/mocha.single.plugin.json +6 -5
- package/package.json +11 -11
- package/pageobjects/dashboard/CreateWorkspace.ts +49 -7
- package/pageobjects/dashboard/Workspaces.ts +10 -4
- package/pageobjects/ide/theia/Ide.ts +1 -1
- package/pageobjects/ide/theia/OpenEditors.ts +1 -1
- package/tests/MochaHooks.ts +57 -0
- package/tests/devfiles/che-code/EmptyWorkspace.spec.ts +14 -24
- package/tests/devfiles/theia/DotNetCore.spec.ts +1 -1
- package/tests/devfiles/theia/JavaMaven.spec.ts +1 -1
- package/tests/e2e/theia/FactoryUrl.spec.ts +1 -1
- package/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +1 -1
- package/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +1 -1
- package/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +1 -1
- package/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.ts +3 -3
- package/tests/e2e_happy_path/theia/HappyPath.spec.ts +1 -1
- package/testsLibrary/WorkspaceHandlingTests.ts +48 -41
- package/testsLibrary/che-code/ProjectAndFileTestsCheCode.ts +34 -0
- package/testsLibrary/theia/LanguageServerTestsTheia.ts +2 -2
- package/testsLibrary/theia/ProjectAndFileTestsTheia.ts +2 -2
- package/tslint.json +29 -30
- package/utils/DriverHelper.ts +0 -4
- package/utils/VCS/github/GitHubUtil.ts +2 -2
- package/utils/workspace/ApiUrlResolver.ts +1 -1
- package/utils/workspace/ITestWorkspaceUtil.ts +12 -12
- package/mocha-all-factories-code.json +0 -11
- package/mocha-all-plugins-code.json +0 -10
- package/mocha-code.json +0 -8
- package/mocha-devworkspace-happy-path-code.json +0 -10
- package/mocha-factory-code.json +0 -10
- package/mocha-happy-path-code.json +0 -11
- package/mocha-java-springboot-code.json +0 -9
- package/mocha-java-vertx-code.json +0 -9
|
@@ -21,7 +21,7 @@ const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.
|
|
|
21
21
|
const projectAndFileTests: ProjectAndFileTestsTheia = e2eContainer.get(CLASSES.ProjectAndFileTestsTheia);
|
|
22
22
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
23
23
|
|
|
24
|
-
const factoryUrl
|
|
24
|
+
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple`;
|
|
25
25
|
const workspaceSampleName: string = 'console-java-simple';
|
|
26
26
|
const workspaceRootFolderName: string = 'src';
|
|
27
27
|
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
@@ -21,7 +21,7 @@ const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.
|
|
|
21
21
|
const projectAndFileTests: ProjectAndFileTestsTheia = e2eContainer.get(CLASSES.ProjectAndFileTestsTheia);
|
|
22
22
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
23
23
|
|
|
24
|
-
let factoryUrl
|
|
24
|
+
let factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/java1.11`;
|
|
25
25
|
const workspaceSampleName: string = 'console-java-simple';
|
|
26
26
|
const workspaceRootFolderName: string = 'src';
|
|
27
27
|
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
@@ -55,7 +55,7 @@ const SpringAppLocators = {
|
|
|
55
55
|
|
|
56
56
|
// this test checks only workspace created from "web-nodejs-sample" https://github.com/devfile/devworkspace-operator/blob/main/samples/flattened_theia-next.yaml.
|
|
57
57
|
suite('Workspace creation via factory url', async () => {
|
|
58
|
-
let factoryUrl
|
|
58
|
+
let factoryUrl: string = `${TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`;
|
|
59
59
|
|
|
60
60
|
suite('Open factory URL', async () => {
|
|
61
61
|
// this is DevWorkspace test specific - we create the test ws. using factory instead of chectl
|
|
@@ -106,7 +106,7 @@ suite('Language server validation', async () => {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
test('Error highlighting', async () => {
|
|
109
|
-
await driverHelper.
|
|
109
|
+
await driverHelper.wait(TimeoutConstants.TS_SUGGESTION_TIMEOUT); // workaround https://github.com/eclipse/che/issues/19004
|
|
110
110
|
|
|
111
111
|
const textForErrorDisplaying: string = '$';
|
|
112
112
|
await editor.type(javaFileName, textForErrorDisplaying, 30);
|
|
@@ -242,7 +242,7 @@ async function switchAppWindowAndCheck(contentLocator: By) {
|
|
|
242
242
|
break;
|
|
243
243
|
} else {
|
|
244
244
|
console.log(`----------- The Spring app is not available. Attempt # ${index}. Waiting ${TimeoutConstants.TS_SELENIUM_DIALOG_WIDGET_TIMEOUT}s`);
|
|
245
|
-
await driverHelper.
|
|
245
|
+
await driverHelper.wait(TimeoutConstants.TS_SELENIUM_DIALOG_WIDGET_TIMEOUT);
|
|
246
246
|
await driverHelper.getDriver().navigate().refresh();
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -119,7 +119,7 @@ suite('Language server validation', async () => {
|
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
test('Error highlighting', async () => {
|
|
122
|
-
await driverHelper.
|
|
122
|
+
await driverHelper.wait(TimeoutConstants.TS_SUGGESTION_TIMEOUT); // workaround https://github.com/eclipse/che/issues/19004
|
|
123
123
|
|
|
124
124
|
const textForErrorDisplaying: string = '$';
|
|
125
125
|
await editor.type(javaFileName, textForErrorDisplaying, 30);
|
|
@@ -19,32 +19,23 @@ import { Logger } from '../utils/Logger';
|
|
|
19
19
|
import { ApiUrlResolver } from '../utils/workspace/ApiUrlResolver';
|
|
20
20
|
import { TimeoutConstants } from '../TimeoutConstants';
|
|
21
21
|
import { DriverHelper } from '../utils/DriverHelper';
|
|
22
|
-
import { By } from 'selenium-webdriver';
|
|
22
|
+
import { By, error } from 'selenium-webdriver';
|
|
23
23
|
import { TestConstants } from '../TestConstants';
|
|
24
24
|
|
|
25
25
|
@injectable()
|
|
26
26
|
export class WorkspaceHandlingTests {
|
|
27
27
|
|
|
28
|
-
private static START_WORKSPACE_PAGE_NAME_LOCATOR: By = By.xpath(`//div[@class="ui-container"]/div[@class="pf-c-page"]//div[@class="pf-c-content"]/h1`);
|
|
29
|
-
private static READY_TO_READ_WORKSPACE_NAME_LOCATOR: By = By.xpath(`//div[@class="ui-container"]/div[@class="pf-c-page"]//div[@class="pf-c-content"]/h1[contains(.,'Starting workspace ')]`);
|
|
30
|
-
private static workspaceName: string = 'undefined';
|
|
31
|
-
private static parentGUID: string;
|
|
32
|
-
|
|
33
28
|
public static getWorkspaceName(): string {
|
|
34
29
|
return WorkspaceHandlingTests.workspaceName;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
|
-
public static setWorkspaceName(workspaceName: string) {
|
|
32
|
+
public static setWorkspaceName(workspaceName: string): void {
|
|
38
33
|
WorkspaceHandlingTests.workspaceName = workspaceName;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
public getWindowHandle(): string {
|
|
46
|
-
return WorkspaceHandlingTests.parentGUID;
|
|
47
|
-
}
|
|
36
|
+
private static WORKSPACE_NAME_LOCATOR: By = By.xpath(`//h1[contains(.,'Starting workspace ')]`);
|
|
37
|
+
private static workspaceName: string = 'undefined';
|
|
38
|
+
private static parentGUID: string;
|
|
48
39
|
|
|
49
40
|
constructor(
|
|
50
41
|
@inject(CLASSES.Dashboard) private readonly dashboard: Dashboard,
|
|
@@ -54,7 +45,15 @@ export class WorkspaceHandlingTests {
|
|
|
54
45
|
@inject(CLASSES.ApiUrlResolver) private readonly apiUrlResolver: ApiUrlResolver,
|
|
55
46
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {}
|
|
56
47
|
|
|
57
|
-
public
|
|
48
|
+
public setWindowHandle(guid: string): void {
|
|
49
|
+
WorkspaceHandlingTests.parentGUID = guid;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public getWindowHandle(): string {
|
|
53
|
+
return WorkspaceHandlingTests.parentGUID;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public createAndOpenWorkspace(stack: string): void {
|
|
58
57
|
test(`Create and open new workspace, stack:${stack}`, async () => {
|
|
59
58
|
await this.dashboard.waitPage();
|
|
60
59
|
Logger.debug(`Fetching user kubernetes namespace, storing auth token by getting workspaces API URL.`);
|
|
@@ -62,12 +61,12 @@ export class WorkspaceHandlingTests {
|
|
|
62
61
|
await this.dashboard.clickCreateWorkspaceButton();
|
|
63
62
|
await this.createWorkspace.waitPage();
|
|
64
63
|
WorkspaceHandlingTests.parentGUID = await this.browserTabsUtil.getCurrentWindowHandle();
|
|
65
|
-
await this.createWorkspace.
|
|
64
|
+
await this.createWorkspace.clickOnSampleForSpecificEditor(stack);
|
|
66
65
|
await this.browserTabsUtil.waitAndSwitchToAnotherWindow(WorkspaceHandlingTests.parentGUID, TimeoutConstants.TS_IDE_LOAD_TIMEOUT);
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
public openExistingWorkspace(workspaceName: string) {
|
|
69
|
+
public openExistingWorkspace(workspaceName: string): void {
|
|
71
70
|
test('Open and start existing workspace', async () => {
|
|
72
71
|
await this.dashboard.waitPage();
|
|
73
72
|
Logger.debug(`Fetching user kubernetes namespace, storing auth token by getting workspaces API URL.`);
|
|
@@ -78,47 +77,55 @@ export class WorkspaceHandlingTests {
|
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
public obtainWorkspaceNameFromStartingPage() {
|
|
80
|
+
public obtainWorkspaceNameFromStartingPage(): void {
|
|
82
81
|
test('Obtain workspace name from workspace loader page', async() => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
for (let i = 0; i < attempts; i++) {
|
|
93
|
-
startingWorkspaceLineContent = await this.driverHelper.getDriver().findElement(WorkspaceHandlingTests.START_WORKSPACE_PAGE_NAME_LOCATOR).getAttribute('innerHTML');
|
|
94
|
-
|
|
82
|
+
const timeout: number = TimeoutConstants.TS_IDE_LOAD_TIMEOUT;
|
|
83
|
+
const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
84
|
+
const attempts: number = Math.ceil(timeout / polling);
|
|
85
|
+
|
|
86
|
+
for (let i: number = 0; i < attempts; i++) {
|
|
87
|
+
try {
|
|
88
|
+
let startingWorkspaceLineContent: string = await this.driverHelper.getDriver().findElement(WorkspaceHandlingTests.WORKSPACE_NAME_LOCATOR).getText();
|
|
89
|
+
Logger.trace(`WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage obtained starting workspace getText():${startingWorkspaceLineContent}`);
|
|
95
90
|
// cutting away leading text
|
|
96
91
|
WorkspaceHandlingTests.workspaceName = startingWorkspaceLineContent.substring('Starting workspace '.length).trim();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
Logger.trace(`WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage trimmed workspace name from getText():${WorkspaceHandlingTests.workspaceName}`);
|
|
93
|
+
break;
|
|
94
|
+
} catch (err) {
|
|
95
|
+
if (err instanceof error.StaleElementReferenceError) {
|
|
96
|
+
Logger.warn(`WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage Failed to obtain name from workspace start page, element possibly detached from DOM. Retrying.`);
|
|
97
|
+
await this.driverHelper.wait(polling);
|
|
98
|
+
continue;
|
|
100
99
|
}
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
if (err instanceof error.NoSuchElementError) {
|
|
101
|
+
Logger.warn(`WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage Failed to obtain name from workspace start page, element not visible yet. Retrying.`);
|
|
102
|
+
await this.driverHelper.wait(polling);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
Logger.error(`WorkspaceHandlingTests.obtainWorkspaceNameFromStartingPage Obtaining workspace name failed with an unexpected error:${err}`);
|
|
106
|
+
throw err;
|
|
103
107
|
}
|
|
104
|
-
} catch (err) {
|
|
105
|
-
Logger.error(`Failed to obtain workspace name from workspace loader page: ${err}`);
|
|
106
|
-
throw err;
|
|
107
108
|
}
|
|
109
|
+
if (WorkspaceHandlingTests.workspaceName !== '' && WorkspaceHandlingTests.workspaceName !== undefined) {
|
|
110
|
+
Logger.info(`Obtained workspace name from workspace loader page: ${WorkspaceHandlingTests.workspaceName}`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
Logger.error(`WorkspaceHandlingTests.obtainWorkspaceNameFromSartingPage failed to obtain workspace name:${WorkspaceHandlingTests.workspaceName}`);
|
|
114
|
+
throw new error.InvalidArgumentError(`WorkspaceHandlingTests.obtainWorkspaceNameFromSartingPage failed to obtain workspace name:${WorkspaceHandlingTests.workspaceName}`);
|
|
108
115
|
});
|
|
109
116
|
}
|
|
110
117
|
|
|
111
|
-
public async stopWorkspace(workspaceName: string) {
|
|
118
|
+
public async stopWorkspace(workspaceName: string): Promise<void> {
|
|
112
119
|
await this.dashboard.openDashboard();
|
|
113
120
|
await this.dashboard.stopWorkspaceByUI(workspaceName);
|
|
114
121
|
}
|
|
115
122
|
|
|
116
|
-
public async removeWorkspace(workspaceName: string) {
|
|
123
|
+
public async removeWorkspace(workspaceName: string): Promise<void> {
|
|
117
124
|
await this.dashboard.openDashboard();
|
|
118
125
|
await this.dashboard.deleteStoppedWorkspaceByUI(workspaceName);
|
|
119
126
|
}
|
|
120
127
|
|
|
121
|
-
public async stopAndRemoveWorkspace(workspaceName: string) {
|
|
128
|
+
public async stopAndRemoveWorkspace(workspaceName: string): Promise<void> {
|
|
122
129
|
await this.dashboard.openDashboard();
|
|
123
130
|
await this.dashboard.stopAndRemoveWorkspaceByUI(workspaceName);
|
|
124
131
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made
|
|
5
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
+
**********************************************************************/
|
|
10
|
+
|
|
11
|
+
import 'reflect-metadata';
|
|
12
|
+
import { inject, injectable } from 'inversify';
|
|
13
|
+
import { By, until } from 'selenium-webdriver';
|
|
14
|
+
import { DriverHelper } from '../../utils/DriverHelper';
|
|
15
|
+
import { CLASSES } from '../../inversify.types';
|
|
16
|
+
|
|
17
|
+
@injectable()
|
|
18
|
+
export class ProjectAndFileTestsCheCode {
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {}
|
|
22
|
+
|
|
23
|
+
public async waitWorkspaceReadinessForCheCodeEditor(): Promise<void> {
|
|
24
|
+
try {
|
|
25
|
+
await this.driverHelper.getDriver().wait(until.elementLocated(By.className('monaco-workbench')));
|
|
26
|
+
} catch (err) {
|
|
27
|
+
if ((err as Error).name === 'WebDriverError') {
|
|
28
|
+
await new Promise(res => setTimeout(res, 3000));
|
|
29
|
+
} else {
|
|
30
|
+
throw err;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -97,7 +97,7 @@ export class LanguageServerTestsTheia {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
public goToDefinition(openedFile: string, line: number, char: number, codeNavigationClassName: string, timeout
|
|
100
|
+
public goToDefinition(openedFile: string, line: number, char: number, codeNavigationClassName: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
101
101
|
test('Go to Definition', async () => {
|
|
102
102
|
try {
|
|
103
103
|
await this.editor.moveCursorToLineAndChar(openedFile, line, char);
|
|
@@ -123,7 +123,7 @@ export class LanguageServerTestsTheia {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
public goToImplementations(openedFile: string, line: number, char: number, codeNavigationClassName: string, timeout
|
|
126
|
+
public goToImplementations(openedFile: string, line: number, char: number, codeNavigationClassName: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
127
127
|
test('Go to Implementations', async () => {
|
|
128
128
|
try {
|
|
129
129
|
await this.editor.moveCursorToLineAndChar(openedFile, line, char);
|
|
@@ -55,7 +55,7 @@ export class ProjectAndFileTestsTheia {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
public waitWorkspaceReadiness(sampleName
|
|
58
|
+
public waitWorkspaceReadiness(sampleName: string, folder: string, checkNotification: boolean = true, restartWorkspaceDialogIsExpected: boolean = false) {
|
|
59
59
|
test('Wait for workspace readiness', async () => {
|
|
60
60
|
await this.ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
61
61
|
|
|
@@ -72,7 +72,7 @@ export class ProjectAndFileTestsTheia {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
public waitWorkspaceReadinessNoSubfolder(sampleName
|
|
75
|
+
public waitWorkspaceReadinessNoSubfolder(sampleName: string, checkNotification: boolean = true) {
|
|
76
76
|
test('Wait for workspace readiness', async () => {
|
|
77
77
|
await this.ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
78
78
|
if (checkNotification) {
|
package/tslint.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"forin": true,
|
|
27
27
|
"indent": [
|
|
28
28
|
true,
|
|
29
|
-
|
|
29
|
+
"spaces"
|
|
30
30
|
],
|
|
31
31
|
"interface-name": true,
|
|
32
32
|
"jsdoc-format": true,
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"member-ordering": [
|
|
39
39
|
true,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
{
|
|
41
|
+
"order": "statics-first"
|
|
42
|
+
}
|
|
43
43
|
],
|
|
44
44
|
"no-arg": true,
|
|
45
45
|
"no-bitwise": true,
|
|
@@ -59,15 +59,18 @@
|
|
|
59
59
|
"no-eval": true,
|
|
60
60
|
"no-string-literal": true,
|
|
61
61
|
"no-switch-case-fall-through": true,
|
|
62
|
-
"trailing-comma": [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
"trailing-comma": [
|
|
63
|
+
true,
|
|
64
|
+
{
|
|
65
|
+
"singleline": "never",
|
|
66
|
+
"multiline": {
|
|
67
|
+
"objects": "ignore",
|
|
68
|
+
"arrays": "always",
|
|
69
|
+
"functions": "never",
|
|
70
|
+
"typeLiterals": "ignore"
|
|
71
|
+
}
|
|
69
72
|
}
|
|
70
|
-
|
|
73
|
+
],
|
|
71
74
|
"no-trailing-whitespace": true,
|
|
72
75
|
"no-unused-expression": true,
|
|
73
76
|
"no-unused-variable": true,
|
|
@@ -92,26 +95,21 @@
|
|
|
92
95
|
],
|
|
93
96
|
"typedef": [
|
|
94
97
|
true,
|
|
95
|
-
"
|
|
96
|
-
"
|
|
98
|
+
// "call-signature",
|
|
99
|
+
// "member-variable-declaration",
|
|
97
100
|
"parameter",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
101
|
+
"property-declaration"
|
|
102
|
+
// "variable-declaration"
|
|
100
103
|
],
|
|
101
104
|
"typedef-whitespace": [
|
|
102
105
|
true,
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
[
|
|
112
|
-
"indexSignature",
|
|
113
|
-
"space"
|
|
114
|
-
]
|
|
106
|
+
{
|
|
107
|
+
"call-signature": "nospace",
|
|
108
|
+
"index-signature": "onespace",
|
|
109
|
+
"parameter": "nospace",
|
|
110
|
+
"property-declaration": "nospace",
|
|
111
|
+
"variable-declaration": "nospace"
|
|
112
|
+
}
|
|
115
113
|
],
|
|
116
114
|
"use-strict": false,
|
|
117
115
|
"variable-name": false,
|
|
@@ -121,7 +119,8 @@
|
|
|
121
119
|
"check-decl",
|
|
122
120
|
"check-operator",
|
|
123
121
|
"check-separator",
|
|
124
|
-
"check-type"
|
|
122
|
+
"check-type",
|
|
123
|
+
"check-module"
|
|
125
124
|
]
|
|
126
125
|
}
|
|
127
|
-
}
|
|
126
|
+
}
|
package/utils/DriverHelper.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class GitHubUtil {
|
|
|
82
82
|
const arrayOfPublicKeys = JSON.parse(stringified);
|
|
83
83
|
for (let entry of arrayOfPublicKeys) {
|
|
84
84
|
if (entry.title === keyName) {
|
|
85
|
-
this.removePublicSshKey(authToken, entry.id);
|
|
85
|
+
await this.removePublicSshKey(authToken, entry.id);
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -97,7 +97,7 @@ export class GitHubUtil {
|
|
|
97
97
|
try {
|
|
98
98
|
const idList: string[] = await this.getPublicSshKeys(authToken);
|
|
99
99
|
for (let id of idList) {
|
|
100
|
-
this.removePublicSshKey(authToken, id);
|
|
100
|
+
await this.removePublicSshKey(authToken, id);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
} catch (error) {
|
|
@@ -34,7 +34,7 @@ export class ApiUrlResolver {
|
|
|
34
34
|
return ApiUrlResolver.KUBERNETES_API_URL;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
private async obtainUserNamespace()
|
|
37
|
+
private async obtainUserNamespace(): Promise<string> {
|
|
38
38
|
Logger.debug(`ApiUrlResolver.obtainUserNamespace ${this.userNamespace}`);
|
|
39
39
|
if (this.userNamespace.length === 0) {
|
|
40
40
|
Logger.trace(`ApiUrlResolver.obtainUserNamespace USER_NAMESPACE.length = 0, calling kubernetes API`);
|
|
@@ -12,35 +12,35 @@ import { WorkspaceStatus } from './WorkspaceStatus';
|
|
|
12
12
|
import { che } from '@eclipse-che/api';
|
|
13
13
|
|
|
14
14
|
export interface ITestWorkspaceUtil {
|
|
15
|
-
waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus)
|
|
15
|
+
waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus): void;
|
|
16
16
|
|
|
17
|
-
stopWorkspaceByName(workspaceName: string)
|
|
17
|
+
stopWorkspaceByName(workspaceName: string): void;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Delete a worksapce without stopping phase (similar with force deleting)
|
|
21
21
|
*/
|
|
22
|
-
deleteWorkspaceByName(workspaceName: string)
|
|
22
|
+
deleteWorkspaceByName(workspaceName: string): void;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Stop workspace before deleting with checking stopping phase
|
|
26
26
|
*/
|
|
27
|
-
stopAndDeleteWorkspaceByName(workspaceName: string)
|
|
27
|
+
stopAndDeleteWorkspaceByName(workspaceName: string): void;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Stop all run workspaces in the namespace
|
|
31
31
|
*/
|
|
32
|
-
stopAllRunningWorkspaces(namespace: string)
|
|
32
|
+
stopAllRunningWorkspaces(namespace: string): void;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Stop all run workspaces, check statused and remove the workspaces
|
|
36
36
|
*/
|
|
37
|
-
stopAndDeleteAllRunningWorkspaces(namespace: string)
|
|
37
|
+
stopAndDeleteAllRunningWorkspaces(namespace: string): void;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Stop all run workspaces without stopping and waiting for of 'Stopped' phase
|
|
41
41
|
* Similar with 'force' deleting
|
|
42
42
|
*/
|
|
43
|
-
deleteAllWorkspaces(namespace: string)
|
|
43
|
+
deleteAllWorkspaces(namespace: string): void;
|
|
44
44
|
|
|
45
45
|
/*=====================
|
|
46
46
|
* DEPRECATED METHODS *
|
|
@@ -49,27 +49,27 @@ export interface ITestWorkspaceUtil {
|
|
|
49
49
|
/**
|
|
50
50
|
* @deprecated Method deprecated. Works with CHE server only
|
|
51
51
|
*/
|
|
52
|
-
cleanUpAllWorkspaces()
|
|
52
|
+
cleanUpAllWorkspaces(): void;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated Method deprecated. Works with CHE server only
|
|
56
56
|
*/
|
|
57
|
-
cleanUpRunningWorkspace(workspaceName: string)
|
|
57
|
+
cleanUpRunningWorkspace(workspaceName: string): void;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* @deprecated Method deprecated. Works with CHE server only
|
|
61
61
|
*/
|
|
62
|
-
waitPluginAdding(namespace: string, workspaceName: string, pluginId: string)
|
|
62
|
+
waitPluginAdding(namespace: string, workspaceName: string, pluginId: string): void;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @deprecated Method deprecated. Works with CHE server only
|
|
66
66
|
*/
|
|
67
|
-
removeWorkspaceById(id: string)
|
|
67
|
+
removeWorkspaceById(id: string): void;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* @deprecated Method deprecated. Works with CHE server only
|
|
71
71
|
*/
|
|
72
|
-
stopWorkspaceById(id: string)
|
|
72
|
+
stopWorkspaceById(id: string): void;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @deprecated Method deprecated. Works with CHE server only
|
package/mocha-code.json
DELETED
package/mocha-factory-code.json
DELETED