@eclipse-che/che-e2e 7.67.0 → 7.67.1-dev-e49f025
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/build/dockerfiles/Dockerfile +1 -1
- package/configs/inversify.config.ts +20 -17
- package/configs/inversify.types.ts +3 -3
- package/configs/mocharc.ts +14 -4
- 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 +17 -13
- package/dist/configs/inversify.config.js.map +1 -1
- package/dist/configs/inversify.types.js +3 -2
- package/dist/configs/inversify.types.js.map +1 -1
- package/dist/configs/mocharc.js +13 -4
- 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 +22 -12
- 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 +18 -11
- package/dist/specs/MochaHooks.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +5 -2
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/api/ContainerOverridesAPI.spec.js +5 -4
- package/dist/specs/api/ContainerOverridesAPI.spec.js.map +1 -1
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js +93 -0
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js.map +1 -0
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js +62 -0
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -0
- package/dist/specs/api/PodOverridesAPI.spec.js +5 -4
- package/dist/specs/api/PodOverridesAPI.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 +7 -6
- package/dist/specs/dashboard-samples/RecomendedExtentions.spec.js.map +1 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +4 -4
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
- package/dist/specs/factory/Factory.spec.js +20 -18
- package/dist/specs/factory/Factory.spec.js.map +1 -1
- package/dist/specs/factory/NoSetupRepoFactory.spec.js +28 -28
- package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
- package/dist/specs/factory/RefusedOAuthFactory.spec.js +28 -26
- 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/ProjectAndFileTests.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 +33 -36
- package/dist/utils/CheReporter.js.map +1 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js +72 -0
- package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -0
- package/dist/utils/DevfilesRegistryHelper.js +82 -0
- package/dist/utils/DevfilesRegistryHelper.js.map +1 -0
- package/dist/utils/DriverHelper.js +20 -17
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/KubernetesCommandLineToolsExecutor.js +42 -29
- 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 +9 -12
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/ShellExecutor.js +5 -2
- package/dist/utils/ShellExecutor.js.map +1 -1
- package/dist/utils/{vsc/GitUtil.js → StringUtil.js} +26 -8
- package/dist/utils/StringUtil.js.map +1 -0
- 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/ApiUrlResolver.js.map +1 -1
- package/dist/utils/workspace/TestWorkspaceUtil.js +9 -7
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/driver/ChromeDriver.ts +7 -7
- package/index.ts +22 -12
- package/package.json +4 -2
- 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 +18 -12
- package/specs/SmokeTest.spec.ts +5 -2
- package/specs/api/ContainerOverridesAPI.spec.ts +5 -4
- package/specs/api/DevfileAcceptanceTestAPI.spec.ts +106 -0
- package/specs/api/EmptyWorkspaceAPI.spec.ts +74 -0
- package/specs/api/PodOverridesAPI.spec.ts +5 -4
- package/specs/dashboard-samples/EmptyWorkspace.spec.ts +10 -2
- package/specs/dashboard-samples/RecomendedExtentions.spec.ts +8 -7
- package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +4 -4
- package/specs/factory/Factory.spec.ts +21 -19
- package/specs/factory/NoSetupRepoFactory.spec.ts +29 -30
- package/specs/factory/RefusedOAuthFactory.spec.ts +29 -28
- package/tests-library/LoginTests.ts +9 -9
- package/tests-library/ProjectAndFileTests.ts +1 -1
- package/tests-library/WorkspaceHandlingTests.ts +11 -12
- package/utils/BrowserTabsUtil.ts +2 -2
- package/utils/CheReporter.ts +35 -42
- package/utils/DevWorkspaceConfigurationHelper.ts +83 -0
- package/utils/DevfilesRegistryHelper.ts +77 -0
- package/utils/DriverHelper.ts +54 -50
- package/utils/KubernetesCommandLineToolsExecutor.ts +43 -28
- package/utils/Logger.ts +16 -17
- package/utils/ScreenCatcher.ts +8 -9
- package/utils/ShellExecutor.ts +6 -2
- package/utils/StringUtil.ts +46 -0
- package/utils/request-handlers/CheApiRequestHandler.ts +4 -4
- package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +4 -2
- package/utils/workspace/ApiUrlResolver.ts +2 -2
- package/utils/workspace/TestWorkspaceUtil.ts +16 -14
- package/constants/TestConstants.ts +0 -247
- package/dist/constants/TestConstants.js +0 -198
- 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/dist/specs/api/CloneGitRepoAPI.spec.js +0 -60
- package/dist/specs/api/CloneGitRepoAPI.spec.js.map +0 -1
- package/dist/utils/Sanitizer.js +0 -29
- package/dist/utils/Sanitizer.js.map +0 -1
- package/dist/utils/vsc/GitUtil.js.map +0 -1
- package/pageobjects/openshift/CheLoginPage.ts +0 -42
- package/specs/api/CloneGitRepoAPI.spec.ts +0 -72
- package/utils/Sanitizer.ts +0 -19
- package/utils/vsc/GitUtil.ts +0 -25
- /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/README.md
CHANGED
|
@@ -25,11 +25,20 @@ Note: If there is any modifications in package.json, manually execute the `npm i
|
|
|
25
25
|
|
|
26
26
|
## Custom launch
|
|
27
27
|
|
|
28
|
-
- Use environment variables which described in the
|
|
28
|
+
- Use environment variables which described in the "constants" folder
|
|
29
29
|
- Use environment variables for setting timeouts if needed. You can see the list in **```'TimeoutConstants.ts'```**. You can see the list of those variables and their value if you set the ```'TS_SELENIUM_PRINT_TIMEOUT_VARIABLES = true'```
|
|
30
30
|
- To test one specification export file name as ```export USERSTORY=<spec-file-name-without-extension> && npm run test``` (example: ```-e USERSTORY=Quarkus```)
|
|
31
31
|
- To run test without Selenium WebDriver (API tests etc.) use ```export USERSTORY=<spec-file-name-without-extension> && npm run driver-less-test``` (example: ```-e USERSTORY=CloneGitRepoAPI```)
|
|
32
|
-
|
|
32
|
+
- This project support application testing deployed on Kubernetes or Openshift platform. Openshift is default value. To switch into Kubernetes, please, use `TS_PLATFORM=kubernetes` environmental variable and `TS_SELENIUM_K8S_PASSWORD`, `TS_SELENIUM_K8S_USERNAME` to provide credentials. The sample of test command in this case:
|
|
33
|
+
```
|
|
34
|
+
export TS_PLATFORM=kubernetes && \
|
|
35
|
+
export TS_SELENIUM_K8S_USERNAME=<username> && \
|
|
36
|
+
export TS_SELENIUM_K8S_PASSWORD=<password> && \
|
|
37
|
+
export TS_SELENIUM_BASE_URL=<ingress-url> && \
|
|
38
|
+
npm run test
|
|
39
|
+
```
|
|
40
|
+
Also, environmental variables can be set in files in "constants" folder.
|
|
41
|
+
|
|
33
42
|
## Docker launch
|
|
34
43
|
|
|
35
44
|
- open terminal and go to the "e2e" directory
|
|
@@ -59,7 +68,7 @@ For running tests without docker, please perform next steps:**
|
|
|
59
68
|
- link to devfile ( **```For successfull test passing, exactly provided devfile should be used```** )
|
|
60
69
|
<https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml>
|
|
61
70
|
- Provide the **```'TS_SELENIUM_BASE_URL'```** environment variable as described above
|
|
62
|
-
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see
|
|
71
|
+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BaseTestConstants.ts)
|
|
63
72
|
- perform command **```export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles```**
|
|
64
73
|
|
|
65
74
|
## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication
|
|
@@ -72,7 +81,7 @@ For running tests without docker, please perform next steps:**
|
|
|
72
81
|
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
|
|
73
82
|
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\>
|
|
74
83
|
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\>
|
|
75
|
-
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see
|
|
84
|
+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BaseTestConstants.ts)
|
|
76
85
|
|
|
77
86
|
**Execute the npm command:**
|
|
78
87
|
- perform command ```export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles```
|
|
@@ -14,36 +14,38 @@ import { IDriver } from '../driver/IDriver';
|
|
|
14
14
|
import { ChromeDriver } from '../driver/ChromeDriver';
|
|
15
15
|
import { TYPES, CLASSES } from './inversify.types';
|
|
16
16
|
import { TestWorkspaceUtil } from '../utils/workspace/TestWorkspaceUtil';
|
|
17
|
-
import { IOcpLoginPage } from '../pageobjects/login/IOcpLoginPage';
|
|
18
|
-
import { OcpUserLoginPage } from '../pageobjects/login/OcpUserLoginPage';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { RegularUserOcpCheLoginPage } from '../pageobjects/login/RegularUserOcpCheLoginPage';
|
|
17
|
+
import { IOcpLoginPage } from '../pageobjects/login/interfaces/IOcpLoginPage';
|
|
18
|
+
import { OcpUserLoginPage } from '../pageobjects/login/openshift/OcpUserLoginPage';
|
|
19
|
+
import { ICheLoginPage } from '../pageobjects/login/interfaces/ICheLoginPage';
|
|
20
|
+
import { RegularUserOcpCheLoginPage } from '../pageobjects/login/openshift/RegularUserOcpCheLoginPage';
|
|
22
21
|
import { DriverHelper } from '../utils/DriverHelper';
|
|
23
22
|
import { Dashboard } from '../pageobjects/dashboard/Dashboard';
|
|
24
23
|
import { Workspaces } from '../pageobjects/dashboard/Workspaces';
|
|
25
24
|
import { WorkspaceDetails } from '../pageobjects/dashboard/workspace-details/WorkspaceDetails';
|
|
26
25
|
import { ScreenCatcher } from '../utils/ScreenCatcher';
|
|
27
|
-
import { OcpLoginPage } from '../pageobjects/openshift/OcpLoginPage';
|
|
28
|
-
import { CheLoginPage } from '../pageobjects/openshift/CheLoginPage';
|
|
26
|
+
import { OcpLoginPage } from '../pageobjects/login/openshift/OcpLoginPage';
|
|
29
27
|
import { IAuthorizationHeaderHandler } from '../utils/request-handlers/headers/IAuthorizationHeaderHandler';
|
|
30
28
|
import { CheMultiuserAuthorizationHeaderHandler } from '../utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler';
|
|
31
29
|
import { CheApiRequestHandler } from '../utils/request-handlers/CheApiRequestHandler';
|
|
32
30
|
import { CreateWorkspace } from '../pageobjects/dashboard/CreateWorkspace';
|
|
33
31
|
import { BrowserTabsUtil } from '../utils/BrowserTabsUtil';
|
|
34
32
|
import { WorkspaceHandlingTests } from '../tests-library/WorkspaceHandlingTests';
|
|
35
|
-
import { Sanitizer } from '../utils/Sanitizer';
|
|
36
33
|
import { ApiUrlResolver } from '../utils/workspace/ApiUrlResolver';
|
|
37
34
|
import { ITestWorkspaceUtil } from '../utils/workspace/ITestWorkspaceUtil';
|
|
38
35
|
import { ProjectAndFileTests } from '../tests-library/ProjectAndFileTests';
|
|
39
36
|
import { LoginTests } from '../tests-library/LoginTests';
|
|
40
|
-
import { RedHatLoginPage } from '../pageobjects/login/RedHatLoginPage';
|
|
41
|
-
import { OcpRedHatLoginPage } from '../pageobjects/login/OcpRedHatLoginPage';
|
|
37
|
+
import { RedHatLoginPage } from '../pageobjects/login/openshift/RedHatLoginPage';
|
|
38
|
+
import { OcpRedHatLoginPage } from '../pageobjects/login/openshift/OcpRedHatLoginPage';
|
|
42
39
|
import { OcpMainPage } from '../pageobjects/openshift/OcpMainPage';
|
|
43
40
|
import { OcpImportFromGitPage } from '../pageobjects/openshift/OcpImportFromGitPage';
|
|
44
41
|
import { OcpApplicationPage } from '../pageobjects/openshift/OcpApplicationPage';
|
|
42
|
+
import { StringUtil } from '../utils/StringUtil';
|
|
43
|
+
import { KubernetesLoginPage } from '../pageobjects/login/kubernetes/KubernetesLoginPage';
|
|
44
|
+
import { DexLoginPage } from '../pageobjects/login/kubernetes/DexLoginPage';
|
|
45
|
+
import { OAuthConstants } from '../constants/OAuthConstants';
|
|
46
|
+
import { BaseTestConstants, Platform } from '../constants/BaseTestConstants';
|
|
45
47
|
|
|
46
|
-
const e2eContainer: Container = new Container({defaultScope: 'Transient'});
|
|
48
|
+
const e2eContainer: Container = new Container({ defaultScope: 'Transient' });
|
|
47
49
|
|
|
48
50
|
e2eContainer.bind<IDriver>(TYPES.Driver).to(ChromeDriver).inSingletonScope();
|
|
49
51
|
e2eContainer.bind<ITestWorkspaceUtil>(TYPES.WorkspaceUtil).to(TestWorkspaceUtil);
|
|
@@ -56,24 +58,25 @@ e2eContainer.bind<Workspaces>(CLASSES.Workspaces).to(Workspaces);
|
|
|
56
58
|
e2eContainer.bind<WorkspaceDetails>(CLASSES.WorkspaceDetails).to(WorkspaceDetails);
|
|
57
59
|
e2eContainer.bind<ScreenCatcher>(CLASSES.ScreenCatcher).to(ScreenCatcher);
|
|
58
60
|
e2eContainer.bind<OcpLoginPage>(CLASSES.OcpLoginPage).to(OcpLoginPage);
|
|
61
|
+
e2eContainer.bind<DexLoginPage>(CLASSES.DexLoginPage).to(DexLoginPage);
|
|
59
62
|
|
|
60
63
|
e2eContainer.bind<OcpMainPage>(CLASSES.OcpMainPage).to(OcpMainPage);
|
|
61
64
|
e2eContainer.bind<OcpImportFromGitPage>(CLASSES.OcpImportFromGitPage).to(OcpImportFromGitPage);
|
|
62
65
|
e2eContainer.bind<OcpApplicationPage>(CLASSES.OcpApplicationPage).to(OcpApplicationPage);
|
|
63
66
|
|
|
64
|
-
|
|
65
|
-
e2eContainer.bind<CheLoginPage>(CLASSES.CheLoginPage).to(CheLoginPage);
|
|
66
67
|
e2eContainer.bind<CheApiRequestHandler>(CLASSES.CheApiRequestHandler).to(CheApiRequestHandler);
|
|
67
68
|
e2eContainer.bind<CreateWorkspace>(CLASSES.CreateWorkspace).to(CreateWorkspace);
|
|
68
69
|
e2eContainer.bind<ProjectAndFileTests>(CLASSES.ProjectAndFileTests).to(ProjectAndFileTests);
|
|
69
70
|
e2eContainer.bind<LoginTests>(CLASSES.LoginTests).to(LoginTests);
|
|
70
|
-
e2eContainer.bind<
|
|
71
|
+
e2eContainer.bind<StringUtil>(CLASSES.StringUtil).to(StringUtil);
|
|
71
72
|
e2eContainer.bind<ApiUrlResolver>(CLASSES.ApiUrlResolver).to(ApiUrlResolver);
|
|
72
73
|
e2eContainer.bind<WorkspaceHandlingTests>(CLASSES.WorkspaceHandlingTests).to(WorkspaceHandlingTests);
|
|
73
74
|
e2eContainer.bind<RedHatLoginPage>(CLASSES.RedHatLoginPage).to(RedHatLoginPage);
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
BaseTestConstants.TS_PLATFORM === Platform.OPENSHIFT ?
|
|
77
|
+
OAuthConstants.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH ?
|
|
78
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(RegularUserOcpCheLoginPage) :
|
|
79
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(OcpRedHatLoginPage) :
|
|
80
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(KubernetesLoginPage);
|
|
78
81
|
|
|
79
82
|
export { e2eContainer };
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* SPDX-License-Identifier: EPL-2.0
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
const TYPES: any = {
|
|
13
12
|
Driver: Symbol.for('Driver'),
|
|
14
13
|
CheLogin: Symbol.for('CheLogin'),
|
|
@@ -25,16 +24,17 @@ const CLASSES: any = {
|
|
|
25
24
|
WorkspaceDetails: 'WorkspaceDetails',
|
|
26
25
|
ScreenCatcher: 'ScreenCatcher',
|
|
27
26
|
OcpLoginPage: 'OcpLoginPage',
|
|
28
|
-
CheLoginPage: 'CheLoginPage',
|
|
29
27
|
CheApiRequestHandler: 'CheApiRequestHandler',
|
|
30
28
|
CreateWorkspace: 'CreateWorkspace',
|
|
31
29
|
BrowserTabsUtil: 'BrowserTabsUtil',
|
|
32
30
|
ProjectAndFileTests: 'ProjectAndFileTests',
|
|
33
|
-
|
|
31
|
+
StringUtil: 'StringUtil',
|
|
34
32
|
ApiUrlResolver: 'ApiUrlResolver',
|
|
35
33
|
LoginTests: 'LoginTests',
|
|
36
34
|
WorkspaceHandlingTests: 'WorkspaceHandlingTests',
|
|
37
35
|
RedHatLoginPage: 'RedHatLoginPage',
|
|
36
|
+
KubernetesLoginPage: 'KubernetesLoginPage',
|
|
37
|
+
DexLoginPage: 'DexLoginPage',
|
|
38
38
|
OcpRedHatLoginPage: 'OcpRedHatLoginPage',
|
|
39
39
|
OcpApplicationPage: 'OcpApplicationPage',
|
|
40
40
|
OcpMainPage: 'OcpMainPage',
|
package/configs/mocharc.ts
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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
|
+
|
|
1
11
|
'use strict';
|
|
2
12
|
|
|
3
|
-
import {
|
|
13
|
+
import { TimeoutConstants } from '../constants/TimeoutConstants';
|
|
4
14
|
|
|
5
15
|
module.exports = {
|
|
6
16
|
timeout: 1200000,
|
|
7
|
-
reporter: '
|
|
17
|
+
reporter: 'dist/utils/CheReporter.js',
|
|
8
18
|
ui: 'tdd',
|
|
9
19
|
require: [
|
|
10
|
-
'
|
|
20
|
+
'dist/specs/MochaHooks.js',
|
|
11
21
|
'ts-node/register',
|
|
12
22
|
],
|
|
13
23
|
bail: true,
|
|
@@ -23,5 +33,5 @@ module.exports = {
|
|
|
23
33
|
: process.env.USERSTORY ?
|
|
24
34
|
[`dist/specs/**/${process.env.USERSTORY}.spec.js`, `dist/specs/${process.env.USERSTORY}.spec.js`]
|
|
25
35
|
: [`dist/specs/**/**.spec.js`, `dist/specs/**.spec.js`],
|
|
26
|
-
retries:
|
|
36
|
+
retries: TimeoutConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
27
37
|
};
|
|
@@ -4,10 +4,9 @@ echo "Generating index.ts file..."
|
|
|
4
4
|
echo "import * as inversifyConfig from './configs/inversify.config';
|
|
5
5
|
export { inversifyConfig };
|
|
6
6
|
export * from './configs/inversify.types';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './constants/TimeoutConstants';" > ./index.ts
|
|
7
|
+
export * from './configs/mocharc';" > ./index.ts
|
|
9
8
|
|
|
10
|
-
listOfDirs="driver utils pageobjects tests-library"
|
|
9
|
+
listOfDirs="driver utils pageobjects tests-library constants"
|
|
11
10
|
listOfExcludes="./utils/CheReporter.ts"
|
|
12
11
|
for dir in $listOfDirs
|
|
13
12
|
do
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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
|
+
|
|
11
|
+
import { BaseTestConstants } from './BaseTestConstants';
|
|
12
|
+
|
|
13
|
+
export enum KubernetesCommandLineTool {
|
|
14
|
+
OC = 'oc',
|
|
15
|
+
KUBECTL = 'kubectl',
|
|
16
|
+
}
|
|
17
|
+
export const SupportedDevfilesRegistries: any = {
|
|
18
|
+
INBUILT_APPLICATION_DEVFILE_REGISTRY_URL: () => `${BaseTestConstants.TS_SELENIUM_BASE_URL}/devfile-registry/devfiles/`,
|
|
19
|
+
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: `https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/`,
|
|
20
|
+
};
|
|
21
|
+
export const APITestConstants: any = {
|
|
22
|
+
/**
|
|
23
|
+
* Possible values "oc" or "kubectl"
|
|
24
|
+
*/
|
|
25
|
+
TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL: process.env.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL || KubernetesCommandLineTool.OC,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 'quay.io/devfile/universal-developer-image:latest'
|
|
29
|
+
* is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
30
|
+
*/
|
|
31
|
+
TS_API_TEST_UDI_IMAGE: process.env.TS_API_TEST_UDI_IMAGE || undefined,
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
|
|
35
|
+
* is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
36
|
+
*/
|
|
37
|
+
TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI: process.env.TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI || undefined,
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* https://eclipse-che.github.io/che-plugin-registry/main/v3
|
|
41
|
+
* is default assigned by DevWorkspaceConfigurationHelper.generateDevfileContext() using @eclipse-che/che-devworkspace-generator
|
|
42
|
+
*/
|
|
43
|
+
TS_API_TEST_PLUGIN_REGISTRY_URL: process.env.TS_API_TEST_PLUGIN_REGISTRY_URL || undefined,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Namespace on openshift platform
|
|
47
|
+
*/
|
|
48
|
+
TS_API_TEST_NAMESPACE: process.env.TS_API_TEST_NAMESPACE || undefined,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* to run all devfile from registry. used in DevfileAcceptanceTestAPI.suite.ts
|
|
52
|
+
*/
|
|
53
|
+
TS_API_ACCEPTANCE_TEST_REGISTRY_URL(): string {
|
|
54
|
+
return process.env.TS_API_ACCEPTANCE_TEST_REGISTRY_URL || SupportedDevfilesRegistries.INBUILT_APPLICATION_DEVFILE_REGISTRY_URL();
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 Platform {
|
|
11
|
+
OPENSHIFT = 'openshift',
|
|
12
|
+
KUBERNETES = 'kubernetes',
|
|
13
|
+
}
|
|
14
|
+
export const BaseTestConstants: any = {
|
|
15
|
+
/**
|
|
16
|
+
* Base URL of the application which should be checked
|
|
17
|
+
*/
|
|
18
|
+
TS_SELENIUM_BASE_URL: !process.env.TS_SELENIUM_BASE_URL ? 'http://sample-url' : process.env.TS_SELENIUM_BASE_URL.replace(/\/$/, ''),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Choose the platform where "che" application deployed, "openshift" by default.
|
|
22
|
+
*/
|
|
23
|
+
TS_PLATFORM: process.env.TS_PLATFORM || Platform.OPENSHIFT,
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Editor the tests are running against, "code" by default.
|
|
27
|
+
* Possible values: "che-code"
|
|
28
|
+
*/
|
|
29
|
+
TS_SELENIUM_EDITOR: process.env.TS_SELENIUM_EDITOR || 'che-code',
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* File name to check if project was imported
|
|
33
|
+
*/
|
|
34
|
+
TS_SELENIUM_PROJECT_ROOT_FILE_NAME: process.env.TS_SELENIUM_PROJECT_ROOT_FILE_NAME || 'devfile.yaml',
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Name of workspace created for 'Happy Path' scenario validation.
|
|
38
|
+
*/
|
|
39
|
+
TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME: process.env.TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME || 'EmptyWorkspace',
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* This variable specifies that run test is used for load testing and that all artifacts will be sent to ftp client.
|
|
43
|
+
*/
|
|
44
|
+
TS_LOAD_TESTS: process.env.TS_LOAD_TESTS || 'false',
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Enable Axios request interceptor, false by default
|
|
48
|
+
*/
|
|
49
|
+
TS_SELENIUM_REQUEST_INTERCEPTOR: process.env.TS_SELENIUM_REQUEST_INTERCEPTOR === 'true',
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Enable Axios response interceptor, false by default
|
|
53
|
+
*/
|
|
54
|
+
TS_SELENIUM_RESPONSE_INTERCEPTOR: process.env.TS_SELENIUM_RESPONSE_INTERCEPTOR === 'true',
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Stop and remove workspace if a test fails.
|
|
58
|
+
*/
|
|
59
|
+
DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constant, which prolong timeout constants for local debug.
|
|
63
|
+
*/
|
|
64
|
+
TS_DEBUG_MODE: process.env.TS_DEBUG_MODE === 'true',
|
|
65
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 const ChromeDriverConstants: any = {
|
|
11
|
+
/**
|
|
12
|
+
* Remote driver URL.
|
|
13
|
+
*/
|
|
14
|
+
TS_SELENIUM_REMOTE_DRIVER_URL: process.env.TS_SELENIUM_REMOTE_DRIVER_URL || '',
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Run browser in "Headless" (hidden) mode, "false" by default.
|
|
18
|
+
*/
|
|
19
|
+
TS_SELENIUM_HEADLESS: process.env.TS_SELENIUM_HEADLESS === 'true',
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create instance of chromedriver, "true" by default. Should be "false" to run only API tests.
|
|
23
|
+
*/
|
|
24
|
+
TS_USE_WEB_DRIVER_FOR_TEST: process.env.TS_USE_WEB_DRIVER_FOR_TEST !== 'false',
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Run browser in "Fullscreen" (kiosk) mode.
|
|
28
|
+
* Default to true if undefined
|
|
29
|
+
*/
|
|
30
|
+
TS_SELENIUM_LAUNCH_FULLSCREEN: (process.env.TS_SELENIUM_LAUNCH_FULLSCREEN !== 'false'),
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Run browser with an enabled or disabled W3C protocol (on Chrome 76 and upper, it is enabled by default), "true" by default.
|
|
34
|
+
*/
|
|
35
|
+
TS_SELENIUM_W3C_CHROME_OPTION: process.env.TS_SELENIUM_W3C_CHROME_OPTION !== 'false',
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Browser width resolution, "1920" by default.
|
|
39
|
+
*/
|
|
40
|
+
TS_SELENIUM_RESOLUTION_WIDTH: Number(process.env.TS_SELENIUM_RESOLUTION_WIDTH) || 1920,
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Browser height resolution, "1080" by default.
|
|
44
|
+
*/
|
|
45
|
+
TS_SELENIUM_RESOLUTION_HEIGHT: Number(process.env.TS_SELENIUM_RESOLUTION_HEIGHT) || 1080,
|
|
46
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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
|
+
import { BaseTestConstants } from './BaseTestConstants';
|
|
11
|
+
|
|
12
|
+
export enum GitProviderType {
|
|
13
|
+
GITHUB = 'github',
|
|
14
|
+
GITLAB = 'gitlab',
|
|
15
|
+
BITBUCKET = 'bitbucket'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const FactoryTestConstants: any = {
|
|
19
|
+
/**
|
|
20
|
+
* Git provider to check in factory tests
|
|
21
|
+
*/
|
|
22
|
+
TS_SELENIUM_FACTORY_GIT_PROVIDER: process.env.TS_SELENIUM_FACTORY_GIT_PROVIDER || GitProviderType.GITHUB,
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* URL to create factory
|
|
26
|
+
*/
|
|
27
|
+
TS_SELENIUM_FACTORY_GIT_REPO_URL: process.env.TS_SELENIUM_FACTORY_GIT_REPO_URL || '',
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Is factory repository URL private or no
|
|
31
|
+
*/
|
|
32
|
+
TS_SELENIUM_IS_PRIVATE_FACTORY_GIT_REPO: process.env.TS_SELENIUM_IS_PRIVATE_FACTORY_GIT_REPO === 'true',
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Git repository main branch name (main or master)
|
|
36
|
+
*/
|
|
37
|
+
TS_SELENIUM_FACTORY_GIT_REPO_BRANCH: process.env.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH || 'master',
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Full factory URL
|
|
41
|
+
*/
|
|
42
|
+
TS_SELENIUM_FACTORY_URL(): string {
|
|
43
|
+
return process.env.TS_SELENIUM_FACTORY_URL || BaseTestConstants.TS_SELENIUM_BASE_URL + '/dashboard/#/' + this.TS_SELENIUM_FACTORY_GIT_REPO_URL;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 const MonacoConstants: any = {
|
|
11
|
+
/**
|
|
12
|
+
* Base version of VSCode editor for monaco-page-objects, "1.37.0" by default.
|
|
13
|
+
*/
|
|
14
|
+
TS_SELENIUM_MONACO_PAGE_OBJECTS_BASE_VERSION: process.env.TS_SELENIUM_MONACO_PAGE_OBJECTS_BASE_VERSION || '1.37.0',
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Latest compatible version to be used, based on versions available in
|
|
18
|
+
* https://github.com/redhat-developer/vscode-extension-tester/tree/master/locators/lib ,
|
|
19
|
+
* "1.73.0" by default.
|
|
20
|
+
*/
|
|
21
|
+
TS_SELENIUM_MONACO_PAGE_OBJECTS_USE_VERSION: process.env.TS_SELENIUM_MONACO_PAGE_OBJECTS_USE_VERSION || '1.73.0',
|
|
22
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 const OAuthConstants: any = {
|
|
11
|
+
/**
|
|
12
|
+
* Value of OpenShift oAuth property determines how to login in installed application,
|
|
13
|
+
* if 'false' as an user of application, if 'true' as a regular user of OCP.
|
|
14
|
+
*/
|
|
15
|
+
TS_SELENIUM_VALUE_OPENSHIFT_OAUTH: process.env.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH === 'true',
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Log into OCP by using appropriate provider title.
|
|
19
|
+
*/
|
|
20
|
+
TS_OCP_LOGIN_PAGE_PROVIDER_TITLE: process.env.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE || '',
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Regular username used to login in OCP.
|
|
24
|
+
*/
|
|
25
|
+
TS_SELENIUM_OCP_USERNAME: process.env.TS_SELENIUM_OCP_USERNAME || '',
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Password regular user used to login in OCP.
|
|
29
|
+
*/
|
|
30
|
+
TS_SELENIUM_OCP_PASSWORD: process.env.TS_SELENIUM_OCP_PASSWORD || '',
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Regular username used to login in Kubernetes.
|
|
34
|
+
*/
|
|
35
|
+
TS_SELENIUM_K8S_USERNAME: process.env.TS_SELENIUM_K8S_USERNAME || '',
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Password regular user used to login in Kubernetes.
|
|
39
|
+
*/
|
|
40
|
+
TS_SELENIUM_K8S_PASSWORD: process.env.TS_SELENIUM_K8S_PASSWORD || '',
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* For login via github for example on https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com
|
|
44
|
+
*/
|
|
45
|
+
TS_SELENIUM_GIT_PROVIDER_OAUTH: process.env.TS_SELENIUM_GIT_PROVIDER_OAUTH === 'true',
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Git repository username
|
|
49
|
+
*/
|
|
50
|
+
TS_SELENIUM_GIT_PROVIDER_USERNAME: process.env.TS_SELENIUM_GIT_PROVIDER_USERNAME || '',
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Git repository password
|
|
54
|
+
*/
|
|
55
|
+
TS_SELENIUM_GIT_PROVIDER_PASSWORD: process.env.TS_SELENIUM_GIT_PROVIDER_PASSWORD || '',
|
|
56
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 const PluginsTestConstants: any = {
|
|
11
|
+
/**
|
|
12
|
+
* Dashboard samples to check in RecomendedExtentions.spec.ts
|
|
13
|
+
*/
|
|
14
|
+
TS_SAMPLE_LIST: process.env.TS_SAMPLE_LIST || 'Node.js MongoDB,Node.js Express',
|
|
15
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2020-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 const ReporterConstants: any = {
|
|
11
|
+
/**
|
|
12
|
+
* Path to folder with load tests execution report.
|
|
13
|
+
*/
|
|
14
|
+
TS_SELENIUM_LOAD_TEST_REPORT_FOLDER: process.env.TS_SELENIUM_LOAD_TEST_REPORT_FOLDER || './load-test-folder',
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Delay between screenshots catching in the milliseconds for the execution screencast.
|
|
18
|
+
*/
|
|
19
|
+
TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS: Number(process.env.TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS) || 1000,
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Path to folder with tests execution report.
|
|
23
|
+
*/
|
|
24
|
+
TS_SELENIUM_REPORT_FOLDER: process.env.TS_SELENIUM_REPORT_FOLDER || './report',
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Enable or disable storing of execution screencast, "false" by default.
|
|
28
|
+
*/
|
|
29
|
+
TS_SELENIUM_EXECUTION_SCREENCAST: process.env.TS_SELENIUM_EXECUTION_SCREENCAST === 'true',
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Delete screencast after execution if all tests passed, "true" by default.
|
|
33
|
+
*/
|
|
34
|
+
DELETE_SCREENCAST_IF_TEST_PASS: process.env.DELETE_SCREENCAST_IF_TEST_PASS !== 'false',
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Log level settings, possible variants: 'INFO' (by default), 'DEBUG', 'TRACE'.
|
|
38
|
+
*/
|
|
39
|
+
TS_SELENIUM_LOG_LEVEL: process.env.TS_SELENIUM_LOG_LEVEL || 'INFO',
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Print all timeout variables when tests launch, default to false
|
|
43
|
+
*/
|
|
44
|
+
TS_SELENIUM_PRINT_TIMEOUT_VARIABLES: process.env.TS_SELENIUM_PRINT_TIMEOUT_VARIABLES || false,
|
|
45
|
+
};
|