@eclipse-che/che-e2e 7.70.0-dev-eacd975 → 7.70.0

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.
Files changed (151) hide show
  1. package/README.md +4 -4
  2. package/configs/inversify.config.ts +5 -6
  3. package/configs/inversify.types.ts +0 -1
  4. package/configs/mocharc.ts +12 -2
  5. package/configs/sh-scripts/generateIndex.sh +2 -3
  6. package/constants/APITestConstants.ts +56 -0
  7. package/constants/BaseTestConstants.ts +65 -0
  8. package/constants/ChromeDriverConstants.ts +46 -0
  9. package/constants/FactoryTestConstants.ts +45 -0
  10. package/constants/MonacoConstants.ts +22 -0
  11. package/constants/OAuthConstants.ts +56 -0
  12. package/constants/PluginsTestConstants.ts +15 -0
  13. package/constants/ReporterConstants.ts +45 -0
  14. package/constants/TimeoutConstants.ts +28 -146
  15. package/dist/configs/inversify.config.js +5 -6
  16. package/dist/configs/inversify.config.js.map +1 -1
  17. package/dist/configs/inversify.types.js +0 -1
  18. package/dist/configs/inversify.types.js.map +1 -1
  19. package/dist/configs/mocharc.js +11 -2
  20. package/dist/configs/mocharc.js.map +1 -1
  21. package/dist/constants/APITestConstants.js +54 -0
  22. package/dist/constants/APITestConstants.js.map +1 -0
  23. package/dist/constants/BaseTestConstants.js +61 -0
  24. package/dist/constants/BaseTestConstants.js.map +1 -0
  25. package/dist/constants/ChromeDriverConstants.js +44 -0
  26. package/dist/constants/ChromeDriverConstants.js.map +1 -0
  27. package/dist/constants/FactoryTestConstants.js +44 -0
  28. package/dist/constants/FactoryTestConstants.js.map +1 -0
  29. package/dist/constants/MonacoConstants.js +25 -0
  30. package/dist/constants/MonacoConstants.js.map +1 -0
  31. package/dist/constants/OAuthConstants.js +52 -0
  32. package/dist/constants/OAuthConstants.js.map +1 -0
  33. package/dist/constants/PluginsTestConstants.js +19 -0
  34. package/dist/constants/PluginsTestConstants.js.map +1 -0
  35. package/dist/constants/ReporterConstants.js +43 -0
  36. package/dist/constants/ReporterConstants.js.map +1 -0
  37. package/dist/constants/TimeoutConstants.js +22 -113
  38. package/dist/constants/TimeoutConstants.js.map +1 -1
  39. package/dist/driver/ChromeDriver.js +7 -7
  40. package/dist/driver/ChromeDriver.js.map +1 -1
  41. package/dist/index.js +11 -4
  42. package/dist/index.js.map +1 -1
  43. package/dist/pageobjects/dashboard/CreateWorkspace.js +2 -2
  44. package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
  45. package/dist/pageobjects/dashboard/Dashboard.js +5 -4
  46. package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
  47. package/dist/pageobjects/dashboard/Workspaces.js +1 -2
  48. package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
  49. package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +2 -3
  50. package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
  51. package/dist/pageobjects/git-providers/OauthPage.js +12 -19
  52. package/dist/pageobjects/git-providers/OauthPage.js.map +1 -1
  53. package/dist/pageobjects/ide/CheCodeLocatorLoader.js +2 -2
  54. package/dist/pageobjects/ide/CheCodeLocatorLoader.js.map +1 -1
  55. package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js +3 -3
  56. package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js.map +1 -1
  57. package/dist/pageobjects/{openshift → login/openshift}/OcpLoginPage.js +7 -7
  58. package/dist/pageobjects/login/openshift/OcpLoginPage.js.map +1 -0
  59. package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js +1 -1
  60. package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js.map +1 -1
  61. package/dist/pageobjects/login/openshift/OcpUserLoginPage.js +5 -5
  62. package/dist/pageobjects/login/openshift/OcpUserLoginPage.js.map +1 -1
  63. package/dist/pageobjects/login/openshift/RedHatLoginPage.js +3 -3
  64. package/dist/pageobjects/login/openshift/RedHatLoginPage.js.map +1 -1
  65. package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js +4 -4
  66. package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js.map +1 -1
  67. package/dist/specs/MochaHooks.js +9 -7
  68. package/dist/specs/MochaHooks.js.map +1 -1
  69. package/dist/specs/SmokeTest.spec.js +2 -2
  70. package/dist/specs/SmokeTest.spec.js.map +1 -1
  71. package/dist/specs/api/EmptyWorkspaceAPI.spec.js +4 -3
  72. package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
  73. package/dist/specs/dashboard-samples/RecomendedExtentions.spec.js +4 -3
  74. package/dist/specs/dashboard-samples/RecomendedExtentions.spec.js.map +1 -1
  75. package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +2 -2
  76. package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
  77. package/dist/specs/factory/Factory.spec.js +12 -10
  78. package/dist/specs/factory/Factory.spec.js.map +1 -1
  79. package/dist/specs/factory/NoSetupRepoFactory.spec.js +16 -14
  80. package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
  81. package/dist/specs/factory/RefusedOAuthFactory.spec.js +17 -15
  82. package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
  83. package/dist/tests-library/LoginTests.js +4 -4
  84. package/dist/tests-library/LoginTests.js.map +1 -1
  85. package/dist/tests-library/WorkspaceHandlingTests.js +1 -2
  86. package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -1
  87. package/dist/utils/BrowserTabsUtil.js +2 -2
  88. package/dist/utils/BrowserTabsUtil.js.map +1 -1
  89. package/dist/utils/CheReporter.js +31 -27
  90. package/dist/utils/CheReporter.js.map +1 -1
  91. package/dist/utils/DevWorkspaceConfigurationHelper.js +7 -7
  92. package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
  93. package/dist/utils/DevfilesRegistryHelper.js +9 -9
  94. package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
  95. package/dist/utils/DriverHelper.js +16 -17
  96. package/dist/utils/DriverHelper.js.map +1 -1
  97. package/dist/utils/KubernetesCommandLineToolsExecutor.js +13 -11
  98. package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
  99. package/dist/utils/Logger.js +11 -11
  100. package/dist/utils/Logger.js.map +1 -1
  101. package/dist/utils/ScreenCatcher.js +5 -5
  102. package/dist/utils/ScreenCatcher.js.map +1 -1
  103. package/dist/utils/request-handlers/CheApiRequestHandler.js +2 -2
  104. package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -1
  105. package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js +2 -2
  106. package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
  107. package/dist/utils/workspace/TestWorkspaceUtil.js +3 -3
  108. package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
  109. package/driver/ChromeDriver.ts +7 -7
  110. package/index.ts +11 -4
  111. package/package.json +1 -1
  112. package/pageobjects/dashboard/CreateWorkspace.ts +2 -2
  113. package/pageobjects/dashboard/Dashboard.ts +5 -4
  114. package/pageobjects/dashboard/Workspaces.ts +1 -2
  115. package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +2 -3
  116. package/pageobjects/git-providers/OauthPage.ts +8 -16
  117. package/pageobjects/ide/CheCodeLocatorLoader.ts +2 -2
  118. package/pageobjects/login/kubernetes/KubernetesLoginPage.ts +3 -3
  119. package/pageobjects/{openshift → login/openshift}/OcpLoginPage.ts +7 -7
  120. package/pageobjects/login/openshift/OcpRedHatLoginPage.ts +1 -1
  121. package/pageobjects/login/openshift/OcpUserLoginPage.ts +5 -5
  122. package/pageobjects/login/openshift/RedHatLoginPage.ts +3 -3
  123. package/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts +4 -4
  124. package/specs/MochaHooks.ts +9 -7
  125. package/specs/SmokeTest.spec.ts +2 -2
  126. package/specs/api/EmptyWorkspaceAPI.spec.ts +4 -3
  127. package/specs/dashboard-samples/RecomendedExtentions.spec.ts +4 -3
  128. package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +2 -2
  129. package/specs/factory/Factory.spec.ts +12 -10
  130. package/specs/factory/NoSetupRepoFactory.spec.ts +16 -14
  131. package/specs/factory/RefusedOAuthFactory.spec.ts +17 -15
  132. package/tests-library/LoginTests.ts +4 -4
  133. package/tests-library/WorkspaceHandlingTests.ts +1 -2
  134. package/utils/BrowserTabsUtil.ts +2 -2
  135. package/utils/CheReporter.ts +32 -28
  136. package/utils/DevWorkspaceConfigurationHelper.ts +7 -7
  137. package/utils/DevfilesRegistryHelper.ts +3 -3
  138. package/utils/DriverHelper.ts +20 -21
  139. package/utils/KubernetesCommandLineToolsExecutor.ts +11 -9
  140. package/utils/Logger.ts +11 -12
  141. package/utils/ScreenCatcher.ts +5 -5
  142. package/utils/request-handlers/CheApiRequestHandler.ts +2 -2
  143. package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +2 -2
  144. package/utils/workspace/TestWorkspaceUtil.ts +3 -3
  145. package/constants/TestConstants.ts +0 -274
  146. package/dist/constants/TestConstants.js +0 -223
  147. package/dist/constants/TestConstants.js.map +0 -1
  148. package/dist/pageobjects/openshift/CheLoginPage.js +0 -55
  149. package/dist/pageobjects/openshift/CheLoginPage.js.map +0 -1
  150. package/dist/pageobjects/openshift/OcpLoginPage.js.map +0 -1
  151. package/pageobjects/openshift/CheLoginPage.ts +0 -42
