@eclipse-che/che-e2e 7.70.0-dev-e748965 → 7.70.0-dev-6d2f86b
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/README.md +13 -4
- package/configs/inversify.config.ts +18 -15
- package/configs/inversify.types.ts +2 -1
- package/configs/mocharc.ts +12 -2
- package/configs/sh-scripts/generateIndex.sh +2 -3
- package/constants/APITestConstants.ts +56 -0
- package/constants/BaseTestConstants.ts +65 -0
- package/constants/ChromeDriverConstants.ts +46 -0
- package/constants/FactoryTestConstants.ts +45 -0
- package/constants/MonacoConstants.ts +22 -0
- package/constants/OAuthConstants.ts +56 -0
- package/constants/PluginsTestConstants.ts +15 -0
- package/constants/ReporterConstants.ts +45 -0
- package/constants/TimeoutConstants.ts +28 -146
- package/dist/configs/inversify.config.js +15 -11
- package/dist/configs/inversify.config.js.map +1 -1
- package/dist/configs/inversify.types.js +2 -1
- package/dist/configs/inversify.types.js.map +1 -1
- package/dist/configs/mocharc.js +11 -2
- package/dist/configs/mocharc.js.map +1 -1
- package/dist/constants/APITestConstants.js +54 -0
- package/dist/constants/APITestConstants.js.map +1 -0
- package/dist/constants/BaseTestConstants.js +61 -0
- package/dist/constants/BaseTestConstants.js.map +1 -0
- package/dist/constants/ChromeDriverConstants.js +44 -0
- package/dist/constants/ChromeDriverConstants.js.map +1 -0
- package/dist/constants/FactoryTestConstants.js +44 -0
- package/dist/constants/FactoryTestConstants.js.map +1 -0
- package/dist/constants/MonacoConstants.js +25 -0
- package/dist/constants/MonacoConstants.js.map +1 -0
- package/dist/constants/OAuthConstants.js +52 -0
- package/dist/constants/OAuthConstants.js.map +1 -0
- package/dist/constants/PluginsTestConstants.js +19 -0
- package/dist/constants/PluginsTestConstants.js.map +1 -0
- package/dist/constants/ReporterConstants.js +43 -0
- package/dist/constants/ReporterConstants.js.map +1 -0
- package/dist/constants/TimeoutConstants.js +22 -113
- package/dist/constants/TimeoutConstants.js.map +1 -1
- package/dist/driver/ChromeDriver.js +7 -7
- package/dist/driver/ChromeDriver.js.map +1 -1
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +2 -2
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +7 -6
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +3 -4
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +2 -3
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/git-providers/OauthPage.js +12 -19
- package/dist/pageobjects/git-providers/OauthPage.js.map +1 -1
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js +2 -2
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js.map +1 -1
- package/dist/pageobjects/login/interfaces/ICheLoginPage.js.map +1 -0
- package/dist/pageobjects/login/interfaces/IOcpLoginPage.js.map +1 -0
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js +68 -0
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js.map +1 -0
- package/dist/pageobjects/{openshift/CheLoginPage.js → login/kubernetes/KubernetesLoginPage.js} +21 -26
- package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js.map +1 -0
- package/dist/pageobjects/{openshift → login/openshift}/OcpLoginPage.js +7 -7
- package/dist/pageobjects/login/openshift/OcpLoginPage.js.map +1 -0
- package/dist/pageobjects/login/{OcpRedHatLoginPage.js → openshift/OcpRedHatLoginPage.js} +5 -5
- package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js.map +1 -0
- package/dist/pageobjects/login/{OcpUserLoginPage.js → openshift/OcpUserLoginPage.js} +7 -7
- package/dist/pageobjects/login/openshift/OcpUserLoginPage.js.map +1 -0
- package/dist/pageobjects/login/{RedHatLoginPage.js → openshift/RedHatLoginPage.js} +6 -6
- package/dist/pageobjects/login/openshift/RedHatLoginPage.js.map +1 -0
- package/dist/pageobjects/login/{RegularUserOcpCheLoginPage.js → openshift/RegularUserOcpCheLoginPage.js} +8 -8
- package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js.map +1 -0
- package/dist/specs/MochaHooks.js +9 -7
- package/dist/specs/MochaHooks.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +2 -2
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js +4 -3
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js +7 -2
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/RecomendedExtentions.spec.js +4 -3
- package/dist/specs/dashboard-samples/RecomendedExtentions.spec.js.map +1 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +2 -2
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
- package/dist/specs/factory/Factory.spec.js +12 -10
- package/dist/specs/factory/Factory.spec.js.map +1 -1
- package/dist/specs/factory/NoSetupRepoFactory.spec.js +16 -14
- package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
- package/dist/specs/factory/RefusedOAuthFactory.spec.js +17 -15
- package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
- package/dist/tests-library/LoginTests.js +4 -4
- package/dist/tests-library/LoginTests.js.map +1 -1
- package/dist/tests-library/WorkspaceHandlingTests.js +1 -2
- package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -1
- package/dist/utils/BrowserTabsUtil.js +2 -2
- package/dist/utils/BrowserTabsUtil.js.map +1 -1
- package/dist/utils/CheReporter.js +31 -27
- package/dist/utils/CheReporter.js.map +1 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js +7 -7
- package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
- package/dist/utils/DevfilesRegistryHelper.js +9 -9
- package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
- package/dist/utils/DriverHelper.js +16 -17
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/KubernetesCommandLineToolsExecutor.js +13 -11
- package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
- package/dist/utils/Logger.js +11 -11
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ScreenCatcher.js +5 -5
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/request-handlers/CheApiRequestHandler.js +2 -2
- package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js +4 -2
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
- package/dist/utils/workspace/TestWorkspaceUtil.js +3 -3
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/driver/ChromeDriver.ts +7 -7
- package/index.ts +19 -10
- package/package.json +1 -1
- package/pageobjects/dashboard/CreateWorkspace.ts +2 -2
- package/pageobjects/dashboard/Dashboard.ts +7 -6
- package/pageobjects/dashboard/Workspaces.ts +3 -4
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +2 -3
- package/pageobjects/git-providers/OauthPage.ts +8 -16
- package/pageobjects/ide/CheCodeLocatorLoader.ts +2 -2
- package/pageobjects/login/kubernetes/DexLoginPage.ts +58 -0
- package/pageobjects/login/kubernetes/KubernetesLoginPage.ts +33 -0
- package/pageobjects/{openshift → login/openshift}/OcpLoginPage.ts +7 -7
- package/pageobjects/login/{OcpRedHatLoginPage.ts → openshift/OcpRedHatLoginPage.ts} +6 -6
- package/pageobjects/login/{OcpUserLoginPage.ts → openshift/OcpUserLoginPage.ts} +8 -8
- package/pageobjects/login/{RedHatLoginPage.ts → openshift/RedHatLoginPage.ts} +6 -6
- package/pageobjects/login/{RegularUserOcpCheLoginPage.ts → openshift/RegularUserOcpCheLoginPage.ts} +9 -9
- package/specs/MochaHooks.ts +9 -7
- package/specs/SmokeTest.spec.ts +2 -2
- package/specs/api/EmptyWorkspaceAPI.spec.ts +4 -3
- package/specs/dashboard-samples/EmptyWorkspace.spec.ts +10 -2
- package/specs/dashboard-samples/RecomendedExtentions.spec.ts +4 -3
- package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +2 -2
- package/specs/factory/Factory.spec.ts +12 -10
- package/specs/factory/NoSetupRepoFactory.spec.ts +16 -14
- package/specs/factory/RefusedOAuthFactory.spec.ts +17 -15
- package/tests-library/LoginTests.ts +6 -6
- package/tests-library/WorkspaceHandlingTests.ts +1 -2
- package/utils/BrowserTabsUtil.ts +2 -2
- package/utils/CheReporter.ts +32 -28
- package/utils/DevWorkspaceConfigurationHelper.ts +7 -7
- package/utils/DevfilesRegistryHelper.ts +3 -3
- package/utils/DriverHelper.ts +20 -21
- package/utils/KubernetesCommandLineToolsExecutor.ts +11 -9
- package/utils/Logger.ts +11 -12
- package/utils/ScreenCatcher.ts +5 -5
- package/utils/request-handlers/CheApiRequestHandler.ts +2 -2
- package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +4 -2
- package/utils/workspace/TestWorkspaceUtil.ts +3 -3
- package/constants/TestConstants.ts +0 -255
- package/dist/constants/TestConstants.js +0 -206
- package/dist/constants/TestConstants.js.map +0 -1
- package/dist/pageobjects/login/ICheLoginPage.js.map +0 -1
- package/dist/pageobjects/login/IOcpLoginPage.js.map +0 -1
- package/dist/pageobjects/login/OcpRedHatLoginPage.js.map +0 -1
- package/dist/pageobjects/login/OcpUserLoginPage.js.map +0 -1
- package/dist/pageobjects/login/RedHatLoginPage.js.map +0 -1
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js.map +0 -1
- package/dist/pageobjects/openshift/CheLoginPage.js.map +0 -1
- package/dist/pageobjects/openshift/OcpLoginPage.js.map +0 -1
- package/pageobjects/openshift/CheLoginPage.ts +0 -42
- /package/dist/pageobjects/login/{ICheLoginPage.js → interfaces/ICheLoginPage.js} +0 -0
- /package/dist/pageobjects/login/{IOcpLoginPage.js → interfaces/IOcpLoginPage.js} +0 -0
- /package/pageobjects/login/{ICheLoginPage.ts → interfaces/ICheLoginPage.ts} +0 -0
- /package/pageobjects/login/{IOcpLoginPage.ts → interfaces/IOcpLoginPage.ts} +0 -0
package/utils/DriverHelper.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { inject, injectable } from 'inversify';
|
|
|
12
12
|
import { TYPES } from '../configs/inversify.types';
|
|
13
13
|
import { Actions, By, error, ThenableWebDriver, until, WebElement } from 'selenium-webdriver';
|
|
14
14
|
import 'reflect-metadata';
|
|
15
|
-
import { TestConstants } from '../constants/TestConstants';
|
|
16
15
|
import { Logger } from './Logger';
|
|
17
16
|
import { TimeoutConstants } from '../constants/TimeoutConstants';
|
|
18
17
|
|
|
@@ -55,8 +54,8 @@ export class DriverHelper {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
async waitVisibilityBoolean(locator: By,
|
|
58
|
-
attempts: number =
|
|
59
|
-
polling: number =
|
|
57
|
+
attempts: number = TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
58
|
+
polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING): Promise<boolean> {
|
|
60
59
|
|
|
61
60
|
Logger.trace(`DriverHelper.waitVisibilityBoolean ${locator}`);
|
|
62
61
|
|
|
@@ -74,8 +73,8 @@ export class DriverHelper {
|
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
async waitDisappearanceBoolean(locator: By,
|
|
77
|
-
attempts: number =
|
|
78
|
-
polling: number =
|
|
76
|
+
attempts: number = TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
77
|
+
polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING): Promise<boolean> {
|
|
79
78
|
|
|
80
79
|
Logger.trace(`DriverHelper.waitDisappearanceBoolean ${locator}`);
|
|
81
80
|
|
|
@@ -93,7 +92,7 @@ export class DriverHelper {
|
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
async waitVisibility(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<WebElement> {
|
|
96
|
-
const polling: number =
|
|
95
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
97
96
|
const attempts: number = Math.ceil(timeout / polling);
|
|
98
97
|
|
|
99
98
|
Logger.trace(`DriverHelper.waitVisibility ${elementLocator}`);
|
|
@@ -151,7 +150,7 @@ export class DriverHelper {
|
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
async waitPresence(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<WebElement> {
|
|
154
|
-
const polling: number =
|
|
153
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
155
154
|
const attempts: number = Math.ceil(timeout / polling);
|
|
156
155
|
|
|
157
156
|
Logger.trace(`DriverHelper.waitPresence ${elementLocator}`);
|
|
@@ -179,7 +178,7 @@ export class DriverHelper {
|
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
async waitAllPresence(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<Array<WebElement>> {
|
|
182
|
-
const polling: number =
|
|
181
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
183
182
|
const attempts: number = Math.ceil(timeout / polling);
|
|
184
183
|
|
|
185
184
|
Logger.trace(`DriverHelper.waitAllPresence ${elementLocator}`);
|
|
@@ -215,8 +214,8 @@ export class DriverHelper {
|
|
|
215
214
|
}
|
|
216
215
|
|
|
217
216
|
async waitDisappearance(elementLocator: By,
|
|
218
|
-
attempts: number =
|
|
219
|
-
polling: number =
|
|
217
|
+
attempts: number = TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
218
|
+
polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING): Promise<void> {
|
|
220
219
|
|
|
221
220
|
Logger.trace(`DriverHelper.waitDisappearance ${elementLocator}`);
|
|
222
221
|
|
|
@@ -240,8 +239,8 @@ export class DriverHelper {
|
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
async waitAllDisappearance(locators: Array<By>,
|
|
243
|
-
attemptsPerLocator: number =
|
|
244
|
-
pollingPerLocator: number =
|
|
242
|
+
attemptsPerLocator: number = TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
243
|
+
pollingPerLocator: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING): Promise<void> {
|
|
245
244
|
|
|
246
245
|
Logger.trace(`DriverHelper.waitAllDisappearance ${locators}`);
|
|
247
246
|
|
|
@@ -251,7 +250,7 @@ export class DriverHelper {
|
|
|
251
250
|
}
|
|
252
251
|
|
|
253
252
|
async waitAndClick(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
254
|
-
const polling: number =
|
|
253
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
255
254
|
const attempts: number = Math.ceil(timeout / polling);
|
|
256
255
|
|
|
257
256
|
Logger.trace(`DriverHelper.waitAndClick ${elementLocator}`);
|
|
@@ -310,7 +309,7 @@ export class DriverHelper {
|
|
|
310
309
|
|
|
311
310
|
async waitAndGetElementAttribute(elementLocator: By, attribute: string,
|
|
312
311
|
timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<string> {
|
|
313
|
-
const polling: number =
|
|
312
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
314
313
|
const attempts: number = Math.ceil(timeout / polling);
|
|
315
314
|
|
|
316
315
|
Logger.trace(`DriverHelper.waitAndGetElementAttribute ${elementLocator} attribute: '${attribute}'`);
|
|
@@ -352,7 +351,7 @@ export class DriverHelper {
|
|
|
352
351
|
|
|
353
352
|
async waitAndGetCssValue(elementLocator: By, cssAttribute: string,
|
|
354
353
|
timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<string> {
|
|
355
|
-
const polling: number =
|
|
354
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
356
355
|
const attempts: number = Math.ceil(timeout / polling);
|
|
357
356
|
|
|
358
357
|
Logger.trace(`DriverHelper.waitAndGetCssValue ${elementLocator} cssAttribute: ${cssAttribute}`);
|
|
@@ -409,7 +408,7 @@ export class DriverHelper {
|
|
|
409
408
|
}
|
|
410
409
|
|
|
411
410
|
async type(elementLocator: By, text: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
412
|
-
const polling: number =
|
|
411
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
413
412
|
const attempts: number = Math.ceil(timeout / polling);
|
|
414
413
|
|
|
415
414
|
if (elementLocator.toString().toLocaleLowerCase().includes('password')) {
|
|
@@ -455,7 +454,7 @@ export class DriverHelper {
|
|
|
455
454
|
}
|
|
456
455
|
|
|
457
456
|
async typeToInvisible(elementLocator: By, text: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
458
|
-
const polling: number =
|
|
457
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
459
458
|
const attempts: number = Math.ceil(timeout / polling);
|
|
460
459
|
|
|
461
460
|
Logger.trace(`DriverHelper.typeToInvisible ${elementLocator} text: ${text}`);
|
|
@@ -497,7 +496,7 @@ export class DriverHelper {
|
|
|
497
496
|
}
|
|
498
497
|
|
|
499
498
|
async clear(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
500
|
-
const polling: number =
|
|
499
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
501
500
|
const attempts: number = Math.ceil(timeout / polling);
|
|
502
501
|
|
|
503
502
|
Logger.trace(`DriverHelper.clear ${elementLocator}`);
|
|
@@ -539,7 +538,7 @@ export class DriverHelper {
|
|
|
539
538
|
}
|
|
540
539
|
|
|
541
540
|
async clearInvisible(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
542
|
-
const polling: number =
|
|
541
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
543
542
|
const attempts: number = Math.ceil(timeout / polling);
|
|
544
543
|
|
|
545
544
|
Logger.trace(`DriverHelper.clearInvisible ${elementLocator}`);
|
|
@@ -601,7 +600,7 @@ export class DriverHelper {
|
|
|
601
600
|
}
|
|
602
601
|
|
|
603
602
|
async waitAndGetText(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<string> {
|
|
604
|
-
const polling: number =
|
|
603
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
605
604
|
const attempts: number = Math.ceil(timeout / polling);
|
|
606
605
|
|
|
607
606
|
Logger.trace(`DriverHelper.waitAndGetText ${elementLocator}`);
|
|
@@ -654,7 +653,7 @@ export class DriverHelper {
|
|
|
654
653
|
}
|
|
655
654
|
|
|
656
655
|
async scrollTo(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> {
|
|
657
|
-
const polling: number =
|
|
656
|
+
const polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
658
657
|
const attempts: number = Math.ceil(timeout / polling);
|
|
659
658
|
|
|
660
659
|
Logger.trace(`DriverHelper.scrollTo ${elementLocator}`);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { echo, exec, ShellString } from 'shelljs';
|
|
2
|
-
import { KubernetesCommandLineTool, TestConstants } from '../constants/TestConstants';
|
|
3
2
|
import { Logger } from './Logger';
|
|
4
3
|
import { ShellExecutor } from './ShellExecutor';
|
|
5
4
|
import * as path from 'path';
|
|
5
|
+
import { APITestConstants, KubernetesCommandLineTool } from '../constants/APITestConstants';
|
|
6
|
+
import { BaseTestConstants } from '../constants/BaseTestConstants';
|
|
7
|
+
import { OAuthConstants } from '../constants/OAuthConstants';
|
|
6
8
|
|
|
7
9
|
export class KubernetesCommandLineToolsExecutor extends ShellExecutor {
|
|
8
10
|
private static container: string;
|
|
9
11
|
private static pod: string;
|
|
10
12
|
private readonly namespace: string;
|
|
11
13
|
private readonly workspaceName: string | undefined;
|
|
12
|
-
private readonly KUBERNETES_COMMAND_LINE_TOOL: string =
|
|
14
|
+
private readonly KUBERNETES_COMMAND_LINE_TOOL: string = APITestConstants.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL;
|
|
13
15
|
|
|
14
16
|
constructor(_workspaceName?: string, _namespace?: string) {
|
|
15
17
|
super();
|
|
@@ -33,8 +35,8 @@ export class KubernetesCommandLineToolsExecutor extends ShellExecutor {
|
|
|
33
35
|
if (this.isUserLoggedIn()) {
|
|
34
36
|
Logger.debug(`${this.getLoggingName(this.loginToOcp.name)}: User already logged`);
|
|
35
37
|
} else {
|
|
36
|
-
Logger.debug(`${this.getLoggingName(this.loginToOcp.name)}: Login ${url}, ${
|
|
37
|
-
exec(`oc login --server=${url} -u=${
|
|
38
|
+
Logger.debug(`${this.getLoggingName(this.loginToOcp.name)}: Login ${url}, ${APITestConstants.TS_SELENIUM_OCP_USERNAME}`);
|
|
39
|
+
exec(`oc login --server=${url} -u=${APITestConstants.TS_SELENIUM_OCP_USERNAME} -p=${APITestConstants.TS_SELENIUM_OCP_PASSWORD} --insecure-skip-tls-verify`);
|
|
38
40
|
}
|
|
39
41
|
} else {
|
|
40
42
|
Logger.debug(`${this.getLoggingName(this.loginToOcp.name)}: doesn't support login command`);
|
|
@@ -58,7 +60,7 @@ export class KubernetesCommandLineToolsExecutor extends ShellExecutor {
|
|
|
58
60
|
Logger.debug(`${this.getLoggingName(this.deleteDevWorkspace.name)}: Delete '${this.workspaceName}' workspace`);
|
|
59
61
|
ShellExecutor.execWithLog(`${(this.KUBERNETES_COMMAND_LINE_TOOL)} patch dw ${this.workspaceName} -n ${this.namespace} -p '{ "metadata": { "finalizers": null }}' --type merge || true`);
|
|
60
62
|
ShellExecutor.execWithLog(`${(this.KUBERNETES_COMMAND_LINE_TOOL)} delete dw ${this.workspaceName} -n ${this.namespace} || true`);
|
|
61
|
-
ShellExecutor.execWithLog(`${(this.KUBERNETES_COMMAND_LINE_TOOL)} delete dwt ${
|
|
63
|
+
ShellExecutor.execWithLog(`${(this.KUBERNETES_COMMAND_LINE_TOOL)} delete dwt ${APITestConstants.TS_SELENIUM_EDITOR}-${this.workspaceName} -n ${this.namespace} || true`);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
applyAndWaitDevWorkspace(yamlConfiguration: string): ShellString {
|
|
@@ -121,7 +123,7 @@ export class KubernetesCommandLineToolsExecutor extends ShellExecutor {
|
|
|
121
123
|
private isUserLoggedIn(): boolean {
|
|
122
124
|
const whoamiCommandOutput: ShellString = ShellExecutor.execWithLog('oc whoami && oc whoami --show-server=true');
|
|
123
125
|
|
|
124
|
-
return whoamiCommandOutput.stdout.includes(
|
|
126
|
+
return whoamiCommandOutput.stdout.includes(OAuthConstants.TS_SELENIUM_OCP_USERNAME) && whoamiCommandOutput.stdout.includes(this.getServerUrl());
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
private getLoggingName(methodName: string): string {
|
|
@@ -130,15 +132,15 @@ export class KubernetesCommandLineToolsExecutor extends ShellExecutor {
|
|
|
130
132
|
|
|
131
133
|
private setNamespace(_namespace: string | undefined): string {
|
|
132
134
|
_namespace = _namespace !== undefined ? _namespace
|
|
133
|
-
:
|
|
134
|
-
:
|
|
135
|
+
: BaseTestConstants.TS_SELENIUM_BASE_URL.includes('devspaces') ? OAuthConstants.TS_SELENIUM_OCP_USERNAME + '-devspaces'
|
|
136
|
+
: BaseTestConstants.TS_SELENIUM_BASE_URL.includes('che') ? OAuthConstants.TS_SELENIUM_OCP_USERNAME + '-che'
|
|
135
137
|
: 'default';
|
|
136
138
|
return _namespace;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
private getServerUrl(): string {
|
|
140
142
|
Logger.debug(`${this.getLoggingName(this.getServerUrl.name)}: Get server api url.`);
|
|
141
|
-
return
|
|
143
|
+
return BaseTestConstants.TS_SELENIUM_BASE_URL.replace('devspaces.apps', 'api') + ':6443';
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
|
package/utils/Logger.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { TestConstants } from '../constants/TestConstants';
|
|
2
|
-
|
|
3
1
|
/*********************************************************************
|
|
4
2
|
* Copyright (c) 2019-2023 Red Hat, Inc.
|
|
5
3
|
*
|
|
@@ -9,6 +7,7 @@ import { TestConstants } from '../constants/TestConstants';
|
|
|
9
7
|
*
|
|
10
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
11
9
|
**********************************************************************/
|
|
10
|
+
import { ReporterConstants } from '../constants/ReporterConstants';
|
|
12
11
|
|
|
13
12
|
export abstract class Logger {
|
|
14
13
|
|
|
@@ -27,7 +26,7 @@ export abstract class Logger {
|
|
|
27
26
|
* @param indentLevel log level
|
|
28
27
|
*/
|
|
29
28
|
static warn(text: string, indentLevel: number = 1): void {
|
|
30
|
-
if (
|
|
29
|
+
if (ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR') {
|
|
31
30
|
return;
|
|
32
31
|
}
|
|
33
32
|
this.logText(indentLevel, `[WARN] ${text}`);
|
|
@@ -39,8 +38,8 @@ export abstract class Logger {
|
|
|
39
38
|
* @param indentLevel log level
|
|
40
39
|
*/
|
|
41
40
|
static info(text: string, indentLevel: number = 3): void {
|
|
42
|
-
if (
|
|
43
|
-
|
|
41
|
+
if (ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
|
|
42
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'WARN') {
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
45
|
this.logText(indentLevel, `• ${text}`);
|
|
@@ -52,9 +51,9 @@ export abstract class Logger {
|
|
|
52
51
|
* @param indentLevel log level
|
|
53
52
|
*/
|
|
54
53
|
static debug(text: string, indentLevel: number = 5): void {
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
if (ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
|
|
55
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'WARN' ||
|
|
56
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'INFO') {
|
|
58
57
|
return;
|
|
59
58
|
}
|
|
60
59
|
this.logText(indentLevel, `▼ ${text}`);
|
|
@@ -67,10 +66,10 @@ export abstract class Logger {
|
|
|
67
66
|
* @param indentLevel log level
|
|
68
67
|
*/
|
|
69
68
|
static trace(text: string, indentLevel: number = 6): void {
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
if (ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
|
|
70
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'WARN' ||
|
|
71
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'INFO' ||
|
|
72
|
+
ReporterConstants.TS_SELENIUM_LOG_LEVEL === 'DEBUG') {
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
75
|
this.logText(indentLevel, `‣ ${text}`);
|
package/utils/ScreenCatcher.ts
CHANGED
|
@@ -12,22 +12,22 @@ import { injectable, inject } from 'inversify';
|
|
|
12
12
|
import { CLASSES } from '../configs/inversify.types';
|
|
13
13
|
import { DriverHelper } from './DriverHelper';
|
|
14
14
|
import { error } from 'selenium-webdriver';
|
|
15
|
-
import { TestConstants } from '../constants/TestConstants';
|
|
16
15
|
import { WriteStream } from 'fs';
|
|
17
16
|
import { StringUtil } from './StringUtil';
|
|
17
|
+
import { ReporterConstants } from '../constants/ReporterConstants';
|
|
18
18
|
|
|
19
19
|
@injectable()
|
|
20
20
|
export class ScreenCatcher {
|
|
21
21
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
22
22
|
|
|
23
23
|
async catchMethodScreen(methodName: string, methodIndex: number, screenshotIndex: number): Promise<void> {
|
|
24
|
-
const executionScreenCastDir: string = `${
|
|
25
|
-
const executionScreenCastErrorsDir: string = `${
|
|
24
|
+
const executionScreenCastDir: string = `${ReporterConstants.TS_SELENIUM_REPORT_FOLDER}/executionScreencast`;
|
|
25
|
+
const executionScreenCastErrorsDir: string = `${ReporterConstants.TS_SELENIUM_REPORT_FOLDER}/executionScreencastErrors`;
|
|
26
26
|
const formattedMethodIndex: string = new Intl.NumberFormat('en-us', { minimumIntegerDigits: 3 }).format(methodIndex);
|
|
27
27
|
const formattedScreenshotIndex: string = new Intl.NumberFormat('en-us', { minimumIntegerDigits: 5 }).format(screenshotIndex).replace(/,/g, '');
|
|
28
28
|
|
|
29
|
-
if (!fs.existsSync(
|
|
30
|
-
fs.mkdirSync(
|
|
29
|
+
if (!fs.existsSync(ReporterConstants.TS_SELENIUM_REPORT_FOLDER)) {
|
|
30
|
+
fs.mkdirSync(ReporterConstants.TS_SELENIUM_REPORT_FOLDER);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
if (!fs.existsSync(executionScreenCastDir)) {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
11
|
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios';
|
|
12
|
-
import { TestConstants } from '../../constants/TestConstants';
|
|
13
12
|
import { TYPES } from '../../configs/inversify.types';
|
|
14
13
|
import { inject, injectable } from 'inversify';
|
|
15
14
|
import { IAuthorizationHeaderHandler } from './headers/IAuthorizationHeaderHandler';
|
|
16
15
|
import { Logger } from '../Logger';
|
|
16
|
+
import { BaseTestConstants } from '../../constants/BaseTestConstants';
|
|
17
17
|
|
|
18
18
|
@injectable()
|
|
19
19
|
export class CheApiRequestHandler {
|
|
@@ -104,7 +104,7 @@ export class CheApiRequestHandler {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
private assembleUrl(relativeUrl: string): string {
|
|
107
|
-
return `${
|
|
107
|
+
return `${BaseTestConstants.TS_SELENIUM_BASE_URL}/${relativeUrl}`;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
}
|
|
@@ -14,16 +14,18 @@ import { DriverHelper } from '../../DriverHelper';
|
|
|
14
14
|
import { CLASSES } from '../../../configs/inversify.types';
|
|
15
15
|
import { Logger } from '../../Logger';
|
|
16
16
|
import { IWebDriverCookie } from 'selenium-webdriver';
|
|
17
|
+
import { BaseTestConstants, Platform } from '../../../constants/BaseTestConstants';
|
|
17
18
|
|
|
18
19
|
@injectable()
|
|
19
20
|
export class CheMultiuserAuthorizationHeaderHandler implements IAuthorizationHeaderHandler {
|
|
20
21
|
private authorizationToken: string = '';
|
|
22
|
+
private readonly cookiesType: string = BaseTestConstants.TS_PLATFORM === Platform.OPENSHIFT ? '_oauth_proxy' : '_oauth2_proxy';
|
|
21
23
|
|
|
22
24
|
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
23
25
|
|
|
24
26
|
async get(): Promise<AxiosRequestConfig> {
|
|
25
27
|
try {
|
|
26
|
-
let token: IWebDriverCookie = await this.driverHelper.getDriver().manage().getCookie(
|
|
28
|
+
let token: IWebDriverCookie = await this.driverHelper.getDriver().manage().getCookie(this.cookiesType);
|
|
27
29
|
if (this.authorizationToken !== token.value) {
|
|
28
30
|
this.authorizationToken = token.value;
|
|
29
31
|
}
|
|
@@ -35,6 +37,6 @@ export class CheMultiuserAuthorizationHeaderHandler implements IAuthorizationHea
|
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
return { headers: { 'cookie':
|
|
40
|
+
return { headers: { 'cookie': `${this.cookiesType}=${this.authorizationToken}` } };
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
11
|
import 'reflect-metadata';
|
|
12
|
-
import { TestConstants } from '../../constants/TestConstants';
|
|
13
12
|
import { injectable, inject } from 'inversify';
|
|
14
13
|
import { DriverHelper } from '../DriverHelper';
|
|
15
14
|
import { WorkspaceStatus } from './WorkspaceStatus';
|
|
@@ -20,11 +19,12 @@ import { Logger } from '../Logger';
|
|
|
20
19
|
import axios, { AxiosResponse } from 'axios';
|
|
21
20
|
import { ITestWorkspaceUtil } from './ITestWorkspaceUtil';
|
|
22
21
|
import { ApiUrlResolver } from './ApiUrlResolver';
|
|
22
|
+
import { TimeoutConstants } from '../../constants/TimeoutConstants';
|
|
23
23
|
|
|
24
24
|
@injectable()
|
|
25
25
|
export class TestWorkspaceUtil implements ITestWorkspaceUtil {
|
|
26
|
-
readonly attempts: number =
|
|
27
|
-
readonly polling: number =
|
|
26
|
+
readonly attempts: number = TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS;
|
|
27
|
+
readonly polling: number = TimeoutConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
28
28
|
|
|
29
29
|
constructor(
|
|
30
30
|
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019-2023 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
export enum GitProviderType {
|
|
11
|
-
GITHUB = 'github',
|
|
12
|
-
GITLAB = 'gitlab',
|
|
13
|
-
BITBUCKET = 'bitbucket'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export enum KubernetesCommandLineTool {
|
|
18
|
-
OC = 'oc',
|
|
19
|
-
KUBECTL = 'kubectl',
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const SupportedDevfilesRegistries: any = {
|
|
23
|
-
INBUILT_APPLICATION_DEVFILE_REGISTRY_URL: () => `${TestConstants.TS_SELENIUM_BASE_URL}/devfile-registry/devfiles/`,
|
|
24
|
-
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: `https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/`,
|
|
25
|
-
};
|
|
26
|
-
export const TestConstants: any = {
|
|
27
|
-
/**
|
|
28
|
-
* Base URL of the application which should be checked
|
|
29
|
-
*/
|
|
30
|
-
TS_SELENIUM_BASE_URL: !process.env.TS_SELENIUM_BASE_URL ? 'http://sample-url' : process.env.TS_SELENIUM_BASE_URL.replace(/\/$/, ''),
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Run browser in "Headless" (hidden) mode, "false" by default.
|
|
34
|
-
*/
|
|
35
|
-
TS_SELENIUM_HEADLESS: process.env.TS_SELENIUM_HEADLESS === 'true',
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Create instance of chromedriver, "true" by default. Should be "false" to run only API tests.
|
|
39
|
-
*/
|
|
40
|
-
TS_USE_WEB_DRIVER_FOR_TEST: process.env.TS_USE_WEB_DRIVER_FOR_TEST !== 'false',
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Run browser in "Fullscreen" (kiosk) mode.
|
|
44
|
-
* Default to true if undefined
|
|
45
|
-
*/
|
|
46
|
-
TS_SELENIUM_LAUNCH_FULLSCREEN: (process.env.TS_SELENIUM_LAUNCH_FULLSCREEN !== 'false'),
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Run browser with an enabled or disabled W3C protocol (on Chrome 76 and upper, it is enabled by default), "true" by default.
|
|
50
|
-
*/
|
|
51
|
-
TS_SELENIUM_W3C_CHROME_OPTION: process.env.TS_SELENIUM_W3C_CHROME_OPTION !== 'false',
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Browser width resolution, "1920" by default.
|
|
55
|
-
*/
|
|
56
|
-
TS_SELENIUM_RESOLUTION_WIDTH: Number(process.env.TS_SELENIUM_RESOLUTION_WIDTH) || 1920,
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Browser height resolution, "1080" by default.
|
|
60
|
-
*/
|
|
61
|
-
TS_SELENIUM_RESOLUTION_HEIGHT: Number(process.env.TS_SELENIUM_RESOLUTION_HEIGHT) || 1080,
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Editor the tests are running against, "code" by default.
|
|
65
|
-
* Possible values: "che-code"
|
|
66
|
-
*/
|
|
67
|
-
TS_SELENIUM_EDITOR: process.env.TS_SELENIUM_EDITOR || 'che-code',
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Base version of VSCode editor for monaco-page-objects, "1.37.0" by default.
|
|
71
|
-
*/
|
|
72
|
-
TS_SELENIUM_MONACO_PAGE_OBJECTS_BASE_VERSION: process.env.TS_SELENIUM_MONACO_PAGE_OBJECTS_BASE_VERSION || '1.37.0',
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Latest compatible version to be used, based on versions available in
|
|
76
|
-
* https://github.com/redhat-developer/vscode-extension-tester/tree/master/locators/lib ,
|
|
77
|
-
* "1.73.0" by default.
|
|
78
|
-
*/
|
|
79
|
-
TS_SELENIUM_MONACO_PAGE_OBJECTS_USE_VERSION: process.env.TS_SELENIUM_MONACO_PAGE_OBJECTS_USE_VERSION || '1.73.0',
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Default amount of tries, "5" by default.
|
|
83
|
-
*/
|
|
84
|
-
TS_SELENIUM_DEFAULT_ATTEMPTS: Number(process.env.TS_SELENIUM_DEFAULT_ATTEMPTS) || 5,
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Default delay in milliseconds between tries, "1000" by default.
|
|
88
|
-
*/
|
|
89
|
-
TS_SELENIUM_DEFAULT_POLLING: Number(process.env.TS_SELENIUM_DEFAULT_POLLING) || 1000,
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Amount of tries for checking workspace status.
|
|
93
|
-
*/
|
|
94
|
-
TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS: Number(process.env.TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS) || 90,
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Delay in milliseconds between checking workspace status tries.
|
|
98
|
-
*/
|
|
99
|
-
TS_SELENIUM_WORKSPACE_STATUS_POLLING: Number(process.env.TS_SELENIUM_WORKSPACE_STATUS_POLLING) || 10000,
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Name of workspace created for 'Happy Path' scenario validation.
|
|
103
|
-
*/
|
|
104
|
-
TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME: process.env.TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME || 'EmptyWorkspace',
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Value of OpenShift oAuth property determines how to login in installed application,
|
|
108
|
-
* if 'false' as an user of application, if 'true' as a regular user of OCP.
|
|
109
|
-
*/
|
|
110
|
-
TS_SELENIUM_VALUE_OPENSHIFT_OAUTH: process.env.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH === 'true',
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Log into OCP by using appropriate provider title.
|
|
114
|
-
*/
|
|
115
|
-
TS_OCP_LOGIN_PAGE_PROVIDER_TITLE: process.env.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE || '',
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Path to folder with load tests execution report.
|
|
119
|
-
*/
|
|
120
|
-
TS_SELENIUM_LOAD_TEST_REPORT_FOLDER: process.env.TS_SELENIUM_LOAD_TEST_REPORT_FOLDER || './load-test-folder',
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Regular username used to login in OCP.
|
|
124
|
-
*/
|
|
125
|
-
TS_SELENIUM_OCP_USERNAME: process.env.TS_SELENIUM_OCP_USERNAME || '',
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Password regular user used to login in OCP.
|
|
129
|
-
*/
|
|
130
|
-
TS_SELENIUM_OCP_PASSWORD: process.env.TS_SELENIUM_OCP_PASSWORD || '',
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Delay between screenshots catching in the milliseconds for the execution screencast.
|
|
134
|
-
*/
|
|
135
|
-
TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS: Number(process.env.TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS) || 1000,
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Path to folder with tests execution report.
|
|
139
|
-
*/
|
|
140
|
-
TS_SELENIUM_REPORT_FOLDER: process.env.TS_SELENIUM_REPORT_FOLDER || './report',
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Enable or disable storing of execution screencast, "false" by default.
|
|
144
|
-
*/
|
|
145
|
-
TS_SELENIUM_EXECUTION_SCREENCAST: process.env.TS_SELENIUM_EXECUTION_SCREENCAST === 'true',
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Delete screencast after execution if all tests passed, "true" by default.
|
|
149
|
-
*/
|
|
150
|
-
DELETE_SCREENCAST_IF_TEST_PASS: process.env.DELETE_SCREENCAST_IF_TEST_PASS !== 'false',
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Remote driver URL.
|
|
154
|
-
*/
|
|
155
|
-
TS_SELENIUM_REMOTE_DRIVER_URL: process.env.TS_SELENIUM_REMOTE_DRIVER_URL || '',
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Stop and remove workspace if a test fails.
|
|
159
|
-
*/
|
|
160
|
-
DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Log level settings, possible variants: 'INFO' (by default), 'DEBUG', 'TRACE'.
|
|
164
|
-
*/
|
|
165
|
-
TS_SELENIUM_LOG_LEVEL: process.env.TS_SELENIUM_LOG_LEVEL || 'INFO',
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Enable Axios request interceptor, false by default
|
|
169
|
-
*/
|
|
170
|
-
TS_SELENIUM_REQUEST_INTERCEPTOR: process.env.TS_SELENIUM_REQUEST_INTERCEPTOR === 'true',
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Enable Axios response interceptor, false by default
|
|
174
|
-
*/
|
|
175
|
-
TS_SELENIUM_RESPONSE_INTERCEPTOR: process.env.TS_SELENIUM_RESPONSE_INTERCEPTOR === 'true',
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Running test suite - possible variants can be found in package.json scripts part.
|
|
179
|
-
*/
|
|
180
|
-
TEST_SUITE: process.env.TEST_SUITE || 'userstory',
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Print all timeout variables when tests launch, default to false
|
|
184
|
-
*/
|
|
185
|
-
TS_SELENIUM_PRINT_TIMEOUT_VARIABLES: process.env.TS_SELENIUM_PRINT_TIMEOUT_VARIABLES || false,
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* URL of the workspace created by devworkspace-controller
|
|
189
|
-
*/
|
|
190
|
-
TS_SELENIUM_DEVWORKSPACE_URL: process.env.TS_SELENIUM_DEVWORKSPACE_URL,
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* This variable specifies that run test is used for load testing and that all artifacts will be sent to ftp client.
|
|
194
|
-
*/
|
|
195
|
-
TS_LOAD_TESTS: process.env.TS_LOAD_TESTS || 'false',
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Constant, which prolong timeout constants for local debug.
|
|
199
|
-
*/
|
|
200
|
-
TS_DEBUG_MODE: process.env.TS_DEBUG_MODE === 'true',
|
|
201
|
-
|
|
202
|
-
E2E_OCP_CLUSTER_VERSION: process.env.E2E_OCP_CLUSTER_VERSION || '4.x',
|
|
203
|
-
|
|
204
|
-
TS_SAMPLE_LIST: process.env.TS_SAMPLE_LIST || 'Node.js MongoDB,Node.js Express',
|
|
205
|
-
|
|
206
|
-
/* -------------------------------------------
|
|
207
|
-
| The factory tests related constants
|
|
208
|
-
----------------------------------------------*/
|
|
209
|
-
TS_SELENIUM_FACTORY_GIT_PROVIDER: process.env.TS_SELENIUM_FACTORY_GIT_PROVIDER || GitProviderType.GITHUB,
|
|
210
|
-
|
|
211
|
-
TS_SELENIUM_FACTORY_GIT_REPO_URL: process.env.TS_SELENIUM_FACTORY_GIT_REPO_URL || '',
|
|
212
|
-
|
|
213
|
-
TS_SELENIUM_IS_PRIVATE_FACTORY_GIT_REPO: process.env.TS_SELENIUM_IS_PRIVATE_FACTORY_GIT_REPO === 'true',
|
|
214
|
-
|
|
215
|
-
TS_SELENIUM_FACTORY_GIT_REPO_BRANCH: process.env.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH || 'master',
|
|
216
|
-
|
|
217
|
-
TS_SELENIUM_FACTORY_URL(): string {
|
|
218
|
-
return process.env.TS_SELENIUM_FACTORY_URL || TestConstants.TS_SELENIUM_BASE_URL + '/dashboard/#/' + this.TS_SELENIUM_FACTORY_GIT_REPO_URL;
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
TS_SELENIUM_GIT_PROVIDER_USERNAME: process.env.TS_SELENIUM_GIT_PROVIDER_USERNAME || '',
|
|
222
|
-
|
|
223
|
-
TS_SELENIUM_GIT_PROVIDER_PASSWORD: process.env.TS_SELENIUM_GIT_PROVIDER_PASSWORD || '',
|
|
224
|
-
|
|
225
|
-
TS_SELENIUM_GIT_PROVIDER_IS_LDAP_LOGIN: process.env.TS_SELENIUM_GIT_PROVIDER_IS_LDAP_LOGIN === 'true',
|
|
226
|
-
|
|
227
|
-
TS_SELENIUM_GIT_PROVIDER_OAUTH: process.env.TS_SELENIUM_GIT_PROVIDER_OAUTH === 'true',
|
|
228
|
-
|
|
229
|
-
TS_SELENIUM_PROJECT_ROOT_FILE_NAME: process.env.TS_SELENIUM_PROJECT_ROOT_FILE_NAME || 'devfile.yaml',
|
|
230
|
-
|
|
231
|
-
/* -------------------------------------------
|
|
232
|
-
| The api tests related constants
|
|
233
|
-
----------------------------------------------*/
|
|
234
|
-
|
|
235
|
-
TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL: process.env.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL || KubernetesCommandLineTool.OC,
|
|
236
|
-
|
|
237
|
-
// 'quay.io/devfile/universal-developer-image:latest'
|
|
238
|
-
// is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
239
|
-
TS_API_TEST_UDI_IMAGE: process.env.TS_API_TEST_UDI_IMAGE || undefined,
|
|
240
|
-
|
|
241
|
-
// https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
|
|
242
|
-
// is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
243
|
-
TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI: process.env.TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI || undefined,
|
|
244
|
-
|
|
245
|
-
// https://eclipse-che.github.io/che-plugin-registry/main/v3
|
|
246
|
-
// is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
247
|
-
TS_API_TEST_PLUGIN_REGISTRY_URL: process.env.TS_API_TEST_PLUGIN_REGISTRY_URL || undefined,
|
|
248
|
-
|
|
249
|
-
TS_API_TEST_NAMESPACE: process.env.TS_API_TEST_NAMESPACE || undefined,
|
|
250
|
-
|
|
251
|
-
// to run all devfile from registry. used in DevfileAcceptanceTestAPI.suite.ts
|
|
252
|
-
TS_API_ACCEPTANCE_TEST_REGISTRY_URL(): string {
|
|
253
|
-
return process.env.TS_API_ACCEPTANCE_TEST_REGISTRY_URL || SupportedDevfilesRegistries.INBUILT_APPLICATION_DEVFILE_REGISTRY_URL();
|
|
254
|
-
},
|
|
255
|
-
};
|