@eclipse-che/che-e2e 7.46.1-dev-409a251 → 7.46.1-dev-42c1c40
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 +6 -2
- 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/Dashboard.js +1 -1
- package/dist/pageobjects/dashboard/Dashboard.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/tests/devfiles/CSlashCPlusPlus.spec.js +7 -0
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.js.map +1 -1
- package/dist/tests/devfiles/DevfileSmoke.spec.js +7 -0
- package/dist/tests/devfiles/DevfileSmoke.spec.js.map +1 -1
- package/dist/tests/devfiles/DotNetCore.spec.js +7 -0
- package/dist/tests/devfiles/DotNetCore.spec.js.map +1 -1
- package/dist/tests/devfiles/Go.spec.js +7 -0
- package/dist/tests/devfiles/Go.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaMaven.spec.js +7 -0
- package/dist/tests/devfiles/JavaMaven.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaSpringBoot.spec.js +7 -0
- package/dist/tests/devfiles/JavaSpringBoot.spec.js.map +1 -1
- package/dist/tests/devfiles/JavaVertx.spec.js +7 -0
- package/dist/tests/devfiles/JavaVertx.spec.js.map +1 -1
- package/dist/tests/devfiles/NodeJS.spec.js +7 -0
- package/dist/tests/devfiles/NodeJS.spec.js.map +1 -1
- package/dist/tests/devfiles/PHPSimple.spec.js +7 -0
- package/dist/tests/devfiles/PHPSimple.spec.js.map +1 -1
- package/dist/tests/devfiles/Python.spec.js +7 -0
- package/dist/tests/devfiles/Python.spec.js.map +1 -1
- package/dist/tests/devfiles/PythonDjango.spec.js +7 -0
- package/dist/tests/devfiles/PythonDjango.spec.js.map +1 -1
- package/dist/tests/devfiles/Quarkus.spec.js +7 -0
- package/dist/tests/devfiles/Quarkus.spec.js.map +1 -1
- package/dist/tests/devfiles/Scala.spec.js +7 -0
- package/dist/tests/devfiles/Scala.spec.js.map +1 -1
- package/dist/tests/e2e/GitPublishBranch.spec.js +5 -0
- package/dist/tests/e2e/GitPublishBranch.spec.js.map +1 -1
- package/dist/tests/e2e/GitSelfSignCert.spec.js +5 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.js.map +1 -1
- package/dist/tests/e2e/GitSsh.spec.js +6 -0
- package/dist/tests/e2e/GitSsh.spec.js.map +1 -1
- package/dist/tests/e2e/OpenshiftConnector.spec.js +5 -0
- package/dist/tests/e2e/OpenshiftConnector.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 +5 -0
- package/dist/tests/e2e_happy_path/HappyPath.spec.js.map +1 -1
- package/dist/testsLibrary/CodeExecutionTests.js.map +1 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js +13 -5
- 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 +8 -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/Dashboard.ts +10 -11
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +2 -2
- package/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +3 -3
- package/tests/devfiles/CSlashCPlusPlus.spec.ts +4 -0
- package/tests/devfiles/DevfileSmoke.spec.ts +4 -0
- package/tests/devfiles/DotNetCore.spec.ts +4 -0
- package/tests/devfiles/Go.spec.ts +4 -0
- package/tests/devfiles/JavaMaven.spec.ts +4 -0
- package/tests/devfiles/JavaSpringBoot.spec.ts +4 -0
- package/tests/devfiles/JavaVertx.spec.ts +4 -0
- package/tests/devfiles/NodeJS.spec.ts +4 -0
- package/tests/devfiles/PHPSimple.spec.ts +4 -0
- package/tests/devfiles/Python.spec.ts +4 -0
- package/tests/devfiles/PythonDjango.spec.ts +4 -0
- package/tests/devfiles/Quarkus.spec.ts +4 -0
- package/tests/devfiles/Scala.spec.ts +4 -0
- package/tests/e2e/GitPublishBranch.spec.ts +4 -2
- package/tests/e2e/GitSelfSignCert.spec.ts +4 -2
- package/tests/e2e/GitSsh.spec.ts +5 -2
- package/tests/e2e/OpenshiftConnector.spec.ts +4 -2
- package/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts +2 -0
- package/tests/e2e_happy_path/HappyPath.spec.ts +2 -0
- package/testsLibrary/CodeExecutionTests.ts +1 -3
- package/testsLibrary/WorkspaceHandlingTests.ts +10 -4
- 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
|
@@ -27,7 +27,7 @@ export class Dashboard {
|
|
|
27
27
|
|
|
28
28
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
29
29
|
@inject(CLASSES.Workspaces) private readonly workspaces: Workspaces,
|
|
30
|
-
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil
|
|
30
|
+
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil
|
|
31
31
|
) { }
|
|
32
32
|
|
|
33
33
|
async stopWorkspaceByUI(workspaceName: string) {
|
|
@@ -61,9 +61,9 @@ export class Dashboard {
|
|
|
61
61
|
await this.workspaces.waitWorkspaceListItemAbcence(workspaceName);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
async stopAndRemoveWorkspaceWithSelectingTab(workspaceName: string) {
|
|
65
65
|
Logger.debug(`Dashboard.stopAndRemoveWorkspaceWithSelectingTab "${workspaceName}"`);
|
|
66
|
-
await this.switchToDashboardTab()
|
|
66
|
+
await this.switchToDashboardTab();
|
|
67
67
|
await this.stopWorkspaceByUI(workspaceName);
|
|
68
68
|
await this.workspaces.deleteWorkspaceByActionsButton(workspaceName);
|
|
69
69
|
await this.workspaces.waitWorkspaceListItemAbcence(workspaceName);
|
|
@@ -71,9 +71,9 @@ export class Dashboard {
|
|
|
71
71
|
|
|
72
72
|
async openDashboard() {
|
|
73
73
|
Logger.debug('Dashboard.openDashboard');
|
|
74
|
-
//sometimes we can have opened files. In this case we get Alert dialog. We should perform it.
|
|
74
|
+
// sometimes we can have opened files. In this case we get Alert dialog. We should perform it.
|
|
75
75
|
await this.driverHelper.getDriver().navigate().to(TestConstants.TS_SELENIUM_BASE_URL);
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
try {
|
|
78
78
|
await this.waitPage();
|
|
79
79
|
} catch (err) {
|
|
@@ -90,7 +90,7 @@ export class Dashboard {
|
|
|
90
90
|
// click on the Browser tab which has been registered in the WorkspaceHandlingTests class
|
|
91
91
|
async switchToDashboardTab() {
|
|
92
92
|
Logger.debug('Dashboard.openDashboardTab');
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
await this.findAndClickDashboardTab();
|
|
95
95
|
await this.waitPage();
|
|
96
96
|
}
|
|
@@ -159,14 +159,13 @@ export class Dashboard {
|
|
|
159
159
|
await this.browserTabsUtil.switchToWindow(windowHandle);
|
|
160
160
|
try {
|
|
161
161
|
this.driverHelper.waitVisibility(By.xpath(Dashboard.CREATE_WORKSPACE_BUTTON_XPATH));
|
|
162
|
-
Logger.info('Dashboard tab has been selected')
|
|
162
|
+
Logger.info('Dashboard tab has been selected');
|
|
163
163
|
return;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
Logger.warn('The Dashboard Tab is not found in the window: ' + this.browserTabsUtil.getCurrentWindowHandle())
|
|
164
|
+
} catch {
|
|
165
|
+
Logger.warn('The Dashboard Tab is not found in the window: ' + this.browserTabsUtil.getCurrentWindowHandle());
|
|
167
166
|
}
|
|
168
167
|
});
|
|
169
|
-
Logger.warn('The Dashboard Tab is not opened')
|
|
168
|
+
Logger.warn('The Dashboard Tab is not opened');
|
|
170
169
|
}
|
|
171
170
|
|
|
172
171
|
}
|
|
@@ -14,10 +14,10 @@ import 'reflect-metadata';
|
|
|
14
14
|
import { TestConstants } from '../../../TestConstants';
|
|
15
15
|
import { By } from 'selenium-webdriver';
|
|
16
16
|
import { Ide } from '../../ide/Ide';
|
|
17
|
-
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
18
17
|
import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
|
|
19
18
|
import { Logger } from '../../../utils/Logger';
|
|
20
19
|
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
20
|
+
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
@@ -29,7 +29,7 @@ export class WorkspaceDetails {
|
|
|
29
29
|
private static readonly WORKSPACE_DETAILS_LOADER_CSS: string = 'workspace-details-overview md-progress-linear';
|
|
30
30
|
|
|
31
31
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
32
|
-
|
|
32
|
+
@inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
|
|
33
33
|
|
|
34
34
|
async waitLoaderDisappearance(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
35
35
|
Logger.debug('WorkspaceDetails.waitLoaderDisappearance');
|
|
@@ -13,17 +13,17 @@ import 'reflect-metadata';
|
|
|
13
13
|
import { CLASSES, TYPES } from '../../../inversify.types';
|
|
14
14
|
import { By } from 'selenium-webdriver';
|
|
15
15
|
import { WorkspaceDetails } from './WorkspaceDetails';
|
|
16
|
-
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
17
16
|
import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
|
|
18
17
|
import { Logger } from '../../../utils/Logger';
|
|
19
18
|
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
19
|
+
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
@injectable()
|
|
23
23
|
export class WorkspaceDetailsPlugins {
|
|
24
24
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
@inject(CLASSES.WorkspaceDetails) private readonly workspaceDetails: WorkspaceDetails,
|
|
26
|
+
@inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
|
|
27
27
|
|
|
28
28
|
async waitPluginListItem(pluginName: string) {
|
|
29
29
|
Logger.debug(`WorkspaceDetailsPlugins.waitPluginListItem ${pluginName}`);
|
|
@@ -15,6 +15,7 @@ import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
|
|
|
15
15
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
16
16
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
17
17
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import CheReporter from '../../driver/CheReporter';
|
|
18
19
|
|
|
19
20
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
21
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -33,6 +34,9 @@ suite(`${stack} test`, async () => {
|
|
|
33
34
|
suite(`Create ${stack} workspace`, async () => {
|
|
34
35
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
35
36
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
37
|
+
test('Register running workspace', async () => {
|
|
38
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
39
|
+
});
|
|
36
40
|
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
37
41
|
});
|
|
38
42
|
|
|
@@ -15,6 +15,7 @@ import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
|
15
15
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
16
16
|
import { NavigationBar } from '../../pageobjects/ide/NavigationBar';
|
|
17
17
|
import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
|
|
18
|
+
import CheReporter from '../../driver/CheReporter';
|
|
18
19
|
|
|
19
20
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
21
|
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
@@ -30,6 +31,9 @@ suite(`${stack} test`, async () => {
|
|
|
30
31
|
suite (`Create ${stack} workspace`, async () => {
|
|
31
32
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
32
33
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
34
|
+
test('Register running workspace', async () => {
|
|
35
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
36
|
+
});
|
|
33
37
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
34
38
|
|
|
35
39
|
test('Set application.confirmExit user preferences to "never"', async () => {
|
|
@@ -15,6 +15,7 @@ import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
|
|
|
15
15
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
16
16
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
17
17
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import CheReporter from '../../driver/CheReporter';
|
|
18
19
|
|
|
19
20
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
21
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -36,6 +37,9 @@ suite(`Test ${stack}`, async () => {
|
|
|
36
37
|
suite (`Create ${stack} workspace`, async () => {
|
|
37
38
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
38
39
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
40
|
+
test('Register running workspace', async () => {
|
|
41
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
42
|
+
});
|
|
39
43
|
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
40
44
|
});
|
|
41
45
|
|
|
@@ -16,6 +16,7 @@ import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
|
|
|
16
16
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
17
17
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
18
18
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
19
|
+
import CheReporter from '../../driver/CheReporter';
|
|
19
20
|
|
|
20
21
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
21
22
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -39,6 +40,9 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
39
40
|
suite(`Create ${workspaceStack} workspace`, async () => {
|
|
40
41
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
41
42
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
43
|
+
test('Register running workspace', async () => {
|
|
44
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
45
|
+
});
|
|
42
46
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceSubfolderName, false);
|
|
43
47
|
test('Workaround for issue #16113', async () => {
|
|
44
48
|
Logger.warn(`Manually setting a preference for golang devFile LS based on issue: https://github.com/eclipse/che/issues/16113`);
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -32,6 +33,9 @@ suite(`${stack} test`, async () => {
|
|
|
32
33
|
suite (`Create ${stack} workspace`, async () => {
|
|
33
34
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
34
35
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
36
|
+
test('Register running workspace', async () => {
|
|
37
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
38
|
+
});
|
|
35
39
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
36
40
|
});
|
|
37
41
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -34,6 +35,9 @@ suite(`${stack} test`, async () => {
|
|
|
34
35
|
suite(`Create ${stack} workspace`, async () => {
|
|
35
36
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
36
37
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
38
|
+
test('Register running workspace', async () => {
|
|
39
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
40
|
+
});
|
|
37
41
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -32,6 +33,9 @@ suite(`${stack} test`, async () => {
|
|
|
32
33
|
suite (`Create ${stack} workspace`, async () => {
|
|
33
34
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
34
35
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
36
|
+
test('Register running workspace', async () => {
|
|
37
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
38
|
+
});
|
|
35
39
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
36
40
|
});
|
|
37
41
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -35,6 +36,9 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
35
36
|
suite(`Create ${workspaceStack}`, async () => {
|
|
36
37
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
37
38
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
39
|
+
test('Register running workspace', async () => {
|
|
40
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
41
|
+
});
|
|
38
42
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
39
43
|
});
|
|
40
44
|
|
|
@@ -15,6 +15,7 @@ import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
|
|
|
15
15
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
16
16
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
17
17
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
+
import CheReporter from '../../driver/CheReporter';
|
|
18
19
|
|
|
19
20
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
20
21
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -34,6 +35,9 @@ suite(`${stack} test`, async () => {
|
|
|
34
35
|
suite (`Create ${stack} workspace`, async () => {
|
|
35
36
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
36
37
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
38
|
+
test('Register running workspace', async () => {
|
|
39
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
40
|
+
});
|
|
37
41
|
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -32,6 +33,9 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
32
33
|
suite(`Create ${workspaceStack} workspace`, async () => {
|
|
33
34
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
34
35
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
36
|
+
test('Register running workspace', async () => {
|
|
37
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
38
|
+
});
|
|
35
39
|
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
36
40
|
});
|
|
37
41
|
|
|
@@ -13,6 +13,7 @@ import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
|
13
13
|
import { e2eContainer } from '../../inversify.config';
|
|
14
14
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
15
15
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
16
|
+
import CheReporter from '../../driver/CheReporter';
|
|
16
17
|
|
|
17
18
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
18
19
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -34,6 +35,9 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
34
35
|
suite(`Create ${workspaceStack} workspace`, async () => {
|
|
35
36
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
36
37
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
38
|
+
test('Register running workspace', async () => {
|
|
39
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
40
|
+
});
|
|
37
41
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -34,6 +35,9 @@ suite(`${workspaceStack} test`, async () => {
|
|
|
34
35
|
suite(`Create ${workspaceStack}`, async () => {
|
|
35
36
|
workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
|
|
36
37
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
38
|
+
test('Register running workspace', async () => {
|
|
39
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
40
|
+
});
|
|
37
41
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -14,6 +14,7 @@ import { e2eContainer } from '../../inversify.config';
|
|
|
14
14
|
import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
|
|
15
15
|
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
17
|
+
import CheReporter from '../../driver/CheReporter';
|
|
17
18
|
|
|
18
19
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
19
20
|
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
@@ -34,6 +35,9 @@ suite.skip(`${stack} test`, async () => {
|
|
|
34
35
|
suite (`Create ${stack} workspace`, async () => {
|
|
35
36
|
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
36
37
|
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
38
|
+
test('Register running workspace', async () => {
|
|
39
|
+
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
40
|
+
});
|
|
37
41
|
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -18,12 +18,13 @@ import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
|
|
|
18
18
|
import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
|
|
19
19
|
import { TestConstants } from '../../TestConstants';
|
|
20
20
|
import { DriverHelper } from '../../utils/DriverHelper';
|
|
21
|
-
import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
|
|
22
21
|
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
23
22
|
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
24
23
|
import { By } from 'selenium-webdriver';
|
|
25
24
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
26
25
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
26
|
+
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
|
|
27
|
+
import CheReporter from '../../driver/CheReporter';
|
|
27
28
|
|
|
28
29
|
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
29
30
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
@@ -34,7 +35,7 @@ const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
|
|
|
34
35
|
const loginPage: ICheLoginPage = e2eContainer.get<ICheLoginPage>(TYPES.CheLogin);
|
|
35
36
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
36
37
|
const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
|
|
37
|
-
const testWorkspaceUtils:
|
|
38
|
+
const testWorkspaceUtils: ITestWorkspaceUtil = e2eContainer.get<ITestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
38
39
|
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
39
40
|
|
|
40
41
|
const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
|
|
@@ -54,6 +55,7 @@ suite('Publish branch in git extension', async () => {
|
|
|
54
55
|
await browserTabsUtil.navigateTo(workspacePrefixUrl + wsNameGitPublishBranch);
|
|
55
56
|
await loginPage.login();
|
|
56
57
|
WorkspaceHandlingTests.setWorkspaceName(wsNameGitPublishBranch);
|
|
58
|
+
CheReporter.registerRunningWorkspace(wsNameGitPublishBranch);
|
|
57
59
|
await ide.waitWorkspaceAndIde();
|
|
58
60
|
await projectTree.openProjectTreeContainer();
|
|
59
61
|
await driverHelper.wait(15000);
|
|
@@ -17,13 +17,14 @@ import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
|
|
|
17
17
|
import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
|
|
18
18
|
import { TestConstants } from '../../TestConstants';
|
|
19
19
|
import { DriverHelper } from '../../utils/DriverHelper';
|
|
20
|
-
import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
|
|
21
20
|
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
22
21
|
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
23
22
|
import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
|
|
24
23
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
25
24
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
26
25
|
import { Editor } from '../../pageobjects/ide/Editor';
|
|
26
|
+
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
|
|
27
|
+
import CheReporter from '../../driver/CheReporter';
|
|
27
28
|
|
|
28
29
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
29
30
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
@@ -33,7 +34,7 @@ const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
|
|
|
33
34
|
const loginPage: ICheLoginPage = e2eContainer.get<ICheLoginPage>(TYPES.CheLogin);
|
|
34
35
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
35
36
|
const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
|
|
36
|
-
const testWorkspaceUtils:
|
|
37
|
+
const testWorkspaceUtils: ITestWorkspaceUtil = e2eContainer.get<ITestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
37
38
|
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
|
38
39
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
39
40
|
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
@@ -49,6 +50,7 @@ suite('Checking git + self sign cert', async () => {
|
|
|
49
50
|
const wsConfig = await testWorkspaceUtils.getBaseDevfile();
|
|
50
51
|
wsConfig.metadata!.name = workspaceName;
|
|
51
52
|
WorkspaceHandlingTests.setWorkspaceName(workspaceName);
|
|
53
|
+
CheReporter.registerRunningWorkspace(workspaceName);
|
|
52
54
|
await browserTabsUtil.navigateTo(TestConstants.TS_SELENIUM_BASE_URL);
|
|
53
55
|
await loginPage.login();
|
|
54
56
|
await testWorkspaceUtils.createWsFromDevFile(wsConfig);
|
package/tests/e2e/GitSsh.spec.ts
CHANGED
|
@@ -22,12 +22,13 @@ import { DriverHelper } from '../../utils/DriverHelper';
|
|
|
22
22
|
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
|
|
23
23
|
import { CheGitApi } from '../../utils/VCS/CheGitApi';
|
|
24
24
|
import { GitHubUtil } from '../../utils/VCS/github/GitHubUtil';
|
|
25
|
-
import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
|
|
26
25
|
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
27
26
|
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
28
27
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
29
28
|
import { Dashboard } from '../..';
|
|
30
29
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
30
|
+
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
|
|
31
|
+
import CheReporter from '../../driver/CheReporter';
|
|
31
32
|
|
|
32
33
|
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
33
34
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
@@ -39,7 +40,7 @@ const gitHubUtils: GitHubUtil = e2eContainer.get<GitHubUtil>(CLASSES.GitHubUtil)
|
|
|
39
40
|
const cheGitAPI: CheGitApi = e2eContainer.get(CLASSES.CheGitApi);
|
|
40
41
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
41
42
|
const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
|
|
42
|
-
const testWorkspaceUtils:
|
|
43
|
+
const testWorkspaceUtils: ITestWorkspaceUtil = e2eContainer.get<ITestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
43
44
|
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
|
44
45
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
45
46
|
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
@@ -62,6 +63,7 @@ suite('Git with ssh workflow', async () => {
|
|
|
62
63
|
await dashboard.openDashboard();
|
|
63
64
|
await browserTabsUtil.navigateTo(workspacePrefixUrl + wsNameCheckGeneratingKeys);
|
|
64
65
|
WorkspaceHandlingTests.setWorkspaceName(wsNameCheckGeneratingKeys);
|
|
66
|
+
CheReporter.registerRunningWorkspace(wsNameCheckGeneratingKeys);
|
|
65
67
|
await ide.waitWorkspaceAndIde();
|
|
66
68
|
await projectTree.openProjectTreeContainer();
|
|
67
69
|
await driverHelper.wait(TimeoutConstants.TS_PROJECT_TREE_TIMEOUT);
|
|
@@ -112,6 +114,7 @@ suite('Git with ssh workflow', async () => {
|
|
|
112
114
|
await dashboard.openDashboard();
|
|
113
115
|
await browserTabsUtil.navigateTo(workspacePrefixUrl + wsNameCheckPropagatingKeys);
|
|
114
116
|
WorkspaceHandlingTests.setWorkspaceName(wsNameCheckPropagatingKeys);
|
|
117
|
+
CheReporter.registerRunningWorkspace(wsNameCheckGeneratingKeys);
|
|
115
118
|
await ide.waitWorkspaceAndIde();
|
|
116
119
|
await projectTree.openProjectTreeContainer();
|
|
117
120
|
await driverHelper.wait(TimeoutConstants.TS_PROJECT_TREE_TIMEOUT);
|
|
@@ -23,15 +23,16 @@ import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
|
|
|
23
23
|
import { TestConstants } from '../../TestConstants';
|
|
24
24
|
import { DriverHelper } from '../../utils/DriverHelper';
|
|
25
25
|
import { PreferencesHandler, TerminalRendererType } from '../../utils/PreferencesHandler';
|
|
26
|
-
import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
|
|
27
26
|
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
28
27
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
29
28
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
29
|
+
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
|
|
30
|
+
import CheReporter from '../../driver/CheReporter';
|
|
30
31
|
|
|
31
32
|
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
32
33
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
33
34
|
const loginPage: ICheLoginPage = e2eContainer.get<ICheLoginPage>(TYPES.CheLogin);
|
|
34
|
-
const testWorkspaceUtils:
|
|
35
|
+
const testWorkspaceUtils: ITestWorkspaceUtil = e2eContainer.get<ITestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
35
36
|
const openshiftPlugin: OpenshiftPlugin = e2eContainer.get(CLASSES.OpenshiftPlugin);
|
|
36
37
|
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
|
37
38
|
const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
|
|
@@ -78,6 +79,7 @@ suite('Openshift connector user story', async () => {
|
|
|
78
79
|
await dashboard.openDashboard();
|
|
79
80
|
await browserTabsUtil.navigateTo(workspacePrefixUrl + wsName);
|
|
80
81
|
WorkspaceHandlingTests.setWorkspaceName(wsName);
|
|
82
|
+
CheReporter.registerRunningWorkspace(wsName);
|
|
81
83
|
await ide.waitWorkspaceAndIde();
|
|
82
84
|
await projectTree.openProjectTreeContainer();
|
|
83
85
|
await projectTree.waitProjectImported(projectName, 'index.js');
|
|
@@ -25,6 +25,7 @@ import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
|
|
25
25
|
import * as fs from 'fs';
|
|
26
26
|
import axios from 'axios';
|
|
27
27
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
28
|
+
import CheReporter from '../../driver/CheReporter';
|
|
28
29
|
|
|
29
30
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
30
31
|
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
@@ -66,6 +67,7 @@ suite('Workspace creation via factory url', async () => {
|
|
|
66
67
|
|
|
67
68
|
test('Register running workspace', async () => {
|
|
68
69
|
WorkspaceHandlingTests.setWorkspaceName(projectName);
|
|
70
|
+
CheReporter.registerRunningWorkspace(projectName);
|
|
69
71
|
});
|
|
70
72
|
|
|
71
73
|
test('Register running workspace', async () => {
|
|
@@ -29,6 +29,7 @@ import { Logger } from '../../utils/Logger';
|
|
|
29
29
|
import { RightToolBar } from '../../pageobjects/ide/RightToolBar';
|
|
30
30
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
31
31
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
32
|
+
import CheReporter from '../../driver/CheReporter';
|
|
32
33
|
|
|
33
34
|
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
34
35
|
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
|
@@ -76,6 +77,7 @@ suite('Validation of workspace start', async () => {
|
|
|
76
77
|
|
|
77
78
|
test('Register running workspace', async () => {
|
|
78
79
|
WorkspaceHandlingTests.setWorkspaceName(workspaceName);
|
|
80
|
+
CheReporter.registerRunningWorkspace(workspaceName);
|
|
79
81
|
});
|
|
80
82
|
|
|
81
83
|
test('Wait for workspace readiness', async () => {
|
|
@@ -36,9 +36,7 @@ export class CodeExecutionTests {
|
|
|
36
36
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
37
37
|
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer,
|
|
38
38
|
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil,
|
|
39
|
-
@inject(CLASSES.WorkspaceHandlingTests) private readonly workspaceHandlingTests:WorkspaceHandlingTests
|
|
40
|
-
|
|
41
|
-
) {}
|
|
39
|
+
@inject(CLASSES.WorkspaceHandlingTests) private readonly workspaceHandlingTests: WorkspaceHandlingTests) {}
|
|
42
40
|
|
|
43
41
|
public runTask(taskName: string, timeout: number) {
|
|
44
42
|
test(`Run command '${taskName}'`, async () => {
|
|
@@ -16,9 +16,10 @@ import { CreateWorkspace } from '../pageobjects/dashboard/CreateWorkspace';
|
|
|
16
16
|
import { Workspaces } from '../pageobjects/dashboard/Workspaces';
|
|
17
17
|
import { BrowserTabsUtil } from '../utils/BrowserTabsUtil';
|
|
18
18
|
import { Logger } from '../utils/Logger';
|
|
19
|
-
import {
|
|
19
|
+
import { ApiUrlResolver } from '../utils/workspace/ApiUrlResolver';
|
|
20
20
|
import { DriverHelper } from '../utils/DriverHelper';
|
|
21
21
|
import { Ide } from '../pageobjects/ide/Ide';
|
|
22
|
+
import { TimeoutConstants } from '../TimeoutConstants';
|
|
22
23
|
import { By, error } from 'selenium-webdriver';
|
|
23
24
|
|
|
24
25
|
@injectable()
|
|
@@ -50,11 +51,14 @@ export class WorkspaceHandlingTests {
|
|
|
50
51
|
@inject(CLASSES.Workspaces) private readonly workspaces: Workspaces,
|
|
51
52
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
52
53
|
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil,
|
|
53
|
-
@inject(CLASSES.Ide) private readonly ide: Ide
|
|
54
|
+
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
55
|
+
@inject(CLASSES.ApiUrlResolver) private readonly apiUrlResolver: ApiUrlResolver) {}
|
|
54
56
|
|
|
55
57
|
public createAndOpenWorkspace(stack: string) {
|
|
56
58
|
test(`Create and open new workspace, stack:${stack}`, async () => {
|
|
57
59
|
await this.dashboard.waitPage();
|
|
60
|
+
Logger.debug(`Fetching user kubernetes namespace, storing auth token by getting workspaces API URL.`);
|
|
61
|
+
await this.apiUrlResolver.getWorkspacesApiUrl();
|
|
58
62
|
await this.dashboard.clickCreateWorkspaceButton();
|
|
59
63
|
await this.createWorkspace.waitPage();
|
|
60
64
|
WorkspaceHandlingTests.parentGUID = await this.browserTabsUtil.getCurrentWindowHandle();
|
|
@@ -66,6 +70,8 @@ export class WorkspaceHandlingTests {
|
|
|
66
70
|
public openExistingWorkspace(workspaceName: string) {
|
|
67
71
|
test('Open and start existing workspace', async () => {
|
|
68
72
|
await this.dashboard.waitPage();
|
|
73
|
+
Logger.debug(`Fetching user kubernetes namespace, storing auth token by getting workspaces API URL.`);
|
|
74
|
+
await this.apiUrlResolver.getWorkspacesApiUrl();
|
|
69
75
|
await this.dashboard.clickWorkspacesButton();
|
|
70
76
|
await this.workspaces.waitPage();
|
|
71
77
|
await this.workspaces.clickOpenButton(workspaceName);
|
|
@@ -77,7 +83,7 @@ export class WorkspaceHandlingTests {
|
|
|
77
83
|
try {
|
|
78
84
|
await this.driverHelper.waitVisibility(WorkspaceHandlingTests.START_WORKSPACE_PAGE_NAME_LOCATOR, TimeoutConstants.TS_WAIT_LOADER_PRESENCE_TIMEOUT);
|
|
79
85
|
// it takes a while to update the element with the workspace name
|
|
80
|
-
await this.driverHelper.wait(
|
|
86
|
+
await this.driverHelper.wait(TimeoutConstants.TS_IDE_LOAD_TIMEOUT);
|
|
81
87
|
let startingWorkspaceLineContent = await this.driverHelper.getDriver().findElement(WorkspaceHandlingTests.START_WORKSPACE_PAGE_NAME_LOCATOR).getAttribute('innerHTML');
|
|
82
88
|
// cutting away leading text
|
|
83
89
|
WorkspaceHandlingTests.workspaceName = startingWorkspaceLineContent.substring('Starting workspace '.length).trim();
|
|
@@ -97,7 +103,7 @@ export class WorkspaceHandlingTests {
|
|
|
97
103
|
await this.browserTabsUtil.switchToWindow(tabs[i]);
|
|
98
104
|
try {
|
|
99
105
|
await this.ide.waitIde(TimeoutConstants.TS_IDE_LOAD_TIMEOUT);
|
|
100
|
-
Logger.
|
|
106
|
+
Logger.debug(`WorkspaceHandlingTests.switchBackToIdeTab located and switched to IDE tab`);
|
|
101
107
|
return;
|
|
102
108
|
} catch (err) {
|
|
103
109
|
if (err instanceof error.TimeoutError) {
|
|
@@ -100,7 +100,7 @@ export class CheApiRequestHandler {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
async patch(relativeUrl: string, patchParams: object): Promise<AxiosResponse> {
|
|
103
|
-
|
|
103
|
+
return await axios.patch(this.assembleUrl(relativeUrl), patchParams, await this.headerHandler.get());
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
private assembleUrl(relativeUrl: string): string {
|
|
@@ -12,13 +12,28 @@ import { IAuthorizationHeaderHandler } from './IAuthorizationHeaderHandler';
|
|
|
12
12
|
import { inject, injectable } from 'inversify';
|
|
13
13
|
import { DriverHelper } from '../../DriverHelper';
|
|
14
14
|
import { CLASSES } from '../../../inversify.types';
|
|
15
|
+
import { Logger } from '../../Logger';
|
|
15
16
|
|
|
16
17
|
@injectable()
|
|
17
18
|
export class CheMultiuserAuthorizationHeaderHandler implements IAuthorizationHeaderHandler {
|
|
19
|
+
private authorizationToken: string = '';
|
|
20
|
+
|
|
18
21
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
19
22
|
|
|
20
23
|
async get(): Promise<AxiosRequestConfig> {
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
try {
|
|
25
|
+
let token = await this.driverHelper.getDriver().manage().getCookie('_oauth_proxy');
|
|
26
|
+
if (this.authorizationToken !== token.value) {
|
|
27
|
+
this.authorizationToken = token.value;
|
|
28
|
+
}
|
|
29
|
+
} catch (err) {
|
|
30
|
+
if (this.authorizationToken.length > 0) {
|
|
31
|
+
Logger.warn(`Could not obtain _oauth_proxy cookie from chromedriver, browser session may have been killed. Using stored value.`);
|
|
32
|
+
} else {
|
|
33
|
+
throw new Error(`Could not obtain _oauth_proxy cookie from chromedriver, browser session may have been killed. No stored token present!`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return { headers: { 'cookie': `_oauth_proxy=${this.authorizationToken}` } };
|
|
23
38
|
}
|
|
24
39
|
}
|