@eclipse-che/che-e2e 7.43.0 → 7.44.1-dev-bc873f3
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/README.md +16 -1
- package/dist/driver/CheReporter.js +4 -4
- package/dist/driver/CheReporter.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +4 -0
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/ide/Ide.js +31 -7
- package/dist/pageobjects/ide/Ide.js.map +1 -1
- package/dist/pageobjects/ide/PreviewWidget.js +6 -2
- package/dist/pageobjects/ide/PreviewWidget.js.map +1 -1
- package/dist/pageobjects/ide/ProjectTree.js +12 -11
- package/dist/pageobjects/ide/ProjectTree.js.map +1 -1
- package/dist/tests/devfiles/DotNetCore.spec.js +1 -1
- package/dist/tests/devfiles/DotNetCore.spec.js.map +1 -1
- package/dist/tests/devfiles/Go.spec.js +15 -15
- package/dist/tests/devfiles/Go.spec.js.map +1 -1
- package/dist/tests/e2e/OpenshiftConnector.spec.js +2 -2
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js +10 -9
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +1 -1
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js +10 -9
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +1 -1
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js +15 -14
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +1 -1
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js +17 -16
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js.map +1 -1
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js +3 -2
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/JavaPlugin.spec.js +27 -23
- package/dist/tests/plugins/JavaPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/PythonPlugin.spec.js +10 -14
- package/dist/tests/plugins/PythonPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/TypescriptPlugin.spec.js +14 -22
- package/dist/tests/plugins/TypescriptPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js +11 -20
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js.map +1 -1
- package/dist/testsLibrary/CodeExecutionTests.js +1 -2
- package/dist/testsLibrary/CodeExecutionTests.js.map +1 -1
- package/dist/testsLibrary/LanguageServerTests.js +5 -12
- package/dist/testsLibrary/LanguageServerTests.js.map +1 -1
- package/dist/testsLibrary/ProjectAndFileTests.js +0 -5
- package/dist/testsLibrary/ProjectAndFileTests.js.map +1 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js +11 -7
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +1 -1
- package/dist/utils/PreferencesHandler.js +3 -0
- package/dist/utils/PreferencesHandler.js.map +1 -1
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js +3 -15
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js +3 -3
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js.map +1 -1
- package/driver/CheReporter.ts +4 -4
- package/index.ts +1 -1
- package/mocha-all-factories.json +2 -1
- package/package.json +3 -3
- package/pageobjects/dashboard/Dashboard.ts +6 -1
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +1 -1
- package/pageobjects/ide/Ide.ts +30 -7
- package/pageobjects/ide/PreviewWidget.ts +6 -2
- package/pageobjects/ide/ProjectTree.ts +9 -11
- package/tests/devfiles/DotNetCore.spec.ts +1 -1
- package/tests/devfiles/Go.spec.ts +15 -17
- package/tests/e2e/OpenshiftConnector.spec.ts +2 -2
- package/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +15 -13
- package/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +15 -14
- package/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +19 -20
- package/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts +123 -124
- package/tests/plugins/GitHubPullRequestPlugin.spec.ts +3 -2
- package/tests/plugins/JavaPlugin.spec.ts +20 -26
- package/tests/plugins/PythonPlugin.spec.ts +13 -17
- package/tests/plugins/TypescriptPlugin.spec.ts +18 -27
- package/tests/plugins/VscodeYamlPlugin.spec.ts +14 -24
- package/testsLibrary/CodeExecutionTests.ts +1 -2
- package/testsLibrary/LanguageServerTests.ts +4 -9
- package/testsLibrary/ProjectAndFileTests.ts +3 -6
- package/testsLibrary/WorkspaceHandlingTests.ts +8 -4
- package/tsconfig.json +1 -0
- package/tslint.json +119 -115
- package/utils/PreferencesHandler.ts +3 -0
- package/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +3 -9
- package/utils/requestHandlers/tokens/CheMultiuserTokenHandler.ts +20 -18
- package/dist/utils/KeycloackUrlHandler.js +0 -30
- package/dist/utils/KeycloackUrlHandler.js.map +0 -1
- package/utils/KeycloackUrlHandler.ts +0 -32
package/index.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './driver/IDriver';
|
|
|
9
9
|
export * from './utils/AnimationChecker';
|
|
10
10
|
export * from './utils/BrowserTabsUtil';
|
|
11
11
|
export * from './utils/DriverHelper';
|
|
12
|
-
export * from './utils/KeycloackUrlHandler';
|
|
13
12
|
export * from './utils/Logger';
|
|
14
13
|
export * from './utils/PreferencesHandler';
|
|
15
14
|
export * from './utils/requestHandlers/CheApiRequestHandler';
|
|
@@ -39,6 +38,7 @@ export * from './pageobjects/ide/LeftToolBar';
|
|
|
39
38
|
export * from './pageobjects/ide/NavigationBar';
|
|
40
39
|
export * from './pageobjects/ide/NotificationCenter';
|
|
41
40
|
export * from './pageobjects/ide/OpenDialogWidget';
|
|
41
|
+
export * from './pageobjects/ide/OpenEditors';
|
|
42
42
|
export * from './pageobjects/ide/OpenWorkspaceWidget';
|
|
43
43
|
export * from './pageobjects/ide/plugins/GitHubPullRequestPlugin';
|
|
44
44
|
export * from './pageobjects/ide/plugins/GitPlugin';
|
package/mocha-all-factories.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"require": "source-map-support/register",
|
|
8
8
|
"spec": [
|
|
9
9
|
"dist/tests/login/Login.spec.js",
|
|
10
|
-
"dist/tests/e2e/factories
|
|
10
|
+
"dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js",
|
|
11
|
+
"dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js"
|
|
11
12
|
]
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-che/che-e2e",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.44.1-dev-bc873f3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tsc": "tsc -p .",
|
|
27
27
|
"init-mocha-opts": "tsc && mocha --config mocha-single-devfile.json --spec dist/tests/login/Login.spec.js",
|
|
28
28
|
"test-plugin": "./initPluginTest.sh",
|
|
29
|
-
"test-plugin-ci": "export TS_DELETE_PLUGINS_TEST_WORKSPACE=
|
|
29
|
+
"test-plugin-ci": "export TS_DELETE_PLUGINS_TEST_WORKSPACE=true && npm run init-mocha-opts -- --spec dist/tests/plugins/${USERSTORY}.spec.js",
|
|
30
30
|
"test-all-plugins": "tsc && mocha --config mocha-all-plugins.json"
|
|
31
31
|
},
|
|
32
32
|
"author": "Ihor Okhrimenko (iokhrime@redhat.com)",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/selenium-webdriver": "3.0.16",
|
|
40
40
|
"axios": "^0.25.0",
|
|
41
41
|
"chai": "4.2.0",
|
|
42
|
-
"chromedriver": "
|
|
42
|
+
"chromedriver": "^99.0.0",
|
|
43
43
|
"mocha": "^9.1.3",
|
|
44
44
|
"rimraf": "2.6.2",
|
|
45
45
|
"selenium-webdriver": "3.6.0",
|
|
@@ -60,7 +60,6 @@ export class Dashboard {
|
|
|
60
60
|
|
|
61
61
|
async openDashboard() {
|
|
62
62
|
Logger.debug('Dashboard.openDashboard');
|
|
63
|
-
|
|
64
63
|
await this.driverHelper.getDriver().navigate().to(TestConstants.TS_SELENIUM_BASE_URL);
|
|
65
64
|
await this.waitPage();
|
|
66
65
|
|
|
@@ -109,4 +108,10 @@ export class Dashboard {
|
|
|
109
108
|
await this.driverHelper.waitPresence(By.css(Dashboard.WORKSPACE_STARTING_PAGE_CSS), timeout);
|
|
110
109
|
}
|
|
111
110
|
|
|
111
|
+
async getRecentWorkspaceName(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
112
|
+
Logger.debug(`Dashboard.recentWorkspaceName`);
|
|
113
|
+
|
|
114
|
+
return await this.driverHelper.waitAndGetText(By.css('[data-testid="recent-workspace-item"]'), timeout);
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
}
|
|
@@ -85,7 +85,7 @@ export class WorkspaceDetails {
|
|
|
85
85
|
Logger.debug(`WorkspaceDetails.openWorkspace "${namespace}/${workspaceName}"`);
|
|
86
86
|
|
|
87
87
|
await this.clickOnOpenButton(timeout);
|
|
88
|
-
await this.driverHelper.waitVisibility(By.css(Ide.
|
|
88
|
+
await this.driverHelper.waitVisibility(By.css(Ide.THEIA_EDITOR_CSS), TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT);
|
|
89
89
|
await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.STARTING);
|
|
90
90
|
}
|
|
91
91
|
|
package/pageobjects/ide/Ide.ts
CHANGED
|
@@ -29,7 +29,7 @@ export enum LeftToolbarButton {
|
|
|
29
29
|
export class Ide {
|
|
30
30
|
public static readonly EXPLORER_BUTTON_ID: string = 'shell-tab-explorer-view-container';
|
|
31
31
|
public static readonly SELECTED_EXPLORER_BUTTON_CSS: string = 'li#shell-tab-explorer-view-container.theia-mod-active';
|
|
32
|
-
public static readonly
|
|
32
|
+
public static readonly THEIA_EDITOR_CSS: string = '#theia-main-content-panel';
|
|
33
33
|
public static readonly SELECTED_GIT_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Git\' and contains(@class, \'p-mod-current\')])[1]';
|
|
34
34
|
private static readonly TOP_MENU_PANEL_CSS: string = '#theia-app-shell #theia-top-panel .p-MenuBar-content';
|
|
35
35
|
private static readonly LEFT_CONTENT_PANEL_CSS: string = '#theia-left-content-panel';
|
|
@@ -41,21 +41,34 @@ export class Ide {
|
|
|
41
41
|
@inject(CLASSES.NotificationCenter) private readonly notificationCenter: NotificationCenter
|
|
42
42
|
) { }
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Method deprecated. Iframe is not available, Replace it with waitForEditor() or waitIde() method incase for conditional wait
|
|
46
|
+
* @see Ide.waitForEditor()
|
|
47
|
+
*/
|
|
44
48
|
async waitAndSwitchToIdeFrame(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
|
|
45
49
|
Logger.debug('Ide.waitAndSwitchToIdeFrame');
|
|
46
50
|
try {
|
|
47
51
|
await this.driverHelper.waitAndSwitchToFrame(By.css(Ide.IDE_IFRAME_CSS), timeout);
|
|
48
52
|
} catch (err) {
|
|
49
53
|
if (err instanceof error.StaleElementReferenceError) {
|
|
50
|
-
Logger.warn('StaleElementException
|
|
54
|
+
Logger.warn('StaleElementException occurred during waiting for IDE. Sleeping for 2 secs and retrying.');
|
|
51
55
|
this.driverHelper.wait(2000);
|
|
52
|
-
|
|
56
|
+
try {
|
|
57
|
+
await this.driverHelper.waitAndSwitchToFrame(By.css(Ide.IDE_IFRAME_CSS), timeout);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
if (err instanceof error.TimeoutError) {
|
|
60
|
+
Logger.warn(`Iframe is not available even after ${timeout} milliseconds, checking for visibility of #theia-main-content-panel.`);
|
|
61
|
+
await this.driverHelper.isVisible(By.css('#theia-main-content-panel'));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
53
66
|
return;
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
if (err instanceof error.TimeoutError) {
|
|
57
|
-
Logger.
|
|
58
|
-
|
|
70
|
+
Logger.warn(`Iframe is not available even after ${timeout} milliseconds, checking for visibility of #theia-main-content-panel.`);
|
|
71
|
+
await this.driverHelper.isVisible(By.css('#theia-main-content-panel'));
|
|
59
72
|
}
|
|
60
73
|
|
|
61
74
|
Logger.error(`Switching to IDE frame failed.`);
|
|
@@ -63,6 +76,16 @@ export class Ide {
|
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
78
|
|
|
79
|
+
async waitForEditor(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
|
|
80
|
+
Logger.debug('Ide.waitForEditor');
|
|
81
|
+
try {
|
|
82
|
+
await this.driverHelper.waitVisibility(By.css(Ide.THEIA_EDITOR_CSS), timeout);
|
|
83
|
+
} catch (err) {
|
|
84
|
+
Logger.warn(`Editor is not displayed even after ${timeout} milliseconds.`);
|
|
85
|
+
throw err;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
66
89
|
async waitNotification(notificationText: string, timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
|
|
67
90
|
Logger.debug(`Ide.waitNotification "${notificationText}"`);
|
|
68
91
|
|
|
@@ -157,11 +180,11 @@ export class Ide {
|
|
|
157
180
|
|
|
158
181
|
Logger.debug('Ide.waitWorkspaceAndIde');
|
|
159
182
|
|
|
160
|
-
await this.
|
|
183
|
+
await this.waitForEditor(timeout);
|
|
161
184
|
await this.waitIde(timeout);
|
|
162
185
|
}
|
|
163
186
|
|
|
164
|
-
async waitIde(timeout: number = TimeoutConstants.
|
|
187
|
+
async waitIde(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
|
|
165
188
|
Logger.debug('Ide.waitIde');
|
|
166
189
|
|
|
167
190
|
const mainIdeParts: Array<By> = [By.css(Ide.TOP_MENU_PANEL_CSS), By.css(Ide.LEFT_CONTENT_PANEL_CSS), By.id(Ide.EXPLORER_BUTTON_ID)];
|
|
@@ -76,6 +76,9 @@ export class PreviewWidget {
|
|
|
76
76
|
}, timeout);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Method deprecated. Iframe is not available anymore
|
|
81
|
+
*/
|
|
79
82
|
async waitAndSwitchToWidgetFrame() {
|
|
80
83
|
Logger.debug('PreviewWidget.waitAndSwitchToWidgetFrame');
|
|
81
84
|
|
|
@@ -98,8 +101,6 @@ export class PreviewWidget {
|
|
|
98
101
|
await this.driverHelper.getDriver().wait(async () => {
|
|
99
102
|
const isApplicationTitleVisible: boolean = await this.driverHelper.isVisible(contentLocator);
|
|
100
103
|
if (isApplicationTitleVisible) {
|
|
101
|
-
await this.driverHelper.getDriver().switchTo().defaultContent();
|
|
102
|
-
await this.ide.waitAndSwitchToIdeFrame();
|
|
103
104
|
return true;
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -125,6 +126,9 @@ export class PreviewWidget {
|
|
|
125
126
|
await this.driverHelper.waitAndClick(PreviewWidget.WIDGET_REFRESH_BUTTON_LOCATOR);
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated Method deprecated. Iframe is not available.
|
|
131
|
+
*/
|
|
128
132
|
async switchBackToIdeFrame() {
|
|
129
133
|
Logger.debug('PreviewWidget.switchBackToIdeFrame');
|
|
130
134
|
|
|
@@ -18,6 +18,7 @@ import { By, error } from 'selenium-webdriver';
|
|
|
18
18
|
import { Editor } from './Editor';
|
|
19
19
|
import { Logger } from '../../utils/Logger';
|
|
20
20
|
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
21
|
+
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
21
22
|
|
|
22
23
|
@injectable()
|
|
23
24
|
export class ProjectTree {
|
|
@@ -26,7 +27,8 @@ export class ProjectTree {
|
|
|
26
27
|
constructor(
|
|
27
28
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
28
29
|
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
29
|
-
@inject(CLASSES.Editor) private readonly editor: Editor
|
|
30
|
+
@inject(CLASSES.Editor) private readonly editor: Editor,
|
|
31
|
+
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil) { }
|
|
30
32
|
|
|
31
33
|
async clickCollapseAllButton() {
|
|
32
34
|
Logger.debug('ProjectTree.clickCollapseAllButton');
|
|
@@ -237,9 +239,8 @@ export class ProjectTree {
|
|
|
237
239
|
|
|
238
240
|
if (!isProjectFolderVisible) {
|
|
239
241
|
Logger.trace(`ProjectTree.waitProjectImported project not located, reloading page.`);
|
|
240
|
-
await this.
|
|
241
|
-
await this.ide.
|
|
242
|
-
await this.ide.waitIde();
|
|
242
|
+
await this.browserTabsUtil.refreshPage();
|
|
243
|
+
await this.ide.waitWorkspaceAndIde();
|
|
243
244
|
await this.openProjectTreeContainer();
|
|
244
245
|
continue;
|
|
245
246
|
}
|
|
@@ -253,13 +254,11 @@ export class ProjectTree {
|
|
|
253
254
|
|
|
254
255
|
if (!isRootSubItemVisible) {
|
|
255
256
|
Logger.trace(`ProjectTree.waitProjectImported sub-items not found, reloading page.`);
|
|
256
|
-
await this.
|
|
257
|
-
await this.ide.
|
|
258
|
-
await this.ide.waitIde();
|
|
257
|
+
await this.browserTabsUtil.refreshPage();
|
|
258
|
+
await this.ide.waitWorkspaceAndIde();
|
|
259
259
|
await this.openProjectTreeContainer();
|
|
260
260
|
continue;
|
|
261
261
|
}
|
|
262
|
-
|
|
263
262
|
return;
|
|
264
263
|
}
|
|
265
264
|
|
|
@@ -281,10 +280,9 @@ export class ProjectTree {
|
|
|
281
280
|
|
|
282
281
|
if (!isProjectFolderVisible) {
|
|
283
282
|
Logger.trace(`ProjectTree.waitProjectImportedNoSubfolder project not located, reloading page.`);
|
|
284
|
-
await this.
|
|
283
|
+
await this.browserTabsUtil.refreshPage();
|
|
285
284
|
await this.driverHelper.wait(triesPolling);
|
|
286
|
-
await this.ide.
|
|
287
|
-
await this.ide.waitIde();
|
|
285
|
+
await this.ide.waitWorkspaceAndIde();
|
|
288
286
|
await this.openProjectTreeContainer();
|
|
289
287
|
continue;
|
|
290
288
|
}
|
|
@@ -27,7 +27,7 @@ const workspaceSampleName: string = 'dotnet-web-simple';
|
|
|
27
27
|
const fileFolderPath: string = `${workspaceSampleName}`;
|
|
28
28
|
const tabTitle: string = 'Program.cs';
|
|
29
29
|
// const codeNavigationClassName: string = '[metadata] Console.cs';
|
|
30
|
-
const stack : string = '.NET Core';
|
|
30
|
+
const stack : string = 'ASP.NET Core Web Application';
|
|
31
31
|
const updateDependenciesTaskName: string = 'update dependencies';
|
|
32
32
|
const buildTaskName: string = 'build';
|
|
33
33
|
const runTaskName: string = 'run';
|
|
@@ -25,32 +25,30 @@ const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExec
|
|
|
25
25
|
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
26
26
|
|
|
27
27
|
const workspaceStack: string = 'Go';
|
|
28
|
-
const workspaceSampleName: string = 'example';
|
|
29
|
-
const workspaceSubfolderName: string = '
|
|
28
|
+
const workspaceSampleName: string = 'golang-example';
|
|
29
|
+
const workspaceSubfolderName: string = 'template';
|
|
30
30
|
const fileFolderPath: string = `${workspaceSampleName}/${workspaceSubfolderName}`;
|
|
31
31
|
const fileName: string = `main.go`;
|
|
32
32
|
|
|
33
|
-
const taskRunServer: string = '
|
|
34
|
-
const taskStopServer: string = '
|
|
35
|
-
const taskTestOutyet: string = '
|
|
33
|
+
const taskRunServer: string = 'run-outyet';
|
|
34
|
+
const taskStopServer: string = 'stop-outyet';
|
|
35
|
+
const taskTestOutyet: string = 'test-outyet';
|
|
36
36
|
const notificationText: string = 'Process 8080-tcp is now listening on port 8080. Open it ?';
|
|
37
37
|
let workspaceName: string;
|
|
38
38
|
|
|
39
39
|
suite(`${workspaceStack} test`, async () => {
|
|
40
40
|
|
|
41
41
|
suite(`Create ${workspaceStack} workspace`, async () => {
|
|
42
|
-
test('Workaround for issue #16113', async () => {
|
|
43
|
-
Logger.warn(`Manually setting a preference for golang devfile LS based on issue: https://github.com/eclipse/che/issues/16113`);
|
|
44
|
-
await preferencesHandler.setUseGoLanaguageServer();
|
|
45
|
-
});
|
|
46
42
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
47
|
-
|
|
48
43
|
test('Register running workspace', async () => {
|
|
49
44
|
workspaceName = WorkspaceHandlingTests.getWorkspaceName();
|
|
50
45
|
CheReporter.registerRunningWorkspace(workspaceName);
|
|
51
46
|
});
|
|
52
|
-
|
|
53
47
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceSubfolderName, false);
|
|
48
|
+
test('Workaround for issue #16113', async () => {
|
|
49
|
+
Logger.warn(`Manually setting a preference for golang devFile LS based on issue: https://github.com/eclipse/che/issues/16113`);
|
|
50
|
+
await preferencesHandler.setPreferenceUsingUI('go.useLanguageServer', true);
|
|
51
|
+
});
|
|
54
52
|
});
|
|
55
53
|
|
|
56
54
|
suite('Test opening file', async () => {
|
|
@@ -59,24 +57,24 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
59
57
|
});
|
|
60
58
|
|
|
61
59
|
suite('Test golang example', async () => {
|
|
62
|
-
codeExecutionTests.runTask(taskTestOutyet,
|
|
60
|
+
codeExecutionTests.runTask(taskTestOutyet, 80_000);
|
|
63
61
|
codeExecutionTests.closeTerminal(taskTestOutyet);
|
|
64
62
|
});
|
|
65
63
|
|
|
66
64
|
suite('Run golang example server', async () => {
|
|
67
65
|
codeExecutionTests.runTaskWithNotification(taskRunServer, notificationText, 40_000);
|
|
68
|
-
codeExecutionTests.runTask(taskStopServer,
|
|
66
|
+
codeExecutionTests.runTask(taskStopServer, 8_000);
|
|
69
67
|
});
|
|
70
68
|
|
|
71
69
|
suite(`'Language server validation'`, async () => {
|
|
72
|
-
commonLanguageServerTests.suggestionInvoking(fileName,
|
|
73
|
-
commonLanguageServerTests.autocomplete(fileName,
|
|
74
|
-
commonLanguageServerTests.errorHighlighting(fileName, 'error;\n',
|
|
70
|
+
commonLanguageServerTests.suggestionInvoking(fileName, 41, 49, 'Parse');
|
|
71
|
+
commonLanguageServerTests.autocomplete(fileName, 41, 49, 'Parse');
|
|
72
|
+
commonLanguageServerTests.errorHighlighting(fileName, 'error;\n', 41);
|
|
75
73
|
// commonLanguageServerTests.goToImplementations(fileName, 42, 10, 'flag.go'); // codenavigation is inconsistent https://github.com/eclipse/che/issues/16929
|
|
76
74
|
});
|
|
77
75
|
|
|
78
76
|
suite('Stop and remove workspace', async() => {
|
|
79
|
-
test(`Stop and
|
|
77
|
+
test(`Stop and remove workspace`, async () => {
|
|
80
78
|
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
81
79
|
});
|
|
82
80
|
});
|
|
@@ -59,14 +59,14 @@ suite('Openshift connector user story', async () => {
|
|
|
59
59
|
'location': 'https://github.com/maxura/nodejs-hello-world.git',
|
|
60
60
|
'type': 'git'
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
63
|
],
|
|
64
64
|
|
|
65
65
|
wsConfig.components = [
|
|
66
66
|
{
|
|
67
67
|
'id': 'redhat/vscode-openshift-connector/latest',
|
|
68
68
|
'type': 'chePlugin'
|
|
69
|
-
}
|
|
69
|
+
},
|
|
70
70
|
];
|
|
71
71
|
|
|
72
72
|
await browserTabsUtil.navigateTo(TestConstants.TS_SELENIUM_BASE_URL);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// /*********************************************************************
|
|
2
|
-
// * Copyright (c)
|
|
2
|
+
// * Copyright (c) 2022 Red Hat, Inc.
|
|
3
3
|
// *
|
|
4
4
|
// * This program and the accompanying materials are made
|
|
5
5
|
// * available under the terms of the Eclipse Public License 2.0
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
// **********************************************************************/
|
|
10
10
|
|
|
11
11
|
import { e2eContainer } from '../../../inversify.config';
|
|
12
|
-
import { CLASSES
|
|
12
|
+
import { CLASSES } from '../../../inversify.types';
|
|
13
13
|
import { TestConstants } from '../../../TestConstants';
|
|
14
14
|
import { ProjectAndFileTests } from '../../../testsLibrary/ProjectAndFileTests';
|
|
15
15
|
import CheReporter from '../../../driver/CheReporter';
|
|
16
16
|
import { BrowserTabsUtil } from '../../../utils/BrowserTabsUtil';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import { PreferencesHandler } from '../../../utils/PreferencesHandler';
|
|
19
19
|
|
|
20
|
+
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
21
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
22
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
21
23
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
22
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
23
|
-
const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get<TestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
24
24
|
|
|
25
25
|
const factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/master/src`;
|
|
26
26
|
const workspaceSampleName: string = 'console-java-simple';
|
|
@@ -28,9 +28,8 @@ const workspaceRootFolderName: string = 'src';
|
|
|
28
28
|
const fileName: string = 'pom.xml';
|
|
29
29
|
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
30
30
|
const tabTitle: string = 'HelloWorld.java';
|
|
31
|
-
let workspaceName: string;
|
|
31
|
+
let workspaceName: string = 'console-java-simple';
|
|
32
32
|
|
|
33
|
-
// the suite expect user to be logged in
|
|
34
33
|
suite('Workspace creation via factory url', async () => {
|
|
35
34
|
suite('Open factory URL', async () => {
|
|
36
35
|
test(`Navigating to factory URL`, async () => {
|
|
@@ -39,7 +38,13 @@ suite('Workspace creation via factory url', async () => {
|
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
suite('Wait workspace readyness', async () => {
|
|
42
|
-
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName
|
|
41
|
+
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
|
|
42
|
+
|
|
43
|
+
test('Set confirmExit preference to never', async () => {
|
|
44
|
+
CheReporter.registerRunningWorkspace(workspaceName);
|
|
45
|
+
|
|
46
|
+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
47
|
+
});
|
|
43
48
|
});
|
|
44
49
|
|
|
45
50
|
suite('Check imported project', async () => {
|
|
@@ -51,10 +56,7 @@ suite('Workspace creation via factory url', async () => {
|
|
|
51
56
|
|
|
52
57
|
suite ('Stopping and deleting the workspace', async () => {
|
|
53
58
|
test('Stop and remove workspace', async () => {
|
|
54
|
-
|
|
55
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
56
|
-
|
|
57
|
-
await testWorkspaceUtils.cleanUpRunningWorkspace(workspaceName);
|
|
59
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
58
60
|
});
|
|
59
61
|
});
|
|
60
62
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// /*********************************************************************
|
|
2
|
-
// * Copyright (c)
|
|
2
|
+
// * Copyright (c) 2022 Red Hat, Inc.
|
|
3
3
|
// *
|
|
4
4
|
// * This program and the accompanying materials are made
|
|
5
5
|
// * available under the terms of the Eclipse Public License 2.0
|
|
@@ -9,27 +9,26 @@
|
|
|
9
9
|
// **********************************************************************/
|
|
10
10
|
|
|
11
11
|
import { e2eContainer } from '../../../inversify.config';
|
|
12
|
-
import { CLASSES
|
|
12
|
+
import { CLASSES } from '../../../inversify.types';
|
|
13
13
|
import { TestConstants } from '../../../TestConstants';
|
|
14
14
|
import { ProjectAndFileTests } from '../../../testsLibrary/ProjectAndFileTests';
|
|
15
15
|
import CheReporter from '../../../driver/CheReporter';
|
|
16
16
|
import { BrowserTabsUtil } from '../../../utils/BrowserTabsUtil';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import { PreferencesHandler } from '../../../utils/PreferencesHandler';
|
|
19
19
|
|
|
20
|
+
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
21
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
22
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
21
23
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
22
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
23
|
-
const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get<TestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
24
24
|
|
|
25
25
|
const factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple`;
|
|
26
26
|
const workspaceSampleName: string = 'console-java-simple';
|
|
27
27
|
const workspaceRootFolderName: string = 'src';
|
|
28
28
|
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
29
29
|
const tabTitle: string = 'HelloWorld.java';
|
|
30
|
-
let workspaceName: string;
|
|
30
|
+
let workspaceName: string = 'console-java-simple';
|
|
31
31
|
|
|
32
|
-
// the suite expect user to be logged in
|
|
33
32
|
suite('Workspace creation via factory url', async () => {
|
|
34
33
|
suite('Open factory URL', async () => {
|
|
35
34
|
test(`Navigating to factory URL`, async () => {
|
|
@@ -38,21 +37,23 @@ suite('Workspace creation via factory url', async () => {
|
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
suite('Wait workspace readyness', async () => {
|
|
41
|
-
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName
|
|
40
|
+
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
|
|
41
|
+
|
|
42
|
+
test('Set confirmExit preference to never', async () => {
|
|
43
|
+
CheReporter.registerRunningWorkspace(workspaceName);
|
|
44
|
+
|
|
45
|
+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
46
|
+
});
|
|
42
47
|
});
|
|
43
48
|
|
|
44
49
|
suite('Check imported project', async () => {
|
|
45
50
|
projectAndFileTests.openFile(fileFolderPath, tabTitle);
|
|
46
|
-
|
|
47
51
|
projectAndFileTests.checkProjectBranchName('master');
|
|
48
52
|
});
|
|
49
53
|
|
|
50
54
|
suite ('Stopping and deleting the workspace', async () => {
|
|
51
55
|
test('Stop and remove workspace', async () => {
|
|
52
|
-
|
|
53
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
54
|
-
|
|
55
|
-
await testWorkspaceUtils.cleanUpRunningWorkspace(workspaceName);
|
|
56
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
56
57
|
});
|
|
57
58
|
});
|
|
58
59
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// /*********************************************************************
|
|
2
|
-
// * Copyright (c)
|
|
2
|
+
// * Copyright (c) 2022 Red Hat, Inc.
|
|
3
3
|
// *
|
|
4
4
|
// * This program and the accompanying materials are made
|
|
5
5
|
// * available under the terms of the Eclipse Public License 2.0
|
|
@@ -9,30 +9,27 @@
|
|
|
9
9
|
// **********************************************************************/
|
|
10
10
|
|
|
11
11
|
import { e2eContainer } from '../../../inversify.config';
|
|
12
|
-
import { CLASSES
|
|
12
|
+
import { CLASSES } from '../../../inversify.types';
|
|
13
13
|
import { TestConstants } from '../../../TestConstants';
|
|
14
14
|
import { ProjectAndFileTests } from '../../../testsLibrary/ProjectAndFileTests';
|
|
15
15
|
import CheReporter from '../../../driver/CheReporter';
|
|
16
16
|
import { BrowserTabsUtil } from '../../../utils/BrowserTabsUtil';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import { PreferencesHandler } from '../../../utils/PreferencesHandler';
|
|
19
19
|
|
|
20
|
+
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
21
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
22
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
21
23
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
22
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
23
|
-
const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get<TestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
24
24
|
|
|
25
|
-
let
|
|
25
|
+
let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/java1.11`;
|
|
26
|
+
const workspaceSampleName: string = 'console-java-simple';
|
|
27
|
+
const workspaceRootFolderName: string = 'src';
|
|
28
|
+
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
29
|
+
const tabTitle: string = 'HelloWorld.java';
|
|
30
|
+
let workspaceName: string = 'console-java-simple';
|
|
26
31
|
|
|
27
|
-
// the suite expect user to be logged in
|
|
28
32
|
suite('Workspace creation via factory url', async () => {
|
|
29
|
-
|
|
30
|
-
let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/java1.11`;
|
|
31
|
-
const workspaceSampleName: string = 'console-java-simple';
|
|
32
|
-
const workspaceRootFolderName: string = 'src';
|
|
33
|
-
const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
|
|
34
|
-
const tabTitle: string = 'HelloWorld.java';
|
|
35
|
-
|
|
36
33
|
suite('Open factory URL', async () => {
|
|
37
34
|
test(`Navigating to factory URL`, async () => {
|
|
38
35
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
@@ -40,8 +37,13 @@ suite('Workspace creation via factory url', async () => {
|
|
|
40
37
|
});
|
|
41
38
|
|
|
42
39
|
suite('Wait workspace readyness', async () => {
|
|
43
|
-
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName
|
|
40
|
+
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
|
|
41
|
+
|
|
42
|
+
test('Set confirmExit preference to never', async () => {
|
|
43
|
+
CheReporter.registerRunningWorkspace(workspaceName);
|
|
44
44
|
|
|
45
|
+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
46
|
+
});
|
|
45
47
|
});
|
|
46
48
|
|
|
47
49
|
suite('Check imported project', async () => {
|
|
@@ -51,10 +53,7 @@ suite('Workspace creation via factory url', async () => {
|
|
|
51
53
|
|
|
52
54
|
suite ('Stopping and deleting the workspace', async () => {
|
|
53
55
|
test('Stop and remove workspace', async () => {
|
|
54
|
-
|
|
55
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
56
|
-
|
|
57
|
-
await testWorkspaceUtils.cleanUpRunningWorkspace(workspaceName);
|
|
56
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
58
57
|
});
|
|
59
58
|
});
|
|
60
59
|
|