package/README.md CHANGED
@@ -25,7 +25,7 @@ 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 **```'TestConstants.ts'```** file
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```)
@@ -37,7 +37,7 @@ Note: If there is any modifications in package.json, manually execute the `npm i
37
37
  export TS_SELENIUM_BASE_URL=<ingress-url> && \
38
38
  npm run test
39
39
  ```
40
- Also, environmental variables can be set in `TestConstants.ts` file.
40
+ Also, environmental variables can be set in files in "constants" folder.
41
41
 
42
42
  ## Docker launch
43
43
 
@@ -68,7 +68,7 @@ For running tests without docker, please perform next steps:**
68
68
  - link to devfile ( **```For successfull test passing, exactly provided devfile should be used```** )
69
69
  <https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml>
70
70
  - Provide the **```'TS_SELENIUM_BASE_URL'```** environment variable as described above
71
- - export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see TestConstants.ts)
71
+ - export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BaseTestConstants.ts)
72
72
  - perform command **```export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles```**
73
73
 
74
74
  ## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication
@@ -81,7 +81,7 @@ For running tests without docker, please perform next steps:**
81
81
  - export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
82
82
  - export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\>
83
83
  - export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\>
84
- - export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see TestConstants.ts)
84
+ - export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BaseTestConstants.ts)
85
85
 
86
86
  **Execute the npm command:**
87
87
  - perform command ```export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles```
@@ -16,7 +16,6 @@ import { TYPES, CLASSES } from './inversify.types';
16
16
  import { TestWorkspaceUtil } from '../utils/workspace/TestWorkspaceUtil';
17
17
  import { IOcpLoginPage } from '../pageobjects/login/interfaces/IOcpLoginPage';
18
18
  import { OcpUserLoginPage } from '../pageobjects/login/openshift/OcpUserLoginPage';
19
- import { Platform, TestConstants } from '../constants/TestConstants';
20
19
  import { ICheLoginPage } from '../pageobjects/login/interfaces/ICheLoginPage';
21
20
  import { RegularUserOcpCheLoginPage } from '../pageobjects/login/openshift/RegularUserOcpCheLoginPage';
22
21
  import { DriverHelper } from '../utils/DriverHelper';
@@ -24,8 +23,7 @@ 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';
@@ -44,6 +42,8 @@ import { OcpApplicationPage } from '../pageobjects/openshift/OcpApplicationPage'
44
42
  import { StringUtil } from '../utils/StringUtil';
45
43
  import { KubernetesLoginPage } from '../pageobjects/login/kubernetes/KubernetesLoginPage';
46
44
  import { DexLoginPage } from '../pageobjects/login/kubernetes/DexLoginPage';
45
+ import { OAuthConstants } from '../constants/OAuthConstants';
46
+ import { BaseTestConstants, Platform } from '../constants/BaseTestConstants';
47
47
 
48
48
  const e2eContainer: Container = new Container({ defaultScope: 'Transient' });
49
49
 
@@ -64,7 +64,6 @@ e2eContainer.bind<OcpMainPage>(CLASSES.OcpMainPage).to(OcpMainPage);
64
64
  e2eContainer.bind<OcpImportFromGitPage>(CLASSES.OcpImportFromGitPage).to(OcpImportFromGitPage);
65
65
  e2eContainer.bind<OcpApplicationPage>(CLASSES.OcpApplicationPage).to(OcpApplicationPage);
66
66
 
67
- e2eContainer.bind<CheLoginPage>(CLASSES.CheLoginPage).to(CheLoginPage);
68
67
  e2eContainer.bind<CheApiRequestHandler>(CLASSES.CheApiRequestHandler).to(CheApiRequestHandler);
69
68
  e2eContainer.bind<CreateWorkspace>(CLASSES.CreateWorkspace).to(CreateWorkspace);
70
69
  e2eContainer.bind<ProjectAndFileTests>(CLASSES.ProjectAndFileTests).to(ProjectAndFileTests);
@@ -74,8 +73,8 @@ e2eContainer.bind<ApiUrlResolver>(CLASSES.ApiUrlResolver).to(ApiUrlResolver);
74
73
  e2eContainer.bind<WorkspaceHandlingTests>(CLASSES.WorkspaceHandlingTests).to(WorkspaceHandlingTests);
75
74
  e2eContainer.bind<RedHatLoginPage>(CLASSES.RedHatLoginPage).to(RedHatLoginPage);
76
75
 
77
- TestConstants.TS_PLATFORM === Platform.OPENSHIFT ?
78
- TestConstants.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH ?
76
+ BaseTestConstants.TS_PLATFORM === Platform.OPENSHIFT ?
77
+ OAuthConstants.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH ?
79
78
  e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(RegularUserOcpCheLoginPage) :
80
79
  e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(OcpRedHatLoginPage) :
81
80
  e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(KubernetesLoginPage);
@@ -24,7 +24,6 @@ const CLASSES: any = {
24
24
  WorkspaceDetails: 'WorkspaceDetails',
25
25
  ScreenCatcher: 'ScreenCatcher',
26
26
  OcpLoginPage: 'OcpLoginPage',
27
- CheLoginPage: 'CheLoginPage',
28
27
  CheApiRequestHandler: 'CheApiRequestHandler',
29
28
  CreateWorkspace: 'CreateWorkspace',
30
29
  BrowserTabsUtil: 'BrowserTabsUtil',
@@ -1,6 +1,16 @@
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 { TestConstants } from '../constants/TestConstants';
13
+ import { TimeoutConstants } from '../constants/TimeoutConstants';
4
14
 
5
15
  module.exports = {
6
16
  timeout: 1200000,
@@ -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: TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
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 './constants/TestConstants';
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
+ };