@eclipse-che/che-e2e 7.50.1-dev-f29bc09 → 7.50.1-dev-f7a50d3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*********************************************************************
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2022 Red Hat, Inc.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made
|
|
6
6
|
* available under the terms of the Eclipse Public License 2.0
|
|
@@ -11,31 +11,30 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const inversify_config_1 = require("../../inversify.config");
|
|
13
13
|
const inversify_types_1 = require("../../inversify.types");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const TestConstants_1 = require("../../TestConstants");
|
|
15
|
+
const preferencesHandler = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.PreferencesHandler);
|
|
16
|
+
const projectAndFileTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.ProjectAndFileTests);
|
|
16
17
|
const browserTabsUtil = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.BrowserTabsUtil);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const workspacePrefixUrl = `${__1.TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${__1.TestConstants.TS_SELENIUM_USERNAME}/`;
|
|
18
|
+
const workspaceHandlingTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceHandlingTests);
|
|
19
|
+
const devfileUrl = 'https://github.com/che-samples/web-nodejs-sample/tree/devfilev2';
|
|
20
|
+
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}#${devfileUrl}`;
|
|
21
|
+
const projectName = 'web-nodejs-sample';
|
|
22
|
+
const workspaceName = 'nodejs-web-app';
|
|
23
|
+
const subRootFolder = 'app';
|
|
24
24
|
suite('Load test suite', async () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
suite('Create workspace', async () => {
|
|
26
|
+
test('Create workspace using factory', async () => {
|
|
27
|
+
await browserTabsUtil.navigateTo(factoryUrl);
|
|
28
|
+
});
|
|
29
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
30
|
+
test('Set confirmExit preference to never', async () => {
|
|
31
|
+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
32
|
+
});
|
|
30
33
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
test('Wait loading workspace and get time', async () => {
|
|
36
|
-
WorkspaceHandlingTests_1.WorkspaceHandlingTests.setWorkspaceName(workspaceName);
|
|
37
|
-
await ide.waitWorkspaceAndIde();
|
|
38
|
-
await projectTree.openProjectTreeContainer();
|
|
34
|
+
suite('Stopping and deleting the workspace', async () => {
|
|
35
|
+
test('Stop and remove workspace', async () => {
|
|
36
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
37
|
+
});
|
|
39
38
|
});
|
|
40
39
|
});
|
|
41
40
|
//# sourceMappingURL=LoadTest.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadTest.spec.js","sourceRoot":"","sources":["../../../tests/load_test/LoadTest.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;AAExE,6DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"LoadTest.spec.js","sourceRoot":"","sources":["../../../tests/load_test/LoadTest.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;AAExE,6DAAsD;AACtD,2DAAgD;AAChD,uDAAoD;AAMpD,MAAM,kBAAkB,GAAuB,+BAAY,CAAC,GAAG,CAAC,y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load.json
CHANGED
package/package.json
CHANGED
|
@@ -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,46 +9,41 @@
|
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
11
|
import { e2eContainer } from '../../inversify.config';
|
|
12
|
-
import { CLASSES
|
|
13
|
-
import {
|
|
14
|
-
import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
|
|
15
|
-
import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
|
|
16
|
-
import { TestConstants, WorkspaceNameHandler } from '../..';
|
|
17
|
-
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
18
|
-
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
|
|
12
|
+
import { CLASSES } from '../../inversify.types';
|
|
13
|
+
import { TestConstants } from '../../TestConstants';
|
|
19
14
|
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
|
|
15
|
+
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
16
|
+
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
|
|
17
|
+
import { PreferencesHandler } from '../../utils/PreferencesHandler';
|
|
20
18
|
|
|
19
|
+
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
|
|
20
|
+
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
|
|
21
21
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
22
|
-
const
|
|
23
|
-
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
|
24
|
-
const cheLoginPage: ICheLoginPage = e2eContainer.get<ICheLoginPage>(TYPES.CheLogin);
|
|
25
|
-
const testWorkspaceUtils: ITestWorkspaceUtil = e2eContainer.get<ITestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
|
26
|
-
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
|
|
22
|
+
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
27
23
|
|
|
28
|
-
const
|
|
29
|
-
const
|
|
24
|
+
const devfileUrl: string = 'https://github.com/che-samples/web-nodejs-sample/tree/devfilev2';
|
|
25
|
+
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}#${devfileUrl}`;
|
|
26
|
+
const projectName: string = 'web-nodejs-sample';
|
|
27
|
+
const workspaceName: string = 'nodejs-web-app';
|
|
28
|
+
const subRootFolder: string = 'app';
|
|
30
29
|
|
|
31
30
|
suite('Load test suite', async () => {
|
|
31
|
+
suite('Create workspace', async () => {
|
|
32
|
+
test('Create workspace using factory', async () => {
|
|
33
|
+
await browserTabsUtil.navigateTo(factoryUrl);
|
|
34
|
+
});
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
suiteSetup(async function () {
|
|
36
|
-
const wsConfig = await testWorkspaceUtils.getBaseDevfile();
|
|
37
|
-
wsConfig.metadata!.name = workspaceName;
|
|
38
|
-
await testWorkspaceUtils.createWsFromDevFile(wsConfig);
|
|
39
|
-
});
|
|
36
|
+
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder);
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
test('Set confirmExit preference to never', async () => {
|
|
39
|
+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
40
|
+
});
|
|
44
41
|
});
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
suite ('Stopping and deleting the workspace', async () => {
|
|
44
|
+
test('Stop and remove workspace', async () => {
|
|
45
|
+
await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
|
|
46
|
+
});
|
|
50
47
|
});
|
|
51
48
|
|
|
52
49
|
});
|
|
53
|
-
|
|
54
|
-
|