@eclipse-che/che-e2e 7.76.0-next-e6e37f6 → 7.76.0-next-c26a986
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/pageobjects/dashboard/Dashboard.js +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +4 -16
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/Quarkus.spec.js +7 -6
- package/dist/specs/dashboard-samples/Quarkus.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js +6 -8
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js.map +1 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +3 -4
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
- package/dist/specs/factory/Factory.spec.js +8 -8
- package/dist/specs/factory/Factory.spec.js.map +1 -1
- package/dist/specs/factory/NoSetupRepoFactory.spec.js +7 -11
- package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
- package/dist/specs/factory/RefusedOAuthFactory.spec.js +7 -9
- package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
- package/dist/specs/miscellaneous/CreateWorkspaceWithExistedName.spec.js +6 -7
- package/dist/specs/miscellaneous/CreateWorkspaceWithExistedName.spec.js.map +1 -1
- package/dist/specs/miscellaneous/KubedockPodmanTest.spec.js +2 -12
- package/dist/specs/miscellaneous/KubedockPodmanTest.spec.js.map +1 -1
- package/dist/specs/miscellaneous/WorkspaceWithParent.spec.js +10 -9
- package/dist/specs/miscellaneous/WorkspaceWithParent.spec.js.map +1 -1
- package/dist/tests-library/ProjectAndFileTests.js +44 -1
- package/dist/tests-library/ProjectAndFileTests.js.map +1 -1
- package/package.json +2 -2
- package/pageobjects/dashboard/Dashboard.ts +1 -1
- package/specs/SmokeTest.spec.ts +8 -9
- package/specs/dashboard-samples/Quarkus.spec.ts +13 -7
- package/specs/dashboard-samples/RecommendedExtensions.spec.ts +6 -8
- package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +10 -4
- package/specs/factory/Factory.spec.ts +9 -11
- package/specs/factory/NoSetupRepoFactory.spec.ts +7 -13
- package/specs/factory/RefusedOAuthFactory.spec.ts +7 -11
- package/specs/miscellaneous/CreateWorkspaceWithExistedName.spec.ts +13 -7
- package/specs/miscellaneous/KubedockPodmanTest.spec.ts +3 -3
- package/specs/miscellaneous/WorkspaceWithParent.spec.ts +15 -10
- package/tests-library/ProjectAndFileTests.ts +58 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KubedockPodmanTest.spec.js","sourceRoot":"","sources":["../../../specs/miscellaneous/KubedockPodmanTest.spec.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"KubedockPodmanTest.spec.js","sourceRoot":"","sources":["../../../specs/miscellaneous/KubedockPodmanTest.spec.ts"],"names":[],"mappings":";;AAWA,mEAAwD;AACxD,qEAA8D;AAC9D,uFAAoF;AACpF,8CAAyD;AAGzD,+BAA8B;AAI9B,KAAK,CAAC,oFAAoF,EAAE;IAC3F,MAAM,mBAAmB,GAAwB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,mBAAmB,CAAC,CAAC;IAC/F,MAAM,sBAAsB,GAA2B,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,sBAAsB,CAAC,CAAC;IACxG,MAAM,UAAU,GAAe,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,UAAU,CAAC,CAAC;IACpE,MAAM,eAAe,GAAoB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,eAAe,CAAC,CAAC;IACnF,IAAI,kCAAsE,CAAC;IAC3E,IAAI,aAAa,GAAW,EAAE,CAAC;IAE/B,MAAM,UAAU,GACf,qBAAqB;QACrB,gCAAgC;QAChC,yBAAyB;QACzB,kBAAkB;QAClB,sBAAsB;QACtB,4BAA4B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AC,UAAU,EAAE,CAAC;QAChD,kCAAkC,CAAC,uBAAuB,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAgB,kCAAkC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAC1F,IAAA,aAAM,EAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,oBAAoB,EAAE,KAAK;QAC/B,MAAM,sBAAsB,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QAC1D,MAAM,eAAe,CAAC,yBAAyB,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,sBAAsB,EAAE,KAAK;QACjC,MAAM,sBAAsB,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,aAAa,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -26,8 +26,10 @@ suite('Workspace using a parent test suite', function () {
|
|
|
26
26
|
const workspaceHandlingTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceHandlingTests);
|
|
27
27
|
const kubernetesCommandLineToolsExecutor = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.KubernetesCommandLineToolsExecutor);
|
|
28
28
|
let podName = '';
|
|
29
|
+
suiteSetup(function () {
|
|
30
|
+
kubernetesCommandLineToolsExecutor.loginToOcp();
|
|
31
|
+
});
|
|
29
32
|
loginTests.loginIntoChe();
|
|
30
|
-
kubernetesCommandLineToolsExecutor.loginToOcp();
|
|
31
33
|
test('Create a workspace using a parent', async function () {
|
|
32
34
|
const factoryUrl = `${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL}/dashboard/#https://github.com/testsfactory/parentDevfile`;
|
|
33
35
|
await dashboard.waitPage();
|
|
@@ -38,11 +40,11 @@ suite('Workspace using a parent test suite', function () {
|
|
|
38
40
|
await projectAndFileTests.performTrustAuthorDialog();
|
|
39
41
|
});
|
|
40
42
|
test('Check cloning of the test project', async function () {
|
|
41
|
-
const expectedProjectItems = ['.devfile.yaml', 'parent.yaml', 'README.md'];
|
|
42
|
-
const visibleContent = await
|
|
43
|
+
const expectedProjectItems = ['.devfile.yaml', 'parent.yaml', 'README.md', 'parentdevfile'];
|
|
44
|
+
const visibleContent = await projectAndFileTests.getProjectViewSession();
|
|
43
45
|
for (const expectedProjectItem of expectedProjectItems) {
|
|
44
|
-
const visibleItem = await
|
|
45
|
-
(0, chai_1.expect)(visibleItem).not.
|
|
46
|
+
const visibleItem = await projectAndFileTests.getProjectTreeItem(visibleContent, expectedProjectItem);
|
|
47
|
+
(0, chai_1.expect)(visibleItem).not.undefined;
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
50
|
test('Check devfile VS Code tasks ', async function () {
|
|
@@ -61,14 +63,13 @@ suite('Workspace using a parent test suite', function () {
|
|
|
61
63
|
const getPodNameCommand = `${API_TEST_CONSTANTS_1.API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pods --selector=controller.devfile.io/devworkspace_name=sample-using-parent --output jsonpath=\'{.items[0].metadata.name}\'`;
|
|
62
64
|
podName = shellExecutor.executeArbitraryShellScript(getPodNameCommand);
|
|
63
65
|
const containerNames = shellExecutor.executeArbitraryShellScript(`${API_TEST_CONSTANTS_1.API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pod ${podName} --output jsonpath=\'{.spec.containers[*].name}\'`);
|
|
64
|
-
(0, chai_1.expect)(containerNames).
|
|
65
|
-
(0, chai_1.expect)(containerNames).contains('che-gateway');
|
|
66
|
+
(0, chai_1.expect)(containerNames).contains('tools').and.contains('che-gateway');
|
|
66
67
|
const initContainerName = shellExecutor.executeArbitraryShellScript(`${API_TEST_CONSTANTS_1.API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pod ${podName} --output jsonpath=\'{.spec.initContainers[].name}\'`);
|
|
67
|
-
(0, chai_1.expect)(initContainerName).
|
|
68
|
+
(0, chai_1.expect)(initContainerName).contains('che-code-injector');
|
|
68
69
|
});
|
|
69
70
|
test('Check expected environment variables', function () {
|
|
70
71
|
const envList = shellExecutor.executeArbitraryShellScript(`${API_TEST_CONSTANTS_1.API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} exec -i ${podName} -c tools -- sh -c env`);
|
|
71
|
-
(0, chai_1.expect)(envList).
|
|
72
|
+
(0, chai_1.expect)(envList).contains('DEVFILE_ENV_VAR=true').and.contains('PARENT_ENV_VAR=true');
|
|
72
73
|
});
|
|
73
74
|
loginTests.logoutFromChe();
|
|
74
75
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceWithParent.spec.js","sourceRoot":"","sources":["../../../specs/miscellaneous/WorkspaceWithParent.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;wEAQwE;AACxE,qEAA8D;AAE9D,
|
|
1
|
+
{"version":3,"file":"WorkspaceWithParent.spec.js","sourceRoot":"","sources":["../../../specs/miscellaneous/WorkspaceWithParent.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;wEAQwE;AACxE,qEAA8D;AAE9D,6DAA8G;AAC9G,mEAAwD;AAKxD,6EAA0E;AAC1E,+BAA8B;AAC9B,2EAAwE;AACxE,uFAAoF;AACpF,8CAAyD;AAGzD,KAAK,CAAC,qCAAqC,EAAE;IAC5C,MAAM,mBAAmB,GAAwB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,mBAAmB,CAAC,CAAC;IAC/F,MAAM,UAAU,GAAe,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,UAAU,CAAC,CAAC;IACpE,MAAM,eAAe,GAAoB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,eAAe,CAAC,CAAC;IACnF,MAAM,SAAS,GAAc,+BAA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MAAM,iBAAiB,GAAW,aAAa,CAAC,2BAA2B,CAC1E,GAAG,uCAAkB,CAAC,wCAAwC,YAAY,OAAO,sDAAsD,CACvI,CAAC;QACF,IAAA,aAAM,EAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,sCAAsC,EAAE;QAC5C,MAAM,OAAO,GAAW,aAAa,CAAC,2BAA2B,CAChE,GAAG,uCAAkB,CAAC,wCAAwC,YAAY,OAAO,wBAAwB,CACzG,CAAC;QACF,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,aAAa,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -51,15 +51,58 @@ let ProjectAndFileTests = class ProjectAndFileTests {
|
|
|
51
51
|
async performTrustAuthorDialog() {
|
|
52
52
|
Logger_1.Logger.debug();
|
|
53
53
|
// sometimes the trust dialog does not appear at first time, for avoiding this problem we send click event for activating
|
|
54
|
-
|
|
54
|
+
const workbench = new monaco_page_objects_1.Workbench();
|
|
55
|
+
await workbench.click();
|
|
55
56
|
await this.driverHelper.waitAndClick(this.cheCodeLocatorLoader.webCheCodeLocators.WelcomeContent.button, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
|
|
56
57
|
try {
|
|
58
|
+
await workbench.click();
|
|
57
59
|
await this.driverHelper.waitAndClick(this.cheCodeLocatorLoader.webCheCodeLocators.WelcomeContent.button, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
|
|
58
60
|
}
|
|
59
61
|
catch (e) {
|
|
60
62
|
Logger_1.Logger.info('Second welcome content dialog box was not shown');
|
|
61
63
|
}
|
|
62
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* find an ViewSection with project tree.
|
|
67
|
+
* @returns Promise resolving to ViewSection object
|
|
68
|
+
*/
|
|
69
|
+
async getProjectViewSession() {
|
|
70
|
+
Logger_1.Logger.debug();
|
|
71
|
+
await this.driverHelper.waitVisibility(this.cheCodeLocatorLoader.webCheCodeLocators.DefaultTreeSection.itemRow, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT);
|
|
72
|
+
const viewContent = new monaco_page_objects_1.SideBarView().getContent();
|
|
73
|
+
const [projectSection] = await viewContent.getSections();
|
|
74
|
+
return projectSection;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* find an item in this view section by label. Does not perform recursive search through the whole tree.
|
|
78
|
+
* Does however scroll through all the expanded content. Will find items beyond the current scroll range.
|
|
79
|
+
* @param projectSection ViewSection with project tree files.
|
|
80
|
+
* @param label Label of the item to search for.
|
|
81
|
+
* @param itemLevel Shows how deep the algorithm should look into expanded folders to find item,
|
|
82
|
+
* default - 2 means first level is project directory and files inside it is the second level, unlimited 0
|
|
83
|
+
* @returns Promise resolving to ViewItem object is such item exists, undefined otherwise
|
|
84
|
+
*/
|
|
85
|
+
async getProjectTreeItem(projectSection, label, itemLevel = 2) {
|
|
86
|
+
Logger_1.Logger.debug(`${label}`);
|
|
87
|
+
let projectTreeItem;
|
|
88
|
+
await this.driverHelper.waitVisibility(this.cheCodeLocatorLoader.webCheCodeLocators.ScmView.itemLevel(itemLevel), TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT);
|
|
89
|
+
try {
|
|
90
|
+
projectTreeItem = await projectSection.findItem(label, itemLevel);
|
|
91
|
+
if (!projectTreeItem) {
|
|
92
|
+
try {
|
|
93
|
+
await projectSection.collapse();
|
|
94
|
+
projectTreeItem = await projectSection.findItem(label, itemLevel);
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
Logger_1.Logger.warn(JSON.stringify(e));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
Logger_1.Logger.warn(JSON.stringify(e));
|
|
103
|
+
}
|
|
104
|
+
return projectTreeItem;
|
|
105
|
+
}
|
|
63
106
|
};
|
|
64
107
|
ProjectAndFileTests = __decorate([
|
|
65
108
|
(0, inversify_1.injectable)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectAndFileTests.js","sourceRoot":"","sources":["../../tests-library/ProjectAndFileTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;;;;;;;;;;;;;;AAExE,4BAA0B;AAC1B,yCAA+C;AAC/C,wDAAqD;AACrD,gEAAqD;AACrD,4CAAyC;AACzC,sEAAmE;AACnE,kFAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"ProjectAndFileTests.js","sourceRoot":"","sources":["../../tests-library/ProjectAndFileTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;;;;;;;;;;;;;;AAExE,4BAA0B;AAC1B,yCAA+C;AAC/C,wDAAqD;AACrD,gEAAqD;AACrD,4CAAyC;AACzC,sEAAmE;AACnE,kFAA+E;AAC/E,6DAAiG;AAG1F,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC/B,YAEkB,YAA0B,EAE1B,oBAA0C;QAF1C,iBAAY,GAAZ,YAAY,CAAc;QAE1B,yBAAoB,GAApB,oBAAoB,CAAsB;IACzD,CAAC;IAEJ,KAAK,CAAC,sCAAsC;QAC3C,eAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACpC,IAAI;YACH,MAAM,KAAK,GAAW,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;YAC3C,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,CACrC,IAAI,CAAC,oBAAoB,CAAC,kBA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/B;AAlGY,kDAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-che/che-e2e",
|
|
3
|
-
"version": "7.76.0-next-
|
|
3
|
+
"version": "7.76.0-next-c26a986",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@typescript-eslint/parser": "^6.1.0",
|
|
39
39
|
"axios": "^0.25.0",
|
|
40
40
|
"chai": "^4.3.4",
|
|
41
|
-
"chromedriver": "^
|
|
41
|
+
"chromedriver": "^117.0.3",
|
|
42
42
|
"clone-deep": "^4.0.1",
|
|
43
43
|
"eslint": "^8.45.0",
|
|
44
44
|
"eslint-config-prettier": "^8.10.0",
|
|
@@ -163,7 +163,7 @@ export class Dashboard {
|
|
|
163
163
|
await this.driverHelper.waitAndClick(Dashboard.ABOUT_DIALOG_WINDOW_CLOSE_BUTTON);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
async waitExistingWorkspaceFoundAlert(timeout: number = TIMEOUT_CONSTANTS.
|
|
166
|
+
async waitExistingWorkspaceFoundAlert(timeout: number = TIMEOUT_CONSTANTS.TS_WAIT_LOADER_PRESENCE_TIMEOUT): Promise<void> {
|
|
167
167
|
Logger.debug();
|
|
168
168
|
|
|
169
169
|
await this.driverHelper.waitVisibility(Dashboard.EXISTING_WORKSPACE_FOUND_ALERT, timeout);
|
package/specs/SmokeTest.spec.ts
CHANGED
|
@@ -7,13 +7,12 @@
|
|
|
7
7
|
*
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
|
-
import {
|
|
10
|
+
import { ViewSection } from 'monaco-page-objects';
|
|
11
11
|
import { ProjectAndFileTests } from '../tests-library/ProjectAndFileTests';
|
|
12
12
|
import { CLASSES } from '../configs/inversify.types';
|
|
13
13
|
import { e2eContainer } from '../configs/inversify.config';
|
|
14
14
|
import { WorkspaceHandlingTests } from '../tests-library/WorkspaceHandlingTests';
|
|
15
15
|
import { registerRunningWorkspace } from './MochaHooks';
|
|
16
|
-
import { Logger } from '../utils/Logger';
|
|
17
16
|
import { LoginTests } from '../tests-library/LoginTests';
|
|
18
17
|
import { StringUtil } from '../utils/StringUtil';
|
|
19
18
|
import { FACTORY_TEST_CONSTANTS } from '../constants/FACTORY_TEST_CONSTANTS';
|
|
@@ -45,15 +44,15 @@ suite('The SmokeTest userstory', function (): void {
|
|
|
45
44
|
});
|
|
46
45
|
test('Check a project folder has been created', async function (): Promise<void> {
|
|
47
46
|
const projectName: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_PROJECT_NAME || StringUtil.getProjectNameFromGitUrl(factoryUrl);
|
|
48
|
-
projectSection =
|
|
49
|
-
expect(await
|
|
47
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
48
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, projectName), 'Project folder was not imported').not
|
|
49
|
+
.undefined;
|
|
50
50
|
});
|
|
51
51
|
test('Check the project files was imported', async function (): Promise<void> {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
);
|
|
56
|
-
expect(isFileImported).not.eqls(undefined);
|
|
52
|
+
expect(
|
|
53
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME),
|
|
54
|
+
'Project files were not imported'
|
|
55
|
+
).not.undefined;
|
|
57
56
|
});
|
|
58
57
|
test('Stop the workspace', async function (): Promise<void> {
|
|
59
58
|
await workspaceHandlingTests.stopWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { ViewSection } from 'monaco-page-objects';
|
|
12
12
|
import { registerRunningWorkspace } from '../MochaHooks';
|
|
13
13
|
import { LoginTests } from '../../tests-library/LoginTests';
|
|
14
14
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
15
15
|
import { CLASSES } from '../../configs/inversify.types';
|
|
16
16
|
import { WorkspaceHandlingTests } from '../../tests-library/WorkspaceHandlingTests';
|
|
17
17
|
import { ProjectAndFileTests } from '../../tests-library/ProjectAndFileTests';
|
|
18
|
-
import { Logger } from '../../utils/Logger';
|
|
19
18
|
import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS';
|
|
20
19
|
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
|
|
20
|
+
import { expect } from 'chai';
|
|
21
21
|
|
|
22
22
|
const stackName: string = 'Java 11 with Quarkus';
|
|
23
23
|
|
|
@@ -28,7 +28,6 @@ suite(`The ${stackName} userstory`, function (): void {
|
|
|
28
28
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
29
29
|
|
|
30
30
|
let projectSection: ViewSection;
|
|
31
|
-
|
|
32
31
|
const projectName: string = 'quarkus-quickstarts';
|
|
33
32
|
|
|
34
33
|
loginTests.loginIntoChe();
|
|
@@ -50,13 +49,19 @@ suite(`The ${stackName} userstory`, function (): void {
|
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
test('Check a project folder has been created', async function (): Promise<void> {
|
|
53
|
-
projectSection = await
|
|
54
|
-
|
|
52
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
53
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, projectName), 'Project folder was not imported').not.undefined;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('Accept the project as a trusted one', async function (): Promise<void> {
|
|
57
|
+
await projectAndFileTests.performTrustAuthorDialog();
|
|
55
58
|
});
|
|
56
59
|
|
|
57
60
|
test('Check the project files was imported', async function (): Promise<void> {
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
expect(
|
|
62
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME, 2),
|
|
63
|
+
'Project files were not imported'
|
|
64
|
+
).not.undefined;
|
|
60
65
|
});
|
|
61
66
|
|
|
62
67
|
test('Stop the workspace', async function (): Promise<void> {
|
|
@@ -67,5 +72,6 @@ suite(`The ${stackName} userstory`, function (): void {
|
|
|
67
72
|
test('Delete the workspace', async function (): Promise<void> {
|
|
68
73
|
await workspaceHandlingTests.removeWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
69
74
|
});
|
|
75
|
+
|
|
70
76
|
loginTests.logoutFromChe();
|
|
71
77
|
});
|
|
@@ -74,8 +74,9 @@ for (const sample of samples) {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
test('Check the project files were imported', async function (): Promise<void> {
|
|
77
|
-
|
|
78
|
-
expect(await
|
|
77
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
78
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, pathToExtensionsListFileName), 'Files not imported').not
|
|
79
|
+
.undefined;
|
|
79
80
|
});
|
|
80
81
|
|
|
81
82
|
test('Accept the project as a trusted one', async function (): Promise<void> {
|
|
@@ -83,11 +84,8 @@ for (const sample of samples) {
|
|
|
83
84
|
});
|
|
84
85
|
|
|
85
86
|
test(`Get recommended extensions list from ${extensionsListFileName}`, async function (): Promise<void> {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
await (await projectSection.findItem(pathToExtensionsListFileName))?.select();
|
|
89
|
-
await driverHelper.waitVisibility(webCheCodeLocators.DefaultTreeItem.ctor(extensionsListFileName));
|
|
90
|
-
await (await projectSection.findItem(extensionsListFileName))?.select();
|
|
87
|
+
await (await projectAndFileTests.getProjectTreeItem(projectSection, pathToExtensionsListFileName))?.select();
|
|
88
|
+
await (await projectAndFileTests.getProjectTreeItem(projectSection, extensionsListFileName, 3))?.select();
|
|
91
89
|
Logger.debug(`EditorView().openEditor(${extensionsListFileName})`);
|
|
92
90
|
const editor: TextEditor = (await new EditorView().openEditor(extensionsListFileName)) as TextEditor;
|
|
93
91
|
await driverHelper.waitVisibility(webCheCodeLocators.Editor.inputArea);
|
|
@@ -185,7 +183,7 @@ for (const sample of samples) {
|
|
|
185
183
|
const isInstalled: boolean = (await itemWithRightNameAndPublisher?.isInstalled()) as boolean;
|
|
186
184
|
|
|
187
185
|
Logger.debug(`itemWithRightNameAndPublisher?.isInstalled(): ${isInstalled}.`);
|
|
188
|
-
expect(isInstalled, `Extension ${extension.name} not installed`).
|
|
186
|
+
expect(isInstalled, `Extension ${extension.name} not installed`).to.be.true;
|
|
189
187
|
|
|
190
188
|
Logger.debug('itemWithRightNameAndPublisher.manage(): get context menu.');
|
|
191
189
|
const extensionManageMenu: ContextMenu = await (itemWithRightNameAndPublisher as ExtensionsViewItem).manage();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { ViewSection } from 'monaco-page-objects';
|
|
12
12
|
import { registerRunningWorkspace } from '../MochaHooks';
|
|
13
13
|
import { LoginTests } from '../../tests-library/LoginTests';
|
|
14
14
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
@@ -88,9 +88,15 @@ suite('DevConsole Integration', function (): void {
|
|
|
88
88
|
|
|
89
89
|
test('Check if project and files imported', async function (): Promise<void> {
|
|
90
90
|
const applicationSourceProjectName: string = StringUtil.getProjectNameFromGitUrl(gitImportRepo);
|
|
91
|
-
const projectSection: ViewSection = await
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
const projectSection: ViewSection = await projectAndFileTests.getProjectViewSession();
|
|
92
|
+
expect(
|
|
93
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, applicationSourceProjectName),
|
|
94
|
+
'Project folder was not imported'
|
|
95
|
+
).not.undefined;
|
|
96
|
+
expect(
|
|
97
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME),
|
|
98
|
+
'Project files were not imported'
|
|
99
|
+
).not.undefined;
|
|
94
100
|
});
|
|
95
101
|
|
|
96
102
|
test('Stop and delete the workspace by API', async function (): Promise<void> {
|
|
@@ -17,11 +17,9 @@ import {
|
|
|
17
17
|
EditorView,
|
|
18
18
|
Locators,
|
|
19
19
|
NewScmView,
|
|
20
|
-
SideBarView,
|
|
21
20
|
SingleScmProvider,
|
|
22
21
|
TextEditor,
|
|
23
22
|
ViewControl,
|
|
24
|
-
ViewItem,
|
|
25
23
|
ViewSection
|
|
26
24
|
} from 'monaco-page-objects';
|
|
27
25
|
import { expect } from 'chai';
|
|
@@ -92,20 +90,20 @@ suite(
|
|
|
92
90
|
test('Check if a project folder has been created', async function (): Promise<void> {
|
|
93
91
|
testRepoProjectName = StringUtil.getProjectNameFromGitUrl(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_URL);
|
|
94
92
|
Logger.debug(`new SideBarView().getContent().getSection: get ${testRepoProjectName}`);
|
|
95
|
-
projectSection = await
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
test('Check if the project files were imported', async function (): Promise<void> {
|
|
99
|
-
const label: string = BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME;
|
|
100
|
-
Logger.debug(`projectSection.findItem: find ${label}`);
|
|
101
|
-
const isFileImported: ViewItem | undefined = await projectSection.findItem(label);
|
|
102
|
-
expect(isFileImported).not.eqls(undefined);
|
|
93
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
94
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, testRepoProjectName), 'Project folder was not imported').not
|
|
95
|
+
.undefined;
|
|
103
96
|
});
|
|
104
97
|
|
|
105
98
|
test('Accept the project as a trusted one', async function (): Promise<void> {
|
|
106
99
|
await projectAndFileTests.performTrustAuthorDialog();
|
|
107
100
|
});
|
|
108
101
|
|
|
102
|
+
test('Check if the project files were imported', async function (): Promise<void> {
|
|
103
|
+
const label: string = BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME;
|
|
104
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, label), 'Project files were not imported').not.undefined;
|
|
105
|
+
});
|
|
106
|
+
|
|
109
107
|
test('Make changes to the file', async function (): Promise<void> {
|
|
110
108
|
Logger.debug(`projectSection.openItem: "${fileToChange}"`);
|
|
111
109
|
await projectSection.openItem(fileToChange);
|
|
@@ -186,7 +184,7 @@ suite(
|
|
|
186
184
|
webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel),
|
|
187
185
|
'aria-disabled'
|
|
188
186
|
);
|
|
189
|
-
expect(isCommitButtonDisabled).
|
|
187
|
+
expect(isCommitButtonDisabled).to.be.true;
|
|
190
188
|
});
|
|
191
189
|
|
|
192
190
|
test('Stop the workspace', async function (): Promise<void> {
|
|
@@ -18,11 +18,9 @@ import {
|
|
|
18
18
|
Locators,
|
|
19
19
|
ModalDialog,
|
|
20
20
|
NewScmView,
|
|
21
|
-
SideBarView,
|
|
22
21
|
SingleScmProvider,
|
|
23
22
|
TextEditor,
|
|
24
23
|
ViewControl,
|
|
25
|
-
ViewItem,
|
|
26
24
|
ViewSection
|
|
27
25
|
} from 'monaco-page-objects';
|
|
28
26
|
import { expect } from 'chai';
|
|
@@ -86,10 +84,7 @@ suite(
|
|
|
86
84
|
test(`Check that workspace cannot be created without OAuth for ${isPrivateRepo} repo`, async function (): Promise<void> {
|
|
87
85
|
await dashboard.waitLoader();
|
|
88
86
|
const loaderAlert: string = await dashboard.getLoaderAlert();
|
|
89
|
-
expect(loaderAlert).
|
|
90
|
-
'Cause: Unsupported OAuth provider',
|
|
91
|
-
'Cause: No PersonalAccessTokenFetcher configured'
|
|
92
|
-
]);
|
|
87
|
+
expect(loaderAlert).to.contain('Cause: Could not reach devfile at');
|
|
93
88
|
});
|
|
94
89
|
|
|
95
90
|
test('Check that workspace was not created', async function (): Promise<void> {
|
|
@@ -116,8 +111,9 @@ suite(
|
|
|
116
111
|
|
|
117
112
|
test('Check if a project folder has been created', async function (): Promise<void> {
|
|
118
113
|
testRepoProjectName = StringUtil.getProjectNameFromGitUrl(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_URL);
|
|
119
|
-
|
|
120
|
-
projectSection
|
|
114
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
115
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, testRepoProjectName), 'Project folder was not imported')
|
|
116
|
+
.not.undefined;
|
|
121
117
|
});
|
|
122
118
|
|
|
123
119
|
test('Accept the project as a trusted one', async function (): Promise<void> {
|
|
@@ -125,10 +121,8 @@ suite(
|
|
|
125
121
|
});
|
|
126
122
|
|
|
127
123
|
test('Check if the project files were imported', async function (): Promise<void> {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// projectSection.findItem(label) can return undefined but test will goes on
|
|
131
|
-
expect(isFileImported).not.eqls(undefined);
|
|
124
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, label), 'Project files were not imported').not
|
|
125
|
+
.undefined;
|
|
132
126
|
});
|
|
133
127
|
|
|
134
128
|
test('Make changes to the file', async function (): Promise<void> {
|
|
@@ -243,7 +237,7 @@ suite(
|
|
|
243
237
|
webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel),
|
|
244
238
|
'aria-disabled'
|
|
245
239
|
);
|
|
246
|
-
expect(isCommitButtonDisabled).
|
|
240
|
+
expect(isCommitButtonDisabled).to.be.true;
|
|
247
241
|
});
|
|
248
242
|
|
|
249
243
|
test('Stop the workspace', async function (): Promise<void> {
|
|
@@ -18,11 +18,9 @@ import {
|
|
|
18
18
|
Locators,
|
|
19
19
|
ModalDialog,
|
|
20
20
|
NewScmView,
|
|
21
|
-
SideBarView,
|
|
22
21
|
SingleScmProvider,
|
|
23
22
|
TextEditor,
|
|
24
23
|
ViewControl,
|
|
25
|
-
ViewItem,
|
|
26
24
|
ViewSection
|
|
27
25
|
} from 'monaco-page-objects';
|
|
28
26
|
import { expect } from 'chai';
|
|
@@ -99,8 +97,9 @@ suite(
|
|
|
99
97
|
|
|
100
98
|
test('Check if a project folder has been created', async function (): Promise<void> {
|
|
101
99
|
testRepoProjectName = StringUtil.getProjectNameFromGitUrl(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_URL);
|
|
102
|
-
|
|
103
|
-
projectSection
|
|
100
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
101
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, testRepoProjectName), 'Project folder was not imported').not
|
|
102
|
+
.undefined;
|
|
104
103
|
});
|
|
105
104
|
|
|
106
105
|
test('Accept the project as a trusted one', async function (): Promise<void> {
|
|
@@ -116,15 +115,12 @@ suite(
|
|
|
116
115
|
});
|
|
117
116
|
|
|
118
117
|
test('Check that project files were not imported', async function (): Promise<void> {
|
|
119
|
-
|
|
120
|
-
expect(isFileImported).eqls(undefined);
|
|
118
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, label), 'Project files were found').to.be.undefined;
|
|
121
119
|
});
|
|
122
120
|
} else {
|
|
123
121
|
test('Check if the project files were imported', async function (): Promise<void> {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
// projectSection.findItem(label) can return undefined but test will goes on
|
|
127
|
-
expect(isFileImported).not.eqls(undefined);
|
|
122
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, label), 'Project files were not imported').not
|
|
123
|
+
.undefined;
|
|
128
124
|
});
|
|
129
125
|
|
|
130
126
|
test('Make changes to the file', async function (): Promise<void> {
|
|
@@ -231,7 +227,7 @@ suite(
|
|
|
231
227
|
webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel),
|
|
232
228
|
'aria-disabled'
|
|
233
229
|
);
|
|
234
|
-
expect(isCommitButtonDisabled).
|
|
230
|
+
expect(isCommitButtonDisabled).to.be.true;
|
|
235
231
|
});
|
|
236
232
|
}
|
|
237
233
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
11
|
-
import { ViewSection
|
|
11
|
+
import { ViewSection } from 'monaco-page-objects';
|
|
12
12
|
import { CLASSES } from '../../configs/inversify.types';
|
|
13
13
|
import { expect } from 'chai';
|
|
14
14
|
import { WorkspaceHandlingTests } from '../../tests-library/WorkspaceHandlingTests';
|
|
@@ -42,9 +42,12 @@ suite('"Start workspace with existed workspace name" test', function (): void {
|
|
|
42
42
|
|
|
43
43
|
test('Wait workspace readiness and project folder has been created', async function (): Promise<void> {
|
|
44
44
|
await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
|
|
45
|
-
projectSection = await
|
|
46
|
-
|
|
47
|
-
expect(
|
|
45
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
46
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, projectName), 'Project folder was not imported').not.undefined;
|
|
47
|
+
expect(
|
|
48
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME),
|
|
49
|
+
'Project files were not imported'
|
|
50
|
+
).not.undefined;
|
|
48
51
|
});
|
|
49
52
|
|
|
50
53
|
test('Stop created workspace', async function (): Promise<void> {
|
|
@@ -65,9 +68,12 @@ suite('"Start workspace with existed workspace name" test', function (): void {
|
|
|
65
68
|
|
|
66
69
|
test('Wait the second workspace readiness and project folder has been created', async function (): Promise<void> {
|
|
67
70
|
await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
|
|
68
|
-
projectSection = await
|
|
69
|
-
|
|
70
|
-
expect(
|
|
71
|
+
projectSection = await projectAndFileTests.getProjectViewSession();
|
|
72
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, projectName), 'Project folder was not imported').not.undefined;
|
|
73
|
+
expect(
|
|
74
|
+
await projectAndFileTests.getProjectTreeItem(projectSection, BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME),
|
|
75
|
+
'Project files were not imported'
|
|
76
|
+
).not.undefined;
|
|
71
77
|
});
|
|
72
78
|
|
|
73
79
|
test(`Stop all created ${stackName} workspaces`, async function (): Promise<void> {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
|
-
import {
|
|
10
|
+
import { ViewSection } from 'monaco-page-objects';
|
|
11
11
|
import { ProjectAndFileTests } from '../../tests-library/ProjectAndFileTests';
|
|
12
12
|
import { CLASSES } from '../../configs/inversify.types';
|
|
13
13
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
@@ -66,8 +66,8 @@ suite('Check possibility to manage containers within a workspace with kubedock a
|
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
test('Check the project files were imported', async function (): Promise<void> {
|
|
69
|
-
const
|
|
70
|
-
expect(await
|
|
69
|
+
const projectSection: ViewSection = await projectAndFileTests.getProjectViewSession();
|
|
70
|
+
expect(await projectAndFileTests.getProjectTreeItem(projectSection, 'Dockerfile'), 'Files not imported').not.undefined;
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
test('Create and check container runs using kubedock and podman', function (): void {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
11
11
|
import { ShellExecutor } from '../../utils/ShellExecutor';
|
|
12
|
-
import { InputBox, QuickOpenBox, QuickPickItem,
|
|
12
|
+
import { InputBox, QuickOpenBox, QuickPickItem, ViewItem, ViewSection, Workbench } from 'monaco-page-objects';
|
|
13
13
|
import { CLASSES } from '../../configs/inversify.types';
|
|
14
14
|
import { ProjectAndFileTests } from '../../tests-library/ProjectAndFileTests';
|
|
15
15
|
import { LoginTests } from '../../tests-library/LoginTests';
|
|
@@ -32,9 +32,14 @@ suite('Workspace using a parent test suite', function (): void {
|
|
|
32
32
|
const kubernetesCommandLineToolsExecutor: KubernetesCommandLineToolsExecutor = e2eContainer.get(
|
|
33
33
|
CLASSES.KubernetesCommandLineToolsExecutor
|
|
34
34
|
);
|
|
35
|
+
|
|
35
36
|
let podName: string = '';
|
|
37
|
+
|
|
38
|
+
suiteSetup(function (): void {
|
|
39
|
+
kubernetesCommandLineToolsExecutor.loginToOcp();
|
|
40
|
+
});
|
|
41
|
+
|
|
36
42
|
loginTests.loginIntoChe();
|
|
37
|
-
kubernetesCommandLineToolsExecutor.loginToOcp();
|
|
38
43
|
|
|
39
44
|
test('Create a workspace using a parent', async function (): Promise<void> {
|
|
40
45
|
const factoryUrl: string = `${BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL}/dashboard/#https://github.com/testsfactory/parentDevfile`;
|
|
@@ -47,12 +52,12 @@ suite('Workspace using a parent test suite', function (): void {
|
|
|
47
52
|
});
|
|
48
53
|
|
|
49
54
|
test('Check cloning of the test project', async function (): Promise<void> {
|
|
50
|
-
const expectedProjectItems: string[] = ['.devfile.yaml', 'parent.yaml', 'README.md'];
|
|
51
|
-
const visibleContent: ViewSection = await
|
|
55
|
+
const expectedProjectItems: string[] = ['.devfile.yaml', 'parent.yaml', 'README.md', 'parentdevfile'];
|
|
56
|
+
const visibleContent: ViewSection = await projectAndFileTests.getProjectViewSession();
|
|
52
57
|
|
|
53
58
|
for (const expectedProjectItem of expectedProjectItems) {
|
|
54
|
-
const visibleItem: ViewItem | undefined = await
|
|
55
|
-
expect(visibleItem).not.
|
|
59
|
+
const visibleItem: ViewItem | undefined = await projectAndFileTests.getProjectTreeItem(visibleContent, expectedProjectItem);
|
|
60
|
+
expect(visibleItem).not.undefined;
|
|
56
61
|
}
|
|
57
62
|
});
|
|
58
63
|
|
|
@@ -76,20 +81,20 @@ suite('Workspace using a parent test suite', function (): void {
|
|
|
76
81
|
const containerNames: string = shellExecutor.executeArbitraryShellScript(
|
|
77
82
|
`${API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pod ${podName} --output jsonpath=\'{.spec.containers[*].name}\'`
|
|
78
83
|
);
|
|
79
|
-
expect(containerNames).
|
|
80
|
-
expect(containerNames).contains('che-gateway');
|
|
84
|
+
expect(containerNames).contains('tools').and.contains('che-gateway');
|
|
81
85
|
|
|
82
86
|
const initContainerName: string = shellExecutor.executeArbitraryShellScript(
|
|
83
87
|
`${API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pod ${podName} --output jsonpath=\'{.spec.initContainers[].name}\'`
|
|
84
88
|
);
|
|
85
|
-
expect(initContainerName).
|
|
89
|
+
expect(initContainerName).contains('che-code-injector');
|
|
86
90
|
});
|
|
87
91
|
|
|
88
92
|
test('Check expected environment variables', function (): void {
|
|
89
93
|
const envList: string = shellExecutor.executeArbitraryShellScript(
|
|
90
94
|
`${API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} exec -i ${podName} -c tools -- sh -c env`
|
|
91
95
|
);
|
|
92
|
-
expect(envList).
|
|
96
|
+
expect(envList).contains('DEVFILE_ENV_VAR=true').and.contains('PARENT_ENV_VAR=true');
|
|
93
97
|
});
|
|
98
|
+
|
|
94
99
|
loginTests.logoutFromChe();
|
|
95
100
|
});
|