@eclipse-che/che-e2e 7.118.0-next-017477d → 7.118.0-next-0435d2e
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/specs/dashboard-samples/StartWorkspaceUsingVSCodeDesktopSshEditor.spec.js +34 -34
- package/dist/specs/dashboard-samples/StartWorkspaceUsingVSCodeDesktopSshEditor.spec.js.map +1 -1
- package/package.json +1 -1
- package/specs/dashboard-samples/StartWorkspaceUsingVSCodeDesktopSshEditor.spec.ts +41 -35
|
@@ -8,31 +8,25 @@
|
|
|
8
8
|
*
|
|
9
9
|
* SPDX-License-Identifier: EPL-2.0
|
|
10
10
|
**********************************************************************/
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const fs_1 = __importDefault(require("fs"));
|
|
16
|
-
const path_1 = __importDefault(require("path"));
|
|
17
|
-
const yaml_1 = __importDefault(require("yaml"));
|
|
18
12
|
const inversify_config_1 = require("../../configs/inversify.config");
|
|
19
13
|
const inversify_types_1 = require("../../configs/inversify.types");
|
|
20
14
|
const WorkspaceHandlingTests_1 = require("../../tests-library/WorkspaceHandlingTests");
|
|
21
15
|
const chai_1 = require("chai");
|
|
22
16
|
const Logger_1 = require("../../utils/Logger");
|
|
23
17
|
const BASE_TEST_CONSTANTS_1 = require("../../constants/BASE_TEST_CONSTANTS");
|
|
18
|
+
const selenium_webdriver_1 = require("selenium-webdriver");
|
|
24
19
|
suite('Check Visual Studio Code (desktop) (SSH) with all samples', function () {
|
|
25
20
|
this.timeout(6000000);
|
|
26
21
|
const workspaceHandlingTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceHandlingTests);
|
|
27
|
-
const pathToSampleFile = path_1.default.resolve('resources/default-devfile.yaml');
|
|
28
|
-
const workspaceName = yaml_1.default.parse(fs_1.default.readFileSync(pathToSampleFile, 'utf8')).metadata.name;
|
|
29
|
-
const kubernetesCommandLineToolsExecutor = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.KubernetesCommandLineToolsExecutor);
|
|
30
|
-
kubernetesCommandLineToolsExecutor.workspaceName = workspaceName;
|
|
31
22
|
const loginTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.LoginTests);
|
|
32
23
|
const dashboard = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.Dashboard);
|
|
33
24
|
const browserTabsUtil = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.BrowserTabsUtil);
|
|
25
|
+
const driverHelper = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.DriverHelper);
|
|
34
26
|
const vsCodeDesktopSshEditor = '//*[@id="editor-selector-card-che-incubator/che-code-sshd/latest"]';
|
|
35
|
-
const
|
|
27
|
+
const useExtensionSwitcher = '//label[@class="switch"]';
|
|
28
|
+
const useExtensionPageId = '//div[@id="docs-parent"]';
|
|
29
|
+
const titlexPath = '//div[@class="header-title"]';
|
|
36
30
|
const ocPortForwardxPath = '//*[@id="port-forward"]';
|
|
37
31
|
const sshKeyxPath = '//*[@id="key"]';
|
|
38
32
|
const sshKonfigxPath = '//*[@id="config"]';
|
|
@@ -57,23 +51,26 @@ suite('Check Visual Studio Code (desktop) (SSH) with all samples', function () {
|
|
|
57
51
|
'https://gh.crw-qe.com/test-automation-only/ubi8/tree/ubi8-latest',
|
|
58
52
|
'https://gh.crw-qe.com/test-automation-only/ubi9-based-sample-public/tree/ubi9-minimal'
|
|
59
53
|
];
|
|
60
|
-
async function deleteWorkspace() {
|
|
61
|
-
await dashboard.openDashboard();
|
|
62
|
-
await browserTabsUtil.closeAllTabsExceptCurrent();
|
|
63
|
-
await dashboard.stopAndRemoveWorkspaceByUI(WorkspaceHandlingTests_1.WorkspaceHandlingTests.getWorkspaceName());
|
|
64
|
-
WorkspaceHandlingTests_1.WorkspaceHandlingTests.clearWorkspaceName();
|
|
65
|
-
}
|
|
66
54
|
suiteSetup('Login into Che', async function () {
|
|
67
55
|
await loginTests.loginIntoChe();
|
|
68
56
|
});
|
|
57
|
+
async function clickOnElementByXpath(xpath) {
|
|
58
|
+
Logger_1.Logger.debug();
|
|
59
|
+
await driverHelper.waitAndClick(selenium_webdriver_1.By.xpath(xpath));
|
|
60
|
+
}
|
|
69
61
|
async function testWorkspaceStartup(sampleNameOrUrl, isUrl) {
|
|
70
62
|
await dashboard.openDashboard();
|
|
63
|
+
await dashboard.clickCreateWorkspaceButton();
|
|
71
64
|
if (isUrl) {
|
|
72
65
|
await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndGitUrl(vsCodeDesktopSshEditor, sampleNameOrUrl, titlexPath);
|
|
73
66
|
}
|
|
74
67
|
else {
|
|
75
68
|
await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndSample(vsCodeDesktopSshEditor, sampleNameOrUrl, titlexPath);
|
|
76
69
|
}
|
|
70
|
+
const useExtensionPageText = await workspaceHandlingTests.getTextFromUIElementByXpath(useExtensionPageId);
|
|
71
|
+
(0, chai_1.expect)(useExtensionPageText).contains('Install the following VS Code extensions');
|
|
72
|
+
// toggle UseExtension switcher
|
|
73
|
+
await clickOnElementByXpath(useExtensionSwitcher);
|
|
77
74
|
// check title
|
|
78
75
|
const headerText = await workspaceHandlingTests.getTextFromUIElementByXpath(titlexPath);
|
|
79
76
|
(0, chai_1.expect)('Workspace ' + WorkspaceHandlingTests_1.WorkspaceHandlingTests.getWorkspaceName() + ' is running').equal(headerText);
|
|
@@ -91,33 +88,36 @@ suite('Check Visual Studio Code (desktop) (SSH) with all samples', function () {
|
|
|
91
88
|
.and.contains('Port')
|
|
92
89
|
.and.contains('IdentityFile')
|
|
93
90
|
.and.contains('UserKnownHostsFile');
|
|
94
|
-
await deleteWorkspace();
|
|
95
91
|
}
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
samplesForCheck.forEach((sampleName) => {
|
|
93
|
+
test('Test start of VSCode (desktop) (SSH) with default Samples', async function () {
|
|
98
94
|
await testWorkspaceStartup(sampleName, false);
|
|
99
|
-
}
|
|
95
|
+
});
|
|
100
96
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
if (BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) {
|
|
98
|
+
Logger_1.Logger.info('Test cluster is disconnected. Using url for airgap cluster.');
|
|
99
|
+
gitRepoUrlsToCheckAirgap.forEach((url) => {
|
|
100
|
+
test('Test start of VSCode (desktop) (SSH) with ubi', async function () {
|
|
105
101
|
await testWorkspaceStartup(url, true);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
gitRepoUrlsToCheck.forEach((url) => {
|
|
107
|
+
test('Test start of VSCode (desktop) (SSH) with ubi', async function () {
|
|
110
108
|
await testWorkspaceStartup(url, true);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
Logger_1.Logger.info('
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
teardown('Delete DevWorkspace', async function () {
|
|
113
|
+
Logger_1.Logger.info('Delete DevWorkspace. After each test.');
|
|
116
114
|
await dashboard.openDashboard();
|
|
117
115
|
await browserTabsUtil.closeAllTabsExceptCurrent();
|
|
118
116
|
if (WorkspaceHandlingTests_1.WorkspaceHandlingTests.getWorkspaceName() !== 'undefined') {
|
|
117
|
+
Logger_1.Logger.info('Workspace name is defined. Deleting workspace...');
|
|
119
118
|
await dashboard.deleteStoppedWorkspaceByUI(WorkspaceHandlingTests_1.WorkspaceHandlingTests.getWorkspaceName());
|
|
120
119
|
}
|
|
120
|
+
WorkspaceHandlingTests_1.WorkspaceHandlingTests.clearWorkspaceName();
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
//# sourceMappingURL=StartWorkspaceUsingVSCodeDesktopSshEditor.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartWorkspaceUsingVSCodeDesktopSshEditor.spec.js","sourceRoot":"","sources":["../../../specs/dashboard-samples/StartWorkspaceUsingVSCodeDesktopSshEditor.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE
|
|
1
|
+
{"version":3,"file":"StartWorkspaceUsingVSCodeDesktopSshEditor.spec.js","sourceRoot":"","sources":["../../../specs/dashboard-samples/StartWorkspaceUsingVSCodeDesktopSshEditor.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;AAExE,qEAA8D;AAC9D,mEAAwD;AAIxD,uFAAoF;AACpF,+BAA8B;AAC9B,+CAA4C;AAC5C,6EAA0E;AAE1E,2DAAwC;AAExC,KAAK,CAAC,2DAA2D,EAAE;IAClE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,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,SAAS,GAAc,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,SAAS,CAAC,CAAC;IACjE,MAAM,eAAe,GAAoB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,eAAe,CAAC,CAAC;IACnF,MAAM,YAAY,GAAiB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,YAAY,CAAC,CAAC;IAE1E,MAAM,sBAAsB,GAAW,oEAAoE,CAAC;IAE5G,MAAM,oBAAoB,GAAW,0BAA0B,CAAC;IAChE,MAAM,kBAAkB,GAAW,0BAA0B,CAAC;IAE9D,MAAM,UAAU,GAAW,8BAA8B,CAAC;IA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,eAAM,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;QAC3E,wBAAwB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAQ,EAAE;YAC9C,IAAI,CAAC,+CAA+C,EAAE,KAAK;gBAC1D,MAAM,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;KACH;SAAM;QACN,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAQ,EAAE;YACxC,IAAI,CAAC,+CAA+C,EAAE,KAAK;gBAC1D,MAAM,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;KACH;IAED,QAAQ,CAAC,qBAAqB,EAAE,KAAK;QACpC,eAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QAErD,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QAChC,MAAM,eAAe,CAAC,yBAAyB,EAAE,CAAC;QAElD,IAAI,+CAAsB,CAAC,gBAAgB,EAAE,KAAK,WAAW,EAAE;YAC9D,eAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;YAChE,MAAM,SAAS,CAAC,0BAA0B,CAAC,+CAAsB,CAAC,gBAAgB,EAAE,CAAC,CAAC;SACtF;QAED,+CAAsB,CAAC,kBAAkB,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
|
-
import { KubernetesCommandLineToolsExecutor } from '../../utils/KubernetesCommandLineToolsExecutor';
|
|
12
|
-
import fs from 'fs';
|
|
13
|
-
import path from 'path';
|
|
14
|
-
import YAML from 'yaml';
|
|
15
11
|
import { e2eContainer } from '../../configs/inversify.config';
|
|
16
12
|
import { CLASSES } from '../../configs/inversify.types';
|
|
17
13
|
import { LoginTests } from '../../tests-library/LoginTests';
|
|
@@ -21,22 +17,23 @@ import { WorkspaceHandlingTests } from '../../tests-library/WorkspaceHandlingTes
|
|
|
21
17
|
import { expect } from 'chai';
|
|
22
18
|
import { Logger } from '../../utils/Logger';
|
|
23
19
|
import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS';
|
|
20
|
+
import { DriverHelper } from '../../utils/DriverHelper';
|
|
21
|
+
import { By } from 'selenium-webdriver';
|
|
24
22
|
|
|
25
23
|
suite('Check Visual Studio Code (desktop) (SSH) with all samples', function (): void {
|
|
26
24
|
this.timeout(6000000);
|
|
27
25
|
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
28
|
-
const pathToSampleFile: string = path.resolve('resources/default-devfile.yaml');
|
|
29
|
-
const workspaceName: string = YAML.parse(fs.readFileSync(pathToSampleFile, 'utf8')).metadata.name;
|
|
30
|
-
const kubernetesCommandLineToolsExecutor: KubernetesCommandLineToolsExecutor = e2eContainer.get(
|
|
31
|
-
CLASSES.KubernetesCommandLineToolsExecutor
|
|
32
|
-
);
|
|
33
|
-
kubernetesCommandLineToolsExecutor.workspaceName = workspaceName;
|
|
34
26
|
const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests);
|
|
35
27
|
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
|
36
28
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
29
|
+
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
37
30
|
|
|
38
31
|
const vsCodeDesktopSshEditor: string = '//*[@id="editor-selector-card-che-incubator/che-code-sshd/latest"]';
|
|
39
|
-
|
|
32
|
+
|
|
33
|
+
const useExtensionSwitcher: string = '//label[@class="switch"]';
|
|
34
|
+
const useExtensionPageId: string = '//div[@id="docs-parent"]';
|
|
35
|
+
|
|
36
|
+
const titlexPath: string = '//div[@class="header-title"]';
|
|
40
37
|
const ocPortForwardxPath: string = '//*[@id="port-forward"]';
|
|
41
38
|
const sshKeyxPath: string = '//*[@id="key"]';
|
|
42
39
|
const sshKonfigxPath: string = '//*[@id="config"]';
|
|
@@ -65,19 +62,19 @@ suite('Check Visual Studio Code (desktop) (SSH) with all samples', function ():
|
|
|
65
62
|
'https://gh.crw-qe.com/test-automation-only/ubi9-based-sample-public/tree/ubi9-minimal'
|
|
66
63
|
];
|
|
67
64
|
|
|
68
|
-
async function deleteWorkspace(): Promise<void> {
|
|
69
|
-
await dashboard.openDashboard();
|
|
70
|
-
await browserTabsUtil.closeAllTabsExceptCurrent();
|
|
71
|
-
await dashboard.stopAndRemoveWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName());
|
|
72
|
-
WorkspaceHandlingTests.clearWorkspaceName();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
65
|
suiteSetup('Login into Che', async function (): Promise<void> {
|
|
76
66
|
await loginTests.loginIntoChe();
|
|
77
67
|
});
|
|
78
68
|
|
|
69
|
+
async function clickOnElementByXpath(xpath: string): Promise<void> {
|
|
70
|
+
Logger.debug();
|
|
71
|
+
await driverHelper.waitAndClick(By.xpath(xpath));
|
|
72
|
+
}
|
|
73
|
+
|
|
79
74
|
async function testWorkspaceStartup(sampleNameOrUrl: string, isUrl: boolean): Promise<void> {
|
|
80
75
|
await dashboard.openDashboard();
|
|
76
|
+
await dashboard.clickCreateWorkspaceButton();
|
|
77
|
+
|
|
81
78
|
if (isUrl) {
|
|
82
79
|
await workspaceHandlingTests.createAndOpenWorkspaceWithSpecificEditorAndGitUrl(
|
|
83
80
|
vsCodeDesktopSshEditor,
|
|
@@ -92,6 +89,10 @@ suite('Check Visual Studio Code (desktop) (SSH) with all samples', function ():
|
|
|
92
89
|
);
|
|
93
90
|
}
|
|
94
91
|
|
|
92
|
+
const useExtensionPageText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(useExtensionPageId);
|
|
93
|
+
expect(useExtensionPageText).contains('Install the following VS Code extensions');
|
|
94
|
+
// toggle UseExtension switcher
|
|
95
|
+
await clickOnElementByXpath(useExtensionSwitcher);
|
|
95
96
|
// check title
|
|
96
97
|
const headerText: string = await workspaceHandlingTests.getTextFromUIElementByXpath(titlexPath);
|
|
97
98
|
expect('Workspace ' + WorkspaceHandlingTests.getWorkspaceName() + ' is running').equal(headerText);
|
|
@@ -109,35 +110,40 @@ suite('Check Visual Studio Code (desktop) (SSH) with all samples', function ():
|
|
|
109
110
|
.and.contains('Port')
|
|
110
111
|
.and.contains('IdentityFile')
|
|
111
112
|
.and.contains('UserKnownHostsFile');
|
|
112
|
-
|
|
113
|
-
await deleteWorkspace();
|
|
114
113
|
}
|
|
115
114
|
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
samplesForCheck.forEach((sampleName): void => {
|
|
116
|
+
test('Test start of VSCode (desktop) (SSH) with default Samples', async function (): Promise<void> {
|
|
118
117
|
await testWorkspaceStartup(sampleName, false);
|
|
119
|
-
}
|
|
118
|
+
});
|
|
120
119
|
});
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
if (BASE_TEST_CONSTANTS.IS_CLUSTER_DISCONNECTED()) {
|
|
122
|
+
Logger.info('Test cluster is disconnected. Using url for airgap cluster.');
|
|
123
|
+
gitRepoUrlsToCheckAirgap.forEach((url): void => {
|
|
124
|
+
test('Test start of VSCode (desktop) (SSH) with ubi', async function (): Promise<void> {
|
|
126
125
|
await testWorkspaceStartup(url, true);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
} else {
|
|
129
|
+
gitRepoUrlsToCheck.forEach((url): void => {
|
|
130
|
+
test('Test start of VSCode (desktop) (SSH) with ubi', async function (): Promise<void> {
|
|
130
131
|
await testWorkspaceStartup(url, true);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
teardown('Delete DevWorkspace', async function (): Promise<void> {
|
|
137
|
+
Logger.info('Delete DevWorkspace. After each test.');
|
|
134
138
|
|
|
135
|
-
suiteTeardown('Delete DevWorkspace', async function (): Promise<void> {
|
|
136
|
-
Logger.info('Deleting DevWorkspace... After all.');
|
|
137
139
|
await dashboard.openDashboard();
|
|
138
140
|
await browserTabsUtil.closeAllTabsExceptCurrent();
|
|
141
|
+
|
|
139
142
|
if (WorkspaceHandlingTests.getWorkspaceName() !== 'undefined') {
|
|
143
|
+
Logger.info('Workspace name is defined. Deleting workspace...');
|
|
140
144
|
await dashboard.deleteStoppedWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName());
|
|
141
145
|
}
|
|
146
|
+
|
|
147
|
+
WorkspaceHandlingTests.clearWorkspaceName();
|
|
142
148
|
});
|
|
143
149
|
});
|