@eclipse-che/che-e2e 7.50.0-dev-d6432ff → 7.51.0-dev-6c69f4f
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/dist/driver/CheReporter.js +2 -1
- 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 +2 -0
- package/dist/inversify.config.js.map +1 -1
- package/dist/inversify.types.js +2 -1
- package/dist/inversify.types.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js.map +1 -1
- package/dist/pageobjects/ide/ProjectTree.js +12 -6
- package/dist/pageobjects/ide/ProjectTree.js.map +1 -1
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.js +3 -4
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.js.map +1 -1
- package/dist/tests/devfiles/DevfileSmoke.spec.js +4 -5
- package/dist/tests/devfiles/DevfileSmoke.spec.js.map +1 -1
- package/dist/tests/devfiles/DotNetCore.spec.js +3 -4
- package/dist/tests/devfiles/DotNetCore.spec.js.map +1 -1
- package/dist/tests/devfiles/Go.spec.js +3 -4
- package/dist/tests/devfiles/Go.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaMaven.spec.js +3 -4
- package/dist/tests/devfiles/JavaMaven.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaSpringBoot.spec.js +3 -4
- package/dist/tests/devfiles/JavaSpringBoot.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaVertx.spec.js +3 -4
- package/dist/tests/devfiles/JavaVertx.spec.js.map +1 -1
- package/dist/tests/devfiles/NodeJS.spec.js +3 -4
- package/dist/tests/devfiles/NodeJS.spec.js.map +1 -1
- package/dist/tests/devfiles/PHPSimple.spec.js +3 -4
- package/dist/tests/devfiles/PHPSimple.spec.js.map +1 -1
- package/dist/tests/devfiles/Python.spec.js +3 -4
- package/dist/tests/devfiles/Python.spec.js.map +1 -1
- package/dist/tests/devfiles/PythonDjango.spec.js +3 -4
- package/dist/tests/devfiles/PythonDjango.spec.js.map +1 -1
- package/dist/tests/devfiles/Quarkus.spec.js +3 -4
- package/dist/tests/devfiles/Quarkus.spec.js.map +1 -1
- package/dist/tests/devfiles/Scala.spec.js +3 -4
- package/dist/tests/devfiles/Scala.spec.js.map +1 -1
- package/dist/tests/e2e/FactoryUrl.spec.js +4 -9
- package/dist/tests/e2e/FactoryUrl.spec.js.map +1 -1
- package/dist/tests/e2e/GitPublishBranch.spec.js +2 -0
- package/dist/tests/e2e/GitPublishBranch.spec.js.map +1 -1
- package/dist/tests/e2e/GitSelfSignCert.spec.js +7 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.js.map +1 -1
- package/dist/tests/e2e/GitSsh.spec.js +4 -1
- package/dist/tests/e2e/GitSsh.spec.js.map +1 -1
- package/dist/tests/e2e/OpenshiftConnector.spec.js +2 -0
- package/dist/tests/e2e/OpenshiftConnector.spec.js.map +1 -1
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js +3 -7
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +1 -1
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js +3 -7
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +1 -1
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js +3 -7
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +1 -1
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js +2 -0
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js.map +1 -1
- package/dist/tests/e2e_happy_path/HappyPath.spec.js +13 -8
- package/dist/tests/e2e_happy_path/HappyPath.spec.js.map +1 -1
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js +2 -6
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js.map +1 -1
- package/dist/tests/load_test/LoadTest.spec.js +2 -5
- package/dist/tests/load_test/LoadTest.spec.js.map +1 -1
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js +2 -2
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js.map +1 -1
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js +4 -9
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/InstallPluginUsingUI.spec.js +4 -10
- package/dist/tests/plugins/InstallPluginUsingUI.spec.js.map +1 -1
- package/dist/tests/plugins/JavaPlugin.spec.js +4 -8
- package/dist/tests/plugins/JavaPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/PhpPlugin.spec.js +12 -10
- package/dist/tests/plugins/PhpPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/PythonPlugin.spec.js +4 -8
- package/dist/tests/plugins/PythonPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/TypescriptPlugin.spec.js +4 -8
- package/dist/tests/plugins/TypescriptPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.js +3 -10
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.js +3 -10
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeValePlugin.spec.js +3 -10
- package/dist/tests/plugins/VscodeValePlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeXmlPlugin.spec.js +15 -1
- package/dist/tests/plugins/VscodeXmlPlugin.spec.js.map +1 -1
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js +4 -8
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js.map +1 -1
- package/dist/testsLibrary/CodeExecutionTests.js +14 -2
- package/dist/testsLibrary/CodeExecutionTests.js.map +1 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js +75 -10
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +1 -1
- package/dist/utils/requestHandlers/CheApiRequestHandler.js.map +1 -1
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js +17 -2
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
- package/dist/utils/workspace/ApiUrlResolver.js +67 -0
- package/dist/utils/workspace/ApiUrlResolver.js.map +1 -0
- package/dist/utils/workspace/TestWorkspaceUtil.js +60 -30
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/dist/utils/workspace/WorkspaceStatus.js.map +1 -1
- package/driver/CheReporter.ts +2 -2
- package/index.ts +1 -0
- package/inversify.config.ts +4 -2
- package/inversify.types.ts +2 -1
- package/package.json +1 -1
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +2 -2
- package/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +3 -3
- package/pageobjects/ide/ProjectTree.ts +13 -8
- package/tests/devfiles/CSlashCPlusPlus.spec.ts +3 -6
- package/tests/devfiles/DevfileSmoke.spec.ts +4 -7
- package/tests/devfiles/DotNetCore.spec.ts +3 -6
- package/tests/devfiles/Go.spec.ts +3 -4
- package/tests/devfiles/JavaMaven.spec.ts +3 -6
- package/tests/devfiles/JavaSpringBoot.spec.ts +3 -6
- package/tests/devfiles/JavaVertx.spec.ts +3 -6
- package/tests/devfiles/NodeJS.spec.ts +3 -6
- package/tests/devfiles/PHPSimple.spec.ts +3 -6
- package/tests/devfiles/Python.spec.ts +3 -6
- package/tests/devfiles/PythonDjango.spec.ts +3 -6
- package/tests/devfiles/Quarkus.spec.ts +3 -6
- package/tests/devfiles/Scala.spec.ts +3 -7
- package/tests/e2e/FactoryUrl.spec.ts +6 -10
- package/tests/e2e/GitPublishBranch.spec.ts +5 -3
- package/tests/e2e/GitSelfSignCert.spec.ts +68 -65
- package/tests/e2e/GitSsh.spec.ts +6 -3
- package/tests/e2e/OpenshiftConnector.spec.ts +4 -2
- package/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +2 -5
- package/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +2 -5
- package/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +2 -5
- package/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts +2 -0
- package/tests/e2e_happy_path/HappyPath.spec.ts +13 -8
- package/tests/intelij/IntelijOpenWorkspace.spec.ts +2 -4
- package/tests/load_test/LoadTest.spec.ts +4 -4
- package/tests/login/LinkCheAndOcpUsers.spec.ts +4 -3
- package/tests/plugins/GitHubPullRequestPlugin.spec.ts +4 -7
- package/tests/plugins/InstallPluginUsingUI.spec.ts +4 -9
- package/tests/plugins/JavaPlugin.spec.ts +4 -6
- package/tests/plugins/PhpPlugin.spec.ts +3 -9
- package/tests/plugins/PythonPlugin.spec.ts +4 -6
- package/tests/plugins/TypescriptPlugin.spec.ts +4 -6
- package/tests/plugins/VscodeKubernetesPlugin.spec.ts +3 -9
- package/tests/plugins/VscodeShellcheckPlugin.spec.ts +3 -9
- package/tests/plugins/VscodeValePlugin.spec.ts +3 -9
- package/tests/plugins/VscodeXmlPlugin.spec.ts +17 -1
- package/tests/plugins/VscodeYamlPlugin.spec.ts +4 -7
- package/testsLibrary/CodeExecutionTests.ts +9 -1
- package/testsLibrary/WorkspaceHandlingTests.ts +72 -9
- package/utils/requestHandlers/CheApiRequestHandler.ts +1 -1
- package/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +17 -2
- package/utils/workspace/ApiUrlResolver.ts +50 -0
- package/utils/workspace/ITestWorkspaceUtil.ts +73 -1
- package/utils/workspace/TestWorkspaceUtil.ts +65 -33
- package/utils/workspace/WorkspaceStatus.ts +1 -1
|
@@ -24,7 +24,6 @@ import { GitPlugin } from '../../pageobjects/ide/plugins/GitPlugin';
|
|
|
24
24
|
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
25
25
|
import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
|
|
26
26
|
import { Editor } from '../../pageobjects/ide/Editor';
|
|
27
|
-
import CheReporter from '../../driver/CheReporter';
|
|
28
27
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
29
28
|
import { Key } from 'selenium-webdriver';
|
|
30
29
|
|
|
@@ -40,6 +39,7 @@ const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
|
|
|
40
39
|
const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
|
|
41
40
|
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
42
41
|
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
42
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
43
43
|
|
|
44
44
|
const devfileUrl: string = `https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/GitHubPullRequestPlugin.yaml`;
|
|
45
45
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
@@ -50,7 +50,6 @@ const changedFile: string = 'README.md';
|
|
|
50
50
|
// added call back url, but needs to be re-verified
|
|
51
51
|
const identityCallbackUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/api/oauth/callback`;
|
|
52
52
|
const currentDate: string = Date.now().toString();
|
|
53
|
-
let workspaceName: string;
|
|
54
53
|
|
|
55
54
|
suite(`The 'GitHubPullRequestPlugin' test`, async () => {
|
|
56
55
|
suite('Setup github', async () => {
|
|
@@ -77,11 +76,9 @@ suite(`The 'GitHubPullRequestPlugin' test`, async () => {
|
|
|
77
76
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
78
77
|
});
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
82
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
83
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
79
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
84
80
|
|
|
81
|
+
test('Wait until created workspace is started', async () => {
|
|
85
82
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
86
83
|
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
87
84
|
|
|
@@ -140,7 +137,7 @@ suite(`The 'GitHubPullRequestPlugin' test`, async () => {
|
|
|
140
137
|
suite('Stopping and deleting the workspace', async () => {
|
|
141
138
|
test(`Stop and remove workspace`, async () => {
|
|
142
139
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
143
|
-
await workspaceHandling.stopAndRemoveWorkspace(
|
|
140
|
+
await workspaceHandling.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
144
141
|
return;
|
|
145
142
|
}
|
|
146
143
|
|
|
@@ -18,8 +18,6 @@ import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
|
18
18
|
import { PluginsView } from '../../pageobjects/ide/plugins/PluginsView';
|
|
19
19
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
20
20
|
import { Logger } from '../../utils/Logger';
|
|
21
|
-
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
22
|
-
import CheReporter from '../../driver/CheReporter';
|
|
23
21
|
|
|
24
22
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
25
23
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
@@ -27,13 +25,12 @@ const pluginsView: PluginsView = e2eContainer.get(CLASSES.PluginsView);
|
|
|
27
25
|
|
|
28
26
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
29
27
|
const workspaceHandling: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
30
|
-
const
|
|
28
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
31
29
|
|
|
32
30
|
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/InstallPluginUsingUI.yaml';
|
|
33
31
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
34
32
|
|
|
35
33
|
const pluginTitle: string = 'java11';
|
|
36
|
-
let workspaceName: string;
|
|
37
34
|
|
|
38
35
|
suite(`The 'InstallPluginUsingUI' test`, async () => {
|
|
39
36
|
suite('Create workspace', async () => {
|
|
@@ -41,11 +38,9 @@ suite(`The 'InstallPluginUsingUI' test`, async () => {
|
|
|
41
38
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
42
39
|
});
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
46
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
47
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
41
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
48
42
|
|
|
43
|
+
test('Wait until created workspace is started', async () => {
|
|
49
44
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
50
45
|
|
|
51
46
|
await projectTree.openProjectTreeContainer();
|
|
@@ -72,7 +67,7 @@ suite(`The 'InstallPluginUsingUI' test`, async () => {
|
|
|
72
67
|
suite('Stopping and deleting the workspace', async () => {
|
|
73
68
|
test(`Stop and remove workspace`, async () => {
|
|
74
69
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
75
|
-
await workspaceHandling.stopAndRemoveWorkspace(
|
|
70
|
+
await workspaceHandling.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
76
71
|
return;
|
|
77
72
|
}
|
|
78
73
|
|
|
@@ -18,7 +18,6 @@ import { Editor } from '../../pageobjects/ide/Editor';
|
|
|
18
18
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
19
19
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
20
20
|
import { Logger } from '../../utils/Logger';
|
|
21
|
-
import CheReporter from '../../driver/CheReporter';
|
|
22
21
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
23
22
|
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
24
23
|
|
|
@@ -37,7 +36,6 @@ const subRootFolder: string = 'backend';
|
|
|
37
36
|
|
|
38
37
|
const fileFolderPath: string = `${projectName}/backend/src/main/java/cloudcode/guestbook/backend`;
|
|
39
38
|
const tabTitle: string = 'GuestBookEntry.java';
|
|
40
|
-
let workspaceName: string = 'java-guestbook';
|
|
41
39
|
|
|
42
40
|
suite(`The 'JavaPlugin' test`, async () => {
|
|
43
41
|
suite('Create workspace', async () => {
|
|
@@ -45,11 +43,11 @@ suite(`The 'JavaPlugin' test`, async () => {
|
|
|
45
43
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
46
44
|
});
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
48
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
52
49
|
|
|
50
|
+
test('Set confirmExit preference to never', async () => {
|
|
53
51
|
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
54
52
|
});
|
|
55
53
|
});
|
|
@@ -91,7 +89,7 @@ suite(`The 'JavaPlugin' test`, async () => {
|
|
|
91
89
|
suite('Stopping and deleting the workspace', async () => {
|
|
92
90
|
test('Stop and remove workspace', async () => {
|
|
93
91
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
94
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
92
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
95
93
|
return;
|
|
96
94
|
}
|
|
97
95
|
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
|
-
import { WorkspaceNameHandler } from '../..';
|
|
11
10
|
import 'reflect-metadata';
|
|
12
11
|
import { e2eContainer } from '../../inversify.config';
|
|
13
12
|
import { CLASSES } from '../../inversify.types';
|
|
@@ -22,7 +21,6 @@ import { DebugView } from '../../pageobjects/ide/DebugView';
|
|
|
22
21
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
23
22
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
24
23
|
import { Logger } from '../../utils/Logger';
|
|
25
|
-
import CheReporter from '../../driver/CheReporter';
|
|
26
24
|
|
|
27
25
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
28
26
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
@@ -31,7 +29,6 @@ const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
|
31
29
|
const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
|
|
32
30
|
const debugView: DebugView = e2eContainer.get(CLASSES.DebugView);
|
|
33
31
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
34
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
35
32
|
|
|
36
33
|
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/PhpPluginTest.yaml';
|
|
37
34
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
@@ -40,7 +37,6 @@ const subRootFolder: string = 'README.md';
|
|
|
40
37
|
|
|
41
38
|
const fileFolderPath: string = `${projectName}`;
|
|
42
39
|
const tabTitle: string = 'index.php';
|
|
43
|
-
let workspaceName: string;
|
|
44
40
|
|
|
45
41
|
suite(`The 'PhpPlugin' tests`, async () => {
|
|
46
42
|
suite('Create workspace', async () => {
|
|
@@ -48,11 +44,9 @@ suite(`The 'PhpPlugin' tests`, async () => {
|
|
|
48
44
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
49
45
|
});
|
|
50
46
|
|
|
51
|
-
|
|
52
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
53
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
54
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
47
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
55
48
|
|
|
49
|
+
test('Wait until created workspace is started', async () => {
|
|
56
50
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
57
51
|
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
58
52
|
|
|
@@ -111,7 +105,7 @@ suite(`The 'PhpPlugin' tests`, async () => {
|
|
|
111
105
|
suite('Stopping and deleting the workspace', async () => {
|
|
112
106
|
test('Stop and remove workspace', async () => {
|
|
113
107
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
114
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
108
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
115
109
|
return;
|
|
116
110
|
}
|
|
117
111
|
|
|
@@ -17,7 +17,6 @@ import { Key } from 'selenium-webdriver';
|
|
|
17
17
|
import { Editor } from '../../pageobjects/ide/Editor';
|
|
18
18
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
19
19
|
import { Logger } from '../../utils/Logger';
|
|
20
|
-
import CheReporter from '../../driver/CheReporter';
|
|
21
20
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
22
21
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
23
22
|
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
@@ -36,7 +35,6 @@ const subRootFolder: string = '.vscode';
|
|
|
36
35
|
|
|
37
36
|
const fileFolderPath: string = `${projectName}`;
|
|
38
37
|
const tabTitle: string = 'hello-world.py';
|
|
39
|
-
let workspaceName: string = 'python-hello-world';
|
|
40
38
|
|
|
41
39
|
suite(`The 'PythonPlugin' test`, async () => {
|
|
42
40
|
suite('Create workspace', async () => {
|
|
@@ -44,11 +42,11 @@ suite(`The 'PythonPlugin' test`, async () => {
|
|
|
44
42
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
45
43
|
});
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
47
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
51
48
|
|
|
49
|
+
test('Set confirmExit preference to never', async () => {
|
|
52
50
|
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
53
51
|
});
|
|
54
52
|
});
|
|
@@ -78,7 +76,7 @@ suite(`The 'PythonPlugin' test`, async () => {
|
|
|
78
76
|
suite('Stopping and deleting the workspace', async () => {
|
|
79
77
|
test('Stop and remove workspace', async () => {
|
|
80
78
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
81
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
79
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
82
80
|
return;
|
|
83
81
|
}
|
|
84
82
|
|
|
@@ -23,7 +23,6 @@ import { Terminal } from '../../pageobjects/ide/Terminal';
|
|
|
23
23
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
24
24
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
25
25
|
import { Logger } from '../../utils/Logger';
|
|
26
|
-
import CheReporter from '../../driver/CheReporter';
|
|
27
26
|
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
28
27
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
29
28
|
|
|
@@ -49,7 +48,6 @@ const fileFolderPath: string = `${projectName}`;
|
|
|
49
48
|
const debugFileFolderPath: string = `${projectName}/app`;
|
|
50
49
|
const debugFile: string = 'app.js';
|
|
51
50
|
const tabTitle: string = 'typescript-node-debug.ts';
|
|
52
|
-
let workspaceName: string = 'typescript-plugin';
|
|
53
51
|
|
|
54
52
|
suite(`The 'TypescriptPlugin and Node-debug' tests`, async () => {
|
|
55
53
|
suite('Create workspace', async () => {
|
|
@@ -57,11 +55,11 @@ suite(`The 'TypescriptPlugin and Node-debug' tests`, async () => {
|
|
|
57
55
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
58
56
|
});
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
60
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
64
61
|
|
|
62
|
+
test('Set confirmExit preference to never', async () => {
|
|
65
63
|
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
66
64
|
});
|
|
67
65
|
});
|
|
@@ -160,7 +158,7 @@ suite(`The 'TypescriptPlugin and Node-debug' tests`, async () => {
|
|
|
160
158
|
suite('Stopping and deleting the workspace', async () => {
|
|
161
159
|
test('Stop and remove workspace', async () => {
|
|
162
160
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
163
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
161
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
164
162
|
return;
|
|
165
163
|
}
|
|
166
164
|
|
|
@@ -17,9 +17,7 @@ import { KubernetesPlugin } from '../../pageobjects/ide/plugins/KubernetesPlugin
|
|
|
17
17
|
import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
|
|
18
18
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
19
19
|
import { Logger } from '../../utils/Logger';
|
|
20
|
-
import CheReporter from '../../driver/CheReporter';
|
|
21
20
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
22
|
-
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
23
21
|
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
24
22
|
import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
|
|
25
23
|
import { OpenDialogWidget, Buttons } from '../../pageobjects/ide/OpenDialogWidget';
|
|
@@ -29,7 +27,6 @@ const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUti
|
|
|
29
27
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
30
28
|
const kubernetesPlugin: KubernetesPlugin = e2eContainer.get(CLASSES.KubernetesPlugin);
|
|
31
29
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
32
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
33
30
|
const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
|
|
34
31
|
const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
|
|
35
32
|
const openDialogWidget: OpenDialogWidget = e2eContainer.get(CLASSES.OpenDialogWidget);
|
|
@@ -38,7 +35,6 @@ const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/t
|
|
|
38
35
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
39
36
|
const sampleName: string = 'nodejs-web-app';
|
|
40
37
|
const subRootFolder: string = 'app';
|
|
41
|
-
let workspaceName: string;
|
|
42
38
|
|
|
43
39
|
suite(`The 'VscodeKubernetesPlugin' test`, async () => {
|
|
44
40
|
suite('Create workspace', async () => {
|
|
@@ -46,11 +42,9 @@ suite(`The 'VscodeKubernetesPlugin' test`, async () => {
|
|
|
46
42
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
47
43
|
});
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
51
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
52
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
45
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
53
46
|
|
|
47
|
+
test('Wait until created workspace is started', async () => {
|
|
54
48
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
55
49
|
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
56
50
|
|
|
@@ -79,7 +73,7 @@ suite(`The 'VscodeKubernetesPlugin' test`, async () => {
|
|
|
79
73
|
suite('Stopping and deleting the workspace', async () => {
|
|
80
74
|
test('Stop and remove workspace', async () => {
|
|
81
75
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
82
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
76
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
83
77
|
return;
|
|
84
78
|
}
|
|
85
79
|
|
|
@@ -19,9 +19,7 @@ import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
|
|
|
19
19
|
import { Key } from 'selenium-webdriver';
|
|
20
20
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
21
21
|
import { Logger } from '../../utils/Logger';
|
|
22
|
-
import CheReporter from '../../driver/CheReporter';
|
|
23
22
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
24
|
-
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
25
23
|
|
|
26
24
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
27
25
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
@@ -29,7 +27,6 @@ const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
|
29
27
|
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
30
28
|
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
31
29
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
32
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
33
30
|
|
|
34
31
|
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/VscodeShellcheckPlugin.yaml';
|
|
35
32
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
@@ -37,7 +34,6 @@ const sampleName: string = 'nodejs-web-app';
|
|
|
37
34
|
const subRootFolder: string = 'app';
|
|
38
35
|
const pathToFile: string = `${sampleName}`;
|
|
39
36
|
const fileName: string = 'test.sh';
|
|
40
|
-
let workspaceName: string;
|
|
41
37
|
|
|
42
38
|
suite(`The 'VscodeShellcheckPlugin' test`, async () => {
|
|
43
39
|
suite('Create workspace', async () => {
|
|
@@ -52,11 +48,9 @@ suite(`The 'VscodeShellcheckPlugin' test`, async () => {
|
|
|
52
48
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
53
49
|
});
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
57
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
58
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
51
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
59
52
|
|
|
53
|
+
test('Wait until created workspace is started', async () => {
|
|
60
54
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
61
55
|
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
62
56
|
|
|
@@ -96,7 +90,7 @@ suite(`The 'VscodeShellcheckPlugin' test`, async () => {
|
|
|
96
90
|
suite('Stopping and deleting the workspace', async () => {
|
|
97
91
|
test('Stop and remove workspace', async () => {
|
|
98
92
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
99
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
93
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
100
94
|
return;
|
|
101
95
|
}
|
|
102
96
|
|
|
@@ -16,11 +16,9 @@ import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
|
|
|
16
16
|
import { Editor } from '../../pageobjects/ide/Editor';
|
|
17
17
|
import { TestConstants } from '../../TestConstants';
|
|
18
18
|
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
19
|
-
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
20
19
|
import { Terminal } from '../../pageobjects/ide/Terminal';
|
|
21
20
|
import { Logger } from '../../utils/Logger';
|
|
22
21
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
23
|
-
import CheReporter from '../../driver/CheReporter';
|
|
24
22
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
25
23
|
|
|
26
24
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
@@ -29,14 +27,12 @@ const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
|
29
27
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
30
28
|
const terminal: Terminal = e2eContainer.get(CLASSES.Terminal);
|
|
31
29
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
32
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
33
30
|
|
|
34
31
|
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/VscodeValePlugin.yaml';
|
|
35
32
|
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
|
|
36
33
|
const projectName: string = 'che-docs';
|
|
37
34
|
const pathToFile: string = `${projectName}/modules/administration-guide/partials`;
|
|
38
35
|
const docFileName: string = 'assembly_authenticating-users.adoc';
|
|
39
|
-
let workspaceName: string = '';
|
|
40
36
|
|
|
41
37
|
suite('The "VscodeValePlugin" userstory', async () => {
|
|
42
38
|
suite('Create workspace', async () => {
|
|
@@ -44,11 +40,9 @@ suite('The "VscodeValePlugin" userstory', async () => {
|
|
|
44
40
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
45
41
|
});
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
await ide.waitAndSwitchToIdeFrame();
|
|
49
|
-
workspaceName = await workspaceNameHandler.getNameFromUrl();
|
|
50
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
43
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
51
44
|
|
|
45
|
+
test('Wait until created workspace is started', async () => {
|
|
52
46
|
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
53
47
|
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
54
48
|
});
|
|
@@ -81,7 +75,7 @@ suite('The "VscodeValePlugin" userstory', async () => {
|
|
|
81
75
|
suite('Stopping and deleting the workspace', async () => {
|
|
82
76
|
test('Stop and remove workspace', async () => {
|
|
83
77
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
84
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
78
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
85
79
|
return;
|
|
86
80
|
}
|
|
87
81
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { Key } from 'selenium-webdriver';
|
|
12
12
|
import { e2eContainer } from '../../inversify.config';
|
|
13
|
+
import { Ide } from '../../pageobjects/ide/Ide';
|
|
13
14
|
import { CLASSES } from '../../inversify.types';
|
|
14
15
|
import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
|
|
15
16
|
import { Editor } from '../../pageobjects/ide/Editor';
|
|
@@ -20,10 +21,12 @@ import CheReporter from '../../driver/CheReporter';
|
|
|
20
21
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
21
22
|
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
22
23
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
24
|
+
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
23
25
|
|
|
24
26
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
25
27
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
26
28
|
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
29
|
+
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
27
30
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
28
31
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
29
32
|
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
@@ -45,10 +48,23 @@ suite('The "VscodeXmlPlugin" userstory', async () => {
|
|
|
45
48
|
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
46
49
|
|
|
47
50
|
test('Wait until created workspace is started', async () => {
|
|
51
|
+
WorkspaceHandlingTests.setWorkspaceName(workspaceName);
|
|
48
52
|
CheReporter.registerRunningWorkspace(workspaceName);
|
|
49
53
|
|
|
50
54
|
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
51
55
|
});
|
|
56
|
+
|
|
57
|
+
test('Wait until created workspace is started', async () => {
|
|
58
|
+
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
|
|
59
|
+
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
suite('Check workspace readiness to work', async () => {
|
|
64
|
+
test('Wait until project is imported', async () => {
|
|
65
|
+
await projectTree.openProjectTreeContainer();
|
|
66
|
+
await projectTree.waitProjectImported(projectName, 'app');
|
|
67
|
+
});
|
|
52
68
|
});
|
|
53
69
|
|
|
54
70
|
suite('Check the "vscode-xml" plugin', async () => {
|
|
@@ -101,7 +117,7 @@ suite('The "VscodeXmlPlugin" userstory', async () => {
|
|
|
101
117
|
suite('Delete workspace', async () => {
|
|
102
118
|
test('Stop and remove workspace', async () => {
|
|
103
119
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
104
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
120
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
105
121
|
return;
|
|
106
122
|
}
|
|
107
123
|
|
|
@@ -16,7 +16,6 @@ import { Editor } from '../../pageobjects/ide/Editor';
|
|
|
16
16
|
import { TestConstants } from '../../TestConstants';
|
|
17
17
|
import { Logger } from '../../utils/Logger';
|
|
18
18
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
19
|
-
import CheReporter from '../../driver/CheReporter';
|
|
20
19
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
21
20
|
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
22
21
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
@@ -36,19 +35,17 @@ const pathToFile: string = `${projectName}`;
|
|
|
36
35
|
const yamlFileName: string = 'routes.yaml';
|
|
37
36
|
const yamlSchema = { 'yaml-schema.json': '*.yaml' };
|
|
38
37
|
|
|
39
|
-
let workspaceName: string = 'yaml-plugin';
|
|
40
|
-
|
|
41
38
|
suite('The "VscodeYamlPlugin" userstory', async () => {
|
|
42
39
|
suite('Create workspace', async () => {
|
|
43
40
|
test('Create workspace using factory', async () => {
|
|
44
41
|
await browserTabsUtil.navigateTo(factoryUrl);
|
|
45
42
|
});
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
CheReporter.registerRunningWorkspace(workspaceName);
|
|
46
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
51
47
|
|
|
48
|
+
test('Set confirmExit preference to never', async () => {
|
|
52
49
|
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
53
50
|
});
|
|
54
51
|
});
|
|
@@ -97,7 +94,7 @@ suite('The "VscodeYamlPlugin" userstory', async () => {
|
|
|
97
94
|
suite('Delete workspace', async () => {
|
|
98
95
|
test('Stop and remove workspace', async () => {
|
|
99
96
|
if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
|
|
100
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(
|
|
97
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
101
98
|
return;
|
|
102
99
|
}
|
|
103
100
|
|
|
@@ -20,6 +20,8 @@ import { DialogWindow } from '../pageobjects/ide/DialogWindow';
|
|
|
20
20
|
import { DriverHelper } from '../utils/DriverHelper';
|
|
21
21
|
import { Logger } from '../utils/Logger';
|
|
22
22
|
import { QuickOpenContainer } from '../pageobjects/ide/QuickOpenContainer';
|
|
23
|
+
import { WorkspaceHandlingTests } from './WorkspaceHandlingTests';
|
|
24
|
+
import { BrowserTabsUtil } from '../utils/BrowserTabsUtil';
|
|
23
25
|
|
|
24
26
|
@injectable()
|
|
25
27
|
export class CodeExecutionTests {
|
|
@@ -32,7 +34,9 @@ export class CodeExecutionTests {
|
|
|
32
34
|
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
33
35
|
@inject(CLASSES.DialogWindow) private readonly dialogWindow: DialogWindow,
|
|
34
36
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
35
|
-
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer
|
|
37
|
+
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer,
|
|
38
|
+
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil,
|
|
39
|
+
@inject(CLASSES.WorkspaceHandlingTests) private readonly workspaceHandlingTests: WorkspaceHandlingTests) {}
|
|
36
40
|
|
|
37
41
|
public runTask(taskName: string, timeout: number) {
|
|
38
42
|
test(`Run command '${taskName}'`, async () => {
|
|
@@ -62,6 +66,7 @@ export class CodeExecutionTests {
|
|
|
62
66
|
public runTaskWithDialogShellAndOpenLink(taskName: string, expectedDialogText: string, timeout: number) {
|
|
63
67
|
test(`Run command '${taskName}' expecting dialog shell`, async () => {
|
|
64
68
|
await this.runTaskUsingQuickOpenContainer(taskName);
|
|
69
|
+
this.workspaceHandlingTests.setWindowHandle(await this.browserTabsUtil.getCurrentWindowHandle());
|
|
65
70
|
await this.dialogWindow.waitDialogAndOpenLink(expectedDialogText, timeout);
|
|
66
71
|
});
|
|
67
72
|
}
|
|
@@ -103,6 +108,7 @@ export class CodeExecutionTests {
|
|
|
103
108
|
test(`Run command '${taskName}' expecting notification`, async () => {
|
|
104
109
|
await this.runTaskUsingQuickOpenContainer(taskName);
|
|
105
110
|
await this.ide.waitNotification(notificationText, timeout);
|
|
111
|
+
this.workspaceHandlingTests.setWindowHandle(await this.browserTabsUtil.getCurrentWindowHandle());
|
|
106
112
|
await this.ide.clickOnNotificationButton(notificationText, buttonText);
|
|
107
113
|
await this.driverHelper.wait(5_000);
|
|
108
114
|
CodeExecutionTests.lastApplicationUrl = await this.driverHelper.getDriver().getCurrentUrl();
|
|
@@ -116,6 +122,7 @@ export class CodeExecutionTests {
|
|
|
116
122
|
test(`Run command '${taskName}' expecting notification`, async () => {
|
|
117
123
|
await this.runTaskUsingQuickOpenContainer(taskName);
|
|
118
124
|
await this.ide.waitNotification(notificationText, timeout);
|
|
125
|
+
this.workspaceHandlingTests.setWindowHandle(await this.browserTabsUtil.getCurrentWindowHandle());
|
|
119
126
|
await this.ide.clickOnNotificationButton(notificationText, 'Open In Preview');
|
|
120
127
|
await this.driverHelper.wait(5_000);
|
|
121
128
|
CodeExecutionTests.lastApplicationUrl = await this.driverHelper.getDriver().getCurrentUrl();
|
|
@@ -126,6 +133,7 @@ export class CodeExecutionTests {
|
|
|
126
133
|
test(`Run command '${taskName}' expecting notification with unexposed port`, async () => {
|
|
127
134
|
await this.runTaskUsingQuickOpenContainer(taskName);
|
|
128
135
|
await this.ide.waitNotificationAndConfirm(notificationText, timeout);
|
|
136
|
+
this.workspaceHandlingTests.setWindowHandle(await this.browserTabsUtil.getCurrentWindowHandle());
|
|
129
137
|
await this.ide.waitNotificationAndOpenLink(portOpenText, timeout);
|
|
130
138
|
await this.driverHelper.wait(5_000);
|
|
131
139
|
CodeExecutionTests.lastApplicationUrl = await this.driverHelper.getDriver().getCurrentUrl();
|