@eclipse-che/che-e2e 7.74.0-dev-1d09cb7 → 7.74.0-dev-aace77a
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/.eslintignore +10 -0
- package/.eslintrc.js +197 -0
- package/.prettierignore +10 -0
- package/.prettierrc.json +10 -0
- package/CODE_STYLE.md +144 -0
- package/README.md +47 -47
- package/configs/inversify.config.ts +39 -14
- package/configs/inversify.types.ts +44 -30
- package/configs/mocharc.ts +21 -24
- package/constants/API_TEST_CONSTANTS.ts +67 -0
- package/constants/BASE_TEST_CONSTANTS.ts +80 -0
- package/constants/CHROME_DRIVER_CONSTANTS.ts +42 -0
- package/constants/FACTORY_TEST_CONSTANTS.ts +61 -0
- package/constants/MONACO_CONSTANTS.ts +25 -0
- package/constants/OAUTH_CONSTANTS.ts +67 -0
- package/constants/PLUGIN_TEST_CONSTANTS.ts +15 -0
- package/constants/REPORTER_CONSTANTS.ts +53 -0
- package/constants/TIMEOUT_CONSTANTS.ts +131 -0
- package/dist/configs/inversify.config.js +36 -9
- package/dist/configs/inversify.config.js.map +1 -1
- package/dist/configs/inversify.types.js +19 -5
- package/dist/configs/inversify.types.js.map +1 -1
- package/dist/configs/mocharc.js +13 -16
- package/dist/configs/mocharc.js.map +1 -1
- package/dist/constants/{APITestConstants.js → API_TEST_CONSTANTS.js} +12 -12
- package/dist/constants/API_TEST_CONSTANTS.js.map +1 -0
- package/dist/constants/{BaseTestConstants.js → BASE_TEST_CONSTANTS.js} +16 -16
- package/dist/constants/BASE_TEST_CONSTANTS.js.map +1 -0
- package/dist/constants/CHROME_DRIVER_CONSTANTS.js +36 -0
- package/dist/constants/CHROME_DRIVER_CONSTANTS.js.map +1 -0
- package/dist/constants/{FactoryTestConstants.js → FACTORY_TEST_CONSTANTS.js} +14 -13
- package/dist/constants/FACTORY_TEST_CONSTANTS.js.map +1 -0
- package/dist/constants/{MonacoConstants.js → MONACO_CONSTANTS.js} +7 -7
- package/dist/constants/MONACO_CONSTANTS.js.map +1 -0
- package/dist/constants/{OAuthConstants.js → OAUTH_CONSTANTS.js} +14 -14
- package/dist/constants/OAUTH_CONSTANTS.js.map +1 -0
- package/dist/constants/{PluginsTestConstants.js → PLUGIN_TEST_CONSTANTS.js} +7 -7
- package/dist/constants/PLUGIN_TEST_CONSTANTS.js.map +1 -0
- package/dist/constants/{ReporterConstants.js → REPORTER_CONSTANTS.js} +12 -12
- package/dist/constants/REPORTER_CONSTANTS.js.map +1 -0
- package/dist/constants/{TimeoutConstants.js → TIMEOUT_CONSTANTS.js} +24 -24
- package/dist/constants/TIMEOUT_CONSTANTS.js.map +1 -0
- package/dist/driver/ChromeDriver.js +12 -22
- package/dist/driver/ChromeDriver.js.map +1 -1
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +15 -15
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +20 -21
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +55 -60
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +58 -48
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/git-providers/OauthPage.js +22 -20
- package/dist/pageobjects/git-providers/OauthPage.js.map +1 -1
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js +26 -12
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js.map +1 -1
- package/dist/pageobjects/login/interfaces/ICheLoginPage.js +2 -2
- package/dist/pageobjects/login/interfaces/IOcpLoginPage.js +2 -2
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js +14 -14
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js.map +1 -1
- package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js +7 -7
- package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpLoginPage.js +24 -28
- package/dist/pageobjects/login/openshift/OcpLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js +13 -16
- package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpUserLoginPage.js +9 -9
- package/dist/pageobjects/login/openshift/OcpUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/RedHatLoginPage.js +19 -23
- package/dist/pageobjects/login/openshift/RedHatLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js +20 -19
- package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpApplicationPage.js +11 -11
- package/dist/pageobjects/openshift/OcpApplicationPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpImportFromGitPage.js +24 -24
- package/dist/pageobjects/openshift/OcpImportFromGitPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpMainPage.js +30 -30
- package/dist/pageobjects/openshift/OcpMainPage.js.map +1 -1
- package/dist/specs/MochaHooks.js +33 -27
- package/dist/specs/MochaHooks.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +17 -17
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/api/ContainerOverridesAPI.spec.js +8 -6
- package/dist/specs/api/ContainerOverridesAPI.spec.js.map +1 -1
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js +27 -24
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js.map +1 -1
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js +17 -17
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
- package/dist/specs/api/PodOverridesAPI.spec.js +10 -8
- package/dist/specs/api/PodOverridesAPI.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js +10 -10
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/Quarkus.spec.js +13 -13
- package/dist/specs/dashboard-samples/Quarkus.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js +52 -52
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js.map +1 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +23 -19
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
- package/dist/specs/factory/Factory.spec.js +38 -41
- package/dist/specs/factory/Factory.spec.js.map +1 -1
- package/dist/specs/factory/NoSetupRepoFactory.spec.js +52 -50
- package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
- package/dist/specs/factory/RefusedOAuthFactory.spec.js +49 -51
- package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
- package/dist/specs/miscellaneous/PredefinedNamespace.spec.js +45 -42
- package/dist/specs/miscellaneous/PredefinedNamespace.spec.js.map +1 -1
- package/dist/tests-library/LoginTests.js +13 -13
- package/dist/tests-library/LoginTests.js.map +1 -1
- package/dist/tests-library/ProjectAndFileTests.js +9 -7
- package/dist/tests-library/ProjectAndFileTests.js.map +1 -1
- package/dist/tests-library/WorkspaceHandlingTests.js +22 -19
- package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -1
- package/dist/utils/BrowserTabsUtil.js +21 -21
- package/dist/utils/BrowserTabsUtil.js.map +1 -1
- package/dist/utils/CheReporter.js +91 -65
- package/dist/utils/CheReporter.js.map +1 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js +34 -15
- package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
- package/dist/utils/DevfilesRegistryHelper.js +34 -18
- package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
- package/dist/utils/DriverHelper.js +73 -68
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/IContextParams.js +12 -0
- package/dist/utils/IContextParams.js.map +1 -0
- package/dist/utils/IKubernetesCommandLineToolsExecutor.js +3 -0
- package/dist/utils/IKubernetesCommandLineToolsExecutor.js.map +1 -0
- package/dist/utils/KubernetesCommandLineToolsExecutor.js +146 -107
- package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
- package/dist/utils/Logger.js +18 -19
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ScreenCatcher.js +26 -16
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/ShellExecutor.js +29 -9
- package/dist/utils/ShellExecutor.js.map +1 -1
- package/dist/utils/StringUtil.js +19 -9
- package/dist/utils/StringUtil.js.map +1 -1
- package/dist/utils/request-handlers/CheApiRequestHandler.js +29 -29
- package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js +12 -8
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
- package/dist/utils/request-handlers/headers/IAuthorizationHeaderHandler.js +2 -2
- package/dist/utils/workspace/ApiUrlResolver.js +5 -5
- package/dist/utils/workspace/ApiUrlResolver.js.map +1 -1
- package/dist/utils/workspace/ITestWorkspaceUtil.js +2 -2
- package/dist/utils/workspace/TestWorkspaceUtil.js +25 -23
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/dist/utils/workspace/WorkspaceStatus.js +2 -2
- package/dist/utils/workspace/WorkspaceStatus.js.map +1 -1
- package/driver/ChromeDriver.ts +45 -58
- package/driver/IDriver.ts +3 -3
- package/index.ts +11 -9
- package/package.json +59 -49
- package/pageobjects/dashboard/CreateWorkspace.ts +65 -55
- package/pageobjects/dashboard/Dashboard.ts +100 -100
- package/pageobjects/dashboard/Workspaces.ts +210 -186
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +153 -131
- package/pageobjects/git-providers/OauthPage.ts +177 -166
- package/pageobjects/ide/CheCodeLocatorLoader.ts +51 -46
- package/pageobjects/login/interfaces/ICheLoginPage.ts +3 -3
- package/pageobjects/login/interfaces/IOcpLoginPage.ts +3 -3
- package/pageobjects/login/kubernetes/DexLoginPage.ts +31 -30
- package/pageobjects/login/kubernetes/KubernetesLoginPage.ts +15 -14
- package/pageobjects/login/openshift/OcpLoginPage.ts +51 -56
- package/pageobjects/login/openshift/OcpRedHatLoginPage.ts +27 -27
- package/pageobjects/login/openshift/OcpUserLoginPage.ts +15 -18
- package/pageobjects/login/openshift/RedHatLoginPage.ts +49 -46
- package/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts +43 -34
- package/pageobjects/openshift/OcpApplicationPage.ts +21 -19
- package/pageobjects/openshift/OcpImportFromGitPage.ts +68 -68
- package/pageobjects/openshift/OcpMainPage.ts +69 -69
- package/specs/MochaHooks.ts +59 -52
- package/specs/SmokeTest.spec.ts +47 -45
- package/specs/api/ContainerOverridesAPI.spec.ts +39 -26
- package/specs/api/DevfileAcceptanceTestAPI.spec.ts +110 -97
- package/specs/api/EmptyWorkspaceAPI.spec.ts +67 -58
- package/specs/api/PodOverridesAPI.spec.ts +48 -34
- package/specs/dashboard-samples/EmptyWorkspace.spec.ts +36 -36
- package/specs/dashboard-samples/Quarkus.spec.ts +41 -40
- package/specs/dashboard-samples/RecommendedExtensions.spec.ts +202 -183
- package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +85 -75
- package/specs/factory/Factory.spec.ts +184 -178
- package/specs/factory/NoSetupRepoFactory.spec.ts +233 -219
- package/specs/factory/RefusedOAuthFactory.spec.ts +223 -211
- package/specs/miscellaneous/PredefinedNamespace.spec.ts +70 -64
- package/tests-library/LoginTests.ts +34 -32
- package/tests-library/ProjectAndFileTests.ts +21 -18
- package/tests-library/WorkspaceHandlingTests.ts +98 -89
- package/tsconfig.json +15 -15
- package/utils/BrowserTabsUtil.ts +78 -74
- package/utils/CheReporter.ts +159 -157
- package/utils/DevWorkspaceConfigurationHelper.ts +63 -69
- package/utils/DevfilesRegistryHelper.ts +71 -57
- package/utils/DriverHelper.ts +728 -700
- package/utils/IContextParams.ts +26 -0
- package/utils/IKubernetesCommandLineToolsExecutor.ts +42 -0
- package/utils/KubernetesCommandLineToolsExecutor.ts +231 -183
- package/utils/Logger.ts +102 -125
- package/utils/ScreenCatcher.ts +57 -46
- package/utils/ShellExecutor.ts +23 -12
- package/utils/StringUtil.ts +49 -36
- package/utils/request-handlers/CheApiRequestHandler.ts +91 -88
- package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +32 -21
- package/utils/request-handlers/headers/IAuthorizationHeaderHandler.ts +3 -3
- package/utils/workspace/ApiUrlResolver.ts +31 -26
- package/utils/workspace/ITestWorkspaceUtil.ts +31 -31
- package/utils/workspace/TestWorkspaceUtil.ts +152 -145
- package/utils/workspace/WorkspaceStatus.ts +5 -5
- package/constants/APITestConstants.ts +0 -57
- package/constants/BaseTestConstants.ts +0 -68
- package/constants/ChromeDriverConstants.ts +0 -46
- package/constants/FactoryTestConstants.ts +0 -51
- package/constants/MonacoConstants.ts +0 -22
- package/constants/OAuthConstants.ts +0 -57
- package/constants/PluginsTestConstants.ts +0 -15
- package/constants/ReporterConstants.ts +0 -45
- package/constants/TimeoutConstants.ts +0 -113
- package/dist/constants/APITestConstants.js.map +0 -1
- package/dist/constants/BaseTestConstants.js.map +0 -1
- package/dist/constants/ChromeDriverConstants.js +0 -44
- package/dist/constants/ChromeDriverConstants.js.map +0 -1
- package/dist/constants/FactoryTestConstants.js.map +0 -1
- package/dist/constants/MonacoConstants.js.map +0 -1
- package/dist/constants/OAuthConstants.js.map +0 -1
- package/dist/constants/PluginsTestConstants.js.map +0 -1
- package/dist/constants/ReporterConstants.js.map +0 -1
- package/dist/constants/TimeoutConstants.js.map +0 -1
- package/tslint.json +0 -126
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/** *******************************************************************
|
|
2
|
+
* copyright (c) 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
|
+
module.exports = {
|
|
11
|
+
env: {
|
|
12
|
+
browser: true,
|
|
13
|
+
es6: true,
|
|
14
|
+
node: true
|
|
15
|
+
},
|
|
16
|
+
extends: ['plugin:@typescript-eslint/recommended-type-checked', 'prettier'],
|
|
17
|
+
parser: '@typescript-eslint/parser',
|
|
18
|
+
parserOptions: {
|
|
19
|
+
project: 'tsconfig.json',
|
|
20
|
+
sourceType: 'module'
|
|
21
|
+
},
|
|
22
|
+
plugins: ['eslint-plugin-jsdoc', '@typescript-eslint', '@typescript-eslint/tslint', 'header', 'prettier'],
|
|
23
|
+
root: true,
|
|
24
|
+
rules: {
|
|
25
|
+
'prettier/prettier': 'error',
|
|
26
|
+
'@typescript-eslint/dot-notation': 'error',
|
|
27
|
+
'@typescript-eslint/no-misused-promises': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
checksVoidReturn: {
|
|
31
|
+
arguments: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
'@typescript-eslint/member-ordering': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
default: [
|
|
39
|
+
'static-field',
|
|
40
|
+
'public-field',
|
|
41
|
+
'instance-field',
|
|
42
|
+
'protected-field',
|
|
43
|
+
'private-field',
|
|
44
|
+
'abstract-field',
|
|
45
|
+
'constructor',
|
|
46
|
+
'public-static-method',
|
|
47
|
+
'protected-static-method',
|
|
48
|
+
'private-static-method',
|
|
49
|
+
'public-method',
|
|
50
|
+
'protected-method',
|
|
51
|
+
'private-method'
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
allowExpressions: false,
|
|
59
|
+
allowTypedFunctionExpressions: false,
|
|
60
|
+
allowHigherOrderFunctions: false,
|
|
61
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
62
|
+
allowConciseArrowFunctionExpressionsStartingWithVoid: true
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
'@typescript-eslint/explicit-module-boundary-types': [
|
|
66
|
+
'error',
|
|
67
|
+
{
|
|
68
|
+
allowArgumentsExplicitlyTypedAsAny: true,
|
|
69
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
|
70
|
+
allowHigherOrderFunctions: false,
|
|
71
|
+
allowTypedFunctionExpressions: false
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
'@typescript-eslint/member-delimiter-style': 'error',
|
|
75
|
+
'@typescript-eslint/naming-convention': [
|
|
76
|
+
'error',
|
|
77
|
+
{
|
|
78
|
+
selector: 'variable',
|
|
79
|
+
format: ['camelCase', 'UPPER_CASE'],
|
|
80
|
+
leadingUnderscore: 'forbid',
|
|
81
|
+
trailingUnderscore: 'forbid'
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
'@typescript-eslint/no-empty-function': 'error',
|
|
85
|
+
'@typescript-eslint/no-parameter-properties': 'off',
|
|
86
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
87
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
88
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
89
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
90
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
|
|
91
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
92
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
93
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
94
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
95
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
96
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
97
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
98
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
|
99
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
100
|
+
'@typescript-eslint/quotes': ['error', 'single'],
|
|
101
|
+
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
102
|
+
'@typescript-eslint/typedef': [
|
|
103
|
+
'error',
|
|
104
|
+
{
|
|
105
|
+
parameter: true,
|
|
106
|
+
propertyDeclaration: true,
|
|
107
|
+
variableDeclaration: true,
|
|
108
|
+
memberVariableDeclaration: true
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
'brace-style': ['error', '1tbs'],
|
|
112
|
+
'capitalized-comments': ['error', 'never'],
|
|
113
|
+
'comma-dangle': ['error', 'never'],
|
|
114
|
+
curly: 'error',
|
|
115
|
+
'dot-notation': 'off',
|
|
116
|
+
'eol-last': 'error',
|
|
117
|
+
eqeqeq: ['error', 'smart'],
|
|
118
|
+
'guard-for-in': 'error',
|
|
119
|
+
'id-denylist': 'off',
|
|
120
|
+
'id-match': 'off',
|
|
121
|
+
indent: 'off',
|
|
122
|
+
'jsdoc/check-alignment': 'error',
|
|
123
|
+
'jsdoc/check-indentation': 'error',
|
|
124
|
+
'max-len': [
|
|
125
|
+
'off',
|
|
126
|
+
{
|
|
127
|
+
code: 140
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
'no-bitwise': 'error',
|
|
131
|
+
'no-caller': 'error',
|
|
132
|
+
'no-console': [
|
|
133
|
+
'error',
|
|
134
|
+
{
|
|
135
|
+
allow: [
|
|
136
|
+
'log',
|
|
137
|
+
'warn',
|
|
138
|
+
'dir',
|
|
139
|
+
'timeLog',
|
|
140
|
+
'assert',
|
|
141
|
+
'clear',
|
|
142
|
+
'count',
|
|
143
|
+
'countReset',
|
|
144
|
+
'group',
|
|
145
|
+
'groupEnd',
|
|
146
|
+
'table',
|
|
147
|
+
'dirxml',
|
|
148
|
+
'error',
|
|
149
|
+
'groupCollapsed',
|
|
150
|
+
'Console',
|
|
151
|
+
'profile',
|
|
152
|
+
'profileEnd',
|
|
153
|
+
'timeStamp',
|
|
154
|
+
'context'
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
'header/header': [
|
|
159
|
+
'error',
|
|
160
|
+
'block',
|
|
161
|
+
[
|
|
162
|
+
'* *******************************************************************',
|
|
163
|
+
{ pattern: ' \\* copyright \\(c\\) [0-9-]{4,9} Red Hat, Inc\\.', template: '* copyright (c) 2023 Red Hat, Inc.' },
|
|
164
|
+
' *',
|
|
165
|
+
' * This program and the accompanying materials are made',
|
|
166
|
+
' * available under the terms of the Eclipse Public License 2.0',
|
|
167
|
+
' * which is available at https://www.eclipse.org/legal/epl-2.0/',
|
|
168
|
+
' *',
|
|
169
|
+
' * SPDX-License-Identifier: EPL-2.0',
|
|
170
|
+
' *********************************************************************'
|
|
171
|
+
]
|
|
172
|
+
],
|
|
173
|
+
'no-debugger': 'error',
|
|
174
|
+
'no-empty': 'error',
|
|
175
|
+
'no-empty-function': 'off',
|
|
176
|
+
'no-eval': 'error',
|
|
177
|
+
'no-fallthrough': 'error',
|
|
178
|
+
'no-new-wrappers': 'error',
|
|
179
|
+
'no-redeclare': 'error',
|
|
180
|
+
'no-trailing-spaces': 'error',
|
|
181
|
+
'no-underscore-dangle': 'off',
|
|
182
|
+
'no-unused-expressions': 'off',
|
|
183
|
+
'no-unused-labels': 'error',
|
|
184
|
+
'no-unused-vars': 'off',
|
|
185
|
+
'no-use-before-define': 'off',
|
|
186
|
+
quotes: 'off',
|
|
187
|
+
radix: 'error',
|
|
188
|
+
semi: 'off',
|
|
189
|
+
'spaced-comment': [
|
|
190
|
+
'error',
|
|
191
|
+
'always',
|
|
192
|
+
{
|
|
193
|
+
markers: ['/']
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
};
|
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
package/CODE_STYLE.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Coding Standards and Conventions
|
|
2
|
+
|
|
3
|
+
### Introducing
|
|
4
|
+
|
|
5
|
+
#### Why are coding standards important?
|
|
6
|
+
|
|
7
|
+
Coding standards offer several advantages, including:
|
|
8
|
+
|
|
9
|
+
1. Increase Code Quality: By adhering to coding standards, developers can create code that is more secure, efficient,
|
|
10
|
+
maintainable, and uniform. This, in turn, can result in fewer errors and improved overall performance.
|
|
11
|
+
|
|
12
|
+
2. Improved Readability and Maintainability: Coding standards contribute to code that is more comprehensible and easier
|
|
13
|
+
to maintain. Consistently formatted code aids other developers in comprehending and modifying it, saving time and
|
|
14
|
+
reducing the likelihood of introducing errors.
|
|
15
|
+
|
|
16
|
+
3. Accelerated Development: The adherence to coding standards can expedite the development process. When developers
|
|
17
|
+
adhere to a predefined set of guidelines, they can produce code more swiftly and with fewer mistakes. Additionally,
|
|
18
|
+
uniform code formatting facilitates the identification and resolution of issues.
|
|
19
|
+
|
|
20
|
+
4. Better Scalability: Coding standards facilitate the creation of scalable code, simplifying the incorporation of new
|
|
21
|
+
features or updates. Consistent coding practices also streamline code maintenance as the codebase expands.
|
|
22
|
+
|
|
23
|
+
5. Elevated Collaboration and Communication: Uniform guidelines encourage better understanding and manipulation of code
|
|
24
|
+
written by fellow developers. This fosters smoother teamwork and facilitates the sharing of code.
|
|
25
|
+
|
|
26
|
+
6. Consistency Across Projects: The adoption of coding standards guarantees a consistent coding approach across various
|
|
27
|
+
projects. This simplifies the task of upholding code quality, transitioning between tasks, and fostering
|
|
28
|
+
collaborative work.
|
|
29
|
+
|
|
30
|
+
### Automated tools
|
|
31
|
+
|
|
32
|
+
Automated lint checking and code format performs with ESLint and Prettier tools before every commit using Husky
|
|
33
|
+
pre-commit hook.
|
|
34
|
+
Full set of rules can be found:
|
|
35
|
+
|
|
36
|
+
- [.eslintrc](.eslintrc.js)
|
|
37
|
+
- [.prettierrc](.prettierrc.json)
|
|
38
|
+
|
|
39
|
+
### Preferable code style
|
|
40
|
+
|
|
41
|
+
1. Page-object and util classes
|
|
42
|
+
|
|
43
|
+
1. ✔ Class declaration using dependency injection (inversify library)
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
@injectable()
|
|
47
|
+
export class BrowserTabsUtil {
|
|
48
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
2. Public methods
|
|
52
|
+
|
|
53
|
+
- ✔ Declare public methods without "public "keyword
|
|
54
|
+
- ✔ Add Logger.debug() inside method to log its name (with optional message)
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
async switchToWindow(windowHandle: string): Promise<void> {
|
|
58
|
+
Logger.debug(); // logs BrowserUtils.sswitchToWindow
|
|
59
|
+
|
|
60
|
+
await this.driverHelper.getDriver().switchTo().window(windowHandle);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. Locators
|
|
65
|
+
|
|
66
|
+
- ✔ For static locators - private static readonly fields type of By
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
private static readonly FACTORY_URL_LOCATOR: By = By.xpath('//input[@id="git-repo-url"]');
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- ✔ For dynamic locators - private methods which returns By
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
private getExpandedActionsLocator(workspaceName: string): By {
|
|
76
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//button[@aria-label='Actions' and @aria-expanded='true']`);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- ✗ Avoid to declare locators as constant in methods
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
async waitTitleContains(expectedText: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise<void> {
|
|
84
|
+
Logger.debug();
|
|
85
|
+
|
|
86
|
+
const pageTitleLocator: By = By.xpath(`//h1[contains(text(), '${expectedText}')]`);
|
|
87
|
+
await this.driverHelper.waitVisibility(pageTitleLocator, timeout);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Page object sample:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
import { e2eContainer } from '../../configs/inversify.config';
|
|
95
|
+
|
|
96
|
+
@injectable()
|
|
97
|
+
export class OcpMainPage {
|
|
98
|
+
|
|
99
|
+
private static readonly MAIN_PAGE_HEADER_LOCATOR: By = By.id('page-main-header');
|
|
100
|
+
private static readonly SELECT_ROLE_BUTTON_LOCATOR: By = By.xpath('//*[@data-test-id="perspective-switcher-toggle"]');
|
|
101
|
+
|
|
102
|
+
constructor(
|
|
103
|
+
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
104
|
+
|
|
105
|
+
async waitOpenMainPage(): Promise<void> {
|
|
106
|
+
Logger.debug();
|
|
107
|
+
|
|
108
|
+
await this.driverHelper.waitVisibility(OcpMainPage.MAIN_PAGE_HEADER_LOCATOR, TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private getProjectDropdownItemLocator(projectName: string): By {
|
|
112
|
+
return By.xpath(`//button//*[text()="${projectName}"]`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
2. Mocha framework
|
|
119
|
+
|
|
120
|
+
- ✔ TDD framework (`suit()`, `test()`)
|
|
121
|
+
- ✔ Inject class instances, declare all test data inside test `suit()` function to avoid unnecessary code execution if test suit will not be run
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
suite('name', function(): void {
|
|
125
|
+
const webCheCodeLocators: Locators = e2eContainer.get(CLASSES.CheCodeLocatorLoader);
|
|
126
|
+
// test specific data
|
|
127
|
+
const gitImportReference: string = 'pipeline';
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- ✗ Don`t use arrow functions in test declaration https://mochajs.org/#arrow-functions
|
|
131
|
+
- ✔ Specs which don`t use browser should have API in name ending (like EmptyWorkspaceAPI.spec)
|
|
132
|
+
- ✗ Don\`t create scripts in package.json for each test. Instead of it use [dynamic config](configs/mocharc.ts), `mocha --spec` or `mocha --grep` flags to run specific test.
|
|
133
|
+
- ✔ Use test [./constants](constants) to make test flexible
|
|
134
|
+
|
|
135
|
+
3. Packages
|
|
136
|
+
|
|
137
|
+
1. Add packages as dev dependencies
|
|
138
|
+
2. If any changes re-create package-lock.json before push
|
|
139
|
+
|
|
140
|
+
4. Comments
|
|
141
|
+
1. If some code commented or added as workaround mark it as `//todo` with number of issue to get possibility to find it quickly
|
|
142
|
+
```
|
|
143
|
+
// todo commented due to issue crw-1010
|
|
144
|
+
```
|
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
|
|
2
1
|
# Module for launch E2E tests related to Che 7
|
|
3
2
|
|
|
4
3
|
## Requirements
|
|
5
4
|
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
5
|
+
- node 16.x
|
|
6
|
+
- "Chrome" browser 114.x or later
|
|
7
|
+
- deployed Che 7 with accessible URL
|
|
9
8
|
|
|
10
9
|
## Before launch
|
|
11
10
|
|
|
12
11
|
**Perform commands:**
|
|
13
12
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
13
|
+
- `export TS_SELENIUM_BASE_URL=<Che7 URL>`
|
|
14
|
+
- `npm ci`
|
|
16
15
|
|
|
17
16
|
Note: If there is any modifications in package.json, manually execute the `npm install` to update the package-lock.json. So that errors can be avoided while executing npm ci
|
|
18
17
|
|
|
19
18
|
## Default launch
|
|
20
19
|
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- Provide connection credentials:
|
|
21
|
+
- `export TS_SELENIUM_OCP_USERNAME=<username>`
|
|
22
|
+
- `export TS_SELENIUM_OCP_PASSWORD=<password>`
|
|
23
|
+
- `npm run test`
|
|
25
24
|
|
|
26
25
|
## Custom launch
|
|
27
26
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
- Use environment variables which described in the "constants" folder
|
|
28
|
+
- 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'`
|
|
29
|
+
- To test one specification export file name as `export USERSTORY=<spec-file-name-without-extension> && npm run test` (example: `-e USERSTORY=Quarkus`)
|
|
30
|
+
- 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`)
|
|
31
|
+
- 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:
|
|
32
|
+
```
|
|
33
|
+
export TS_PLATFORM=kubernetes && \
|
|
34
|
+
export TS_SELENIUM_K8S_USERNAME=<username> && \
|
|
35
|
+
export TS_SELENIUM_K8S_PASSWORD=<password> && \
|
|
36
|
+
export TS_SELENIUM_BASE_URL=<ingress-url> && \
|
|
37
|
+
npm run test
|
|
38
|
+
```
|
|
39
|
+
Also, environmental variables can be set in files in "constants" folder.
|
|
40
|
+
|
|
42
41
|
## Docker launch
|
|
43
42
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
43
|
+
- open terminal and go to the "e2e" directory
|
|
44
|
+
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
|
|
45
|
+
- run command `"npm run test-docker"`
|
|
47
46
|
|
|
48
47
|
## Docker launch with changed tests
|
|
49
48
|
|
|
50
49
|
**For launching tests with local changes perform next steps:**
|
|
51
50
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
51
|
+
- open terminal and go to the "e2e" directory
|
|
52
|
+
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
|
|
53
|
+
- run command `"npm run test-docker-mount-e2e"`
|
|
55
54
|
|
|
56
55
|
## Debug docker launch
|
|
57
56
|
|
|
58
|
-
The
|
|
57
|
+
The `'eclipse/che-e2e'` docker image has VNC server installed inside. For connecting use `'0.0.0.0:5920'` address.
|
|
59
58
|
|
|
60
59
|
## The "Happy Path" scenario launching
|
|
61
60
|
|
|
62
61
|
**The easiest way to do that is to perform steps which are described in the "Docker launch" paragraph.
|
|
63
62
|
For running tests without docker, please perform next steps:**
|
|
64
63
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
64
|
+
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse-che/che-server/blob/HEAD/deploy/kubernetes/README.md>
|
|
65
|
+
- Create workspace by using 'Chectl' and devfile
|
|
66
|
+
- link to 'Chectl' manual <https://github.com/che-incubator/chectl#chectl-workspacestart>
|
|
67
|
+
- link to devfile ( **`For successfull test passing, exactly provided devfile should be used`** )
|
|
68
|
+
<https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml>
|
|
69
|
+
- Provide the **`'TS_SELENIUM_BASE_URL'`** environment variable as described above
|
|
70
|
+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
|
|
71
|
+
- perform command **`export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`**
|
|
73
72
|
|
|
74
73
|
## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication
|
|
75
74
|
|
|
76
75
|
**Setup next environment variables:**
|
|
77
76
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
77
|
+
- export TS_SELENIUM_BASE_URL=\<Che-URL\>
|
|
78
|
+
- export TS_SELENIUM_OCP_USERNAME=\<cluster-username\>
|
|
79
|
+
- export TS_SELENIUM_OCP_PASSWORD=\<cluster-password\>
|
|
80
|
+
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
|
|
81
|
+
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\>
|
|
82
|
+
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\>
|
|
83
|
+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
|
|
85
84
|
|
|
86
85
|
**Execute the npm command:**
|
|
87
|
-
|
|
86
|
+
|
|
87
|
+
- perform command `export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/** *******************************************************************
|
|
2
|
+
* copyright (c) 2019-2023 Red Hat, Inc.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made
|
|
5
5
|
* available under the terms of the Eclipse Public License 2.0
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
**********************************************************************/
|
|
10
10
|
|
|
11
11
|
import 'reflect-metadata';
|
|
12
|
-
import { Container } from 'inversify';
|
|
12
|
+
import { Container, decorate, injectable, unmanaged } from 'inversify';
|
|
13
13
|
import { IDriver } from '../driver/IDriver';
|
|
14
14
|
import { ChromeDriver } from '../driver/ChromeDriver';
|
|
15
|
-
import { CLASSES, TYPES } from './inversify.types';
|
|
15
|
+
import { CLASSES, EXTERNAL_CLASSES, TYPES } 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';
|
|
@@ -42,10 +42,23 @@ import { OcpApplicationPage } from '../pageobjects/openshift/OcpApplicationPage'
|
|
|
42
42
|
import { StringUtil } from '../utils/StringUtil';
|
|
43
43
|
import { KubernetesLoginPage } from '../pageobjects/login/kubernetes/KubernetesLoginPage';
|
|
44
44
|
import { DexLoginPage } from '../pageobjects/login/kubernetes/DexLoginPage';
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
45
|
+
import { OAUTH_CONSTANTS } from '../constants/OAUTH_CONSTANTS';
|
|
46
|
+
import { BASE_TEST_CONSTANTS, Platform } from '../constants/BASE_TEST_CONSTANTS';
|
|
47
|
+
import { CheCodeLocatorLoader } from '../pageobjects/ide/CheCodeLocatorLoader';
|
|
48
|
+
import { LocatorLoader } from 'monaco-page-objects/out/locators/loader';
|
|
49
|
+
import { OauthPage } from '../pageobjects/git-providers/OauthPage';
|
|
50
|
+
import { DevfilesRegistryHelper } from '../utils/DevfilesRegistryHelper';
|
|
51
|
+
import { Main as Generator } from '@eclipse-che/che-devworkspace-generator/lib/main';
|
|
52
|
+
import { ContainerTerminal, KubernetesCommandLineToolsExecutor } from '../utils/KubernetesCommandLineToolsExecutor';
|
|
53
|
+
import { ShellExecutor } from '../utils/ShellExecutor';
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
decorate(injectable(), Generator);
|
|
56
|
+
decorate(injectable(), LocatorLoader);
|
|
57
|
+
decorate(unmanaged(), LocatorLoader, 0);
|
|
58
|
+
decorate(unmanaged(), LocatorLoader, 1);
|
|
59
|
+
decorate(unmanaged(), LocatorLoader, 2);
|
|
60
|
+
|
|
61
|
+
const e2eContainer: Container = new Container({ defaultScope: 'Transient', skipBaseClassChecks: true });
|
|
49
62
|
|
|
50
63
|
e2eContainer.bind<IDriver>(TYPES.Driver).to(ChromeDriver).inSingletonScope();
|
|
51
64
|
e2eContainer.bind<ITestWorkspaceUtil>(TYPES.WorkspaceUtil).to(TestWorkspaceUtil);
|
|
@@ -59,11 +72,12 @@ e2eContainer.bind<WorkspaceDetails>(CLASSES.WorkspaceDetails).to(WorkspaceDetail
|
|
|
59
72
|
e2eContainer.bind<ScreenCatcher>(CLASSES.ScreenCatcher).to(ScreenCatcher);
|
|
60
73
|
e2eContainer.bind<OcpLoginPage>(CLASSES.OcpLoginPage).to(OcpLoginPage);
|
|
61
74
|
e2eContainer.bind<DexLoginPage>(CLASSES.DexLoginPage).to(DexLoginPage);
|
|
62
|
-
|
|
75
|
+
e2eContainer.bind<CheCodeLocatorLoader>(CLASSES.CheCodeLocatorLoader).to(CheCodeLocatorLoader);
|
|
76
|
+
e2eContainer.bind<LocatorLoader>(CLASSES.LocatorLoader).to(LocatorLoader);
|
|
77
|
+
e2eContainer.bind<OauthPage>(CLASSES.OauthPage).to(OauthPage);
|
|
63
78
|
e2eContainer.bind<OcpMainPage>(CLASSES.OcpMainPage).to(OcpMainPage);
|
|
64
79
|
e2eContainer.bind<OcpImportFromGitPage>(CLASSES.OcpImportFromGitPage).to(OcpImportFromGitPage);
|
|
65
80
|
e2eContainer.bind<OcpApplicationPage>(CLASSES.OcpApplicationPage).to(OcpApplicationPage);
|
|
66
|
-
|
|
67
81
|
e2eContainer.bind<CheApiRequestHandler>(CLASSES.CheApiRequestHandler).to(CheApiRequestHandler);
|
|
68
82
|
e2eContainer.bind<CreateWorkspace>(CLASSES.CreateWorkspace).to(CreateWorkspace);
|
|
69
83
|
e2eContainer.bind<ProjectAndFileTests>(CLASSES.ProjectAndFileTests).to(ProjectAndFileTests);
|
|
@@ -72,11 +86,22 @@ e2eContainer.bind<StringUtil>(CLASSES.StringUtil).to(StringUtil);
|
|
|
72
86
|
e2eContainer.bind<ApiUrlResolver>(CLASSES.ApiUrlResolver).to(ApiUrlResolver);
|
|
73
87
|
e2eContainer.bind<WorkspaceHandlingTests>(CLASSES.WorkspaceHandlingTests).to(WorkspaceHandlingTests);
|
|
74
88
|
e2eContainer.bind<RedHatLoginPage>(CLASSES.RedHatLoginPage).to(RedHatLoginPage);
|
|
89
|
+
e2eContainer.bind<DevfilesRegistryHelper>(CLASSES.DevfilesRegistryHelper).to(DevfilesRegistryHelper);
|
|
90
|
+
e2eContainer.bind<KubernetesCommandLineToolsExecutor>(CLASSES.KubernetesCommandLineToolsExecutor).to(KubernetesCommandLineToolsExecutor);
|
|
91
|
+
e2eContainer.bind<ShellExecutor>(CLASSES.ShellExecutor).to(ShellExecutor);
|
|
92
|
+
e2eContainer.bind<ContainerTerminal>(CLASSES.ContainerTerminal).to(ContainerTerminal);
|
|
93
|
+
|
|
94
|
+
e2eContainer.bind<Generator>(EXTERNAL_CLASSES.Generator).to(Generator);
|
|
95
|
+
e2eContainer.bind<LocatorLoader>(EXTERNAL_CLASSES.LocatorLoader).to(LocatorLoader);
|
|
75
96
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
97
|
+
if (BASE_TEST_CONSTANTS.TS_PLATFORM === Platform.OPENSHIFT) {
|
|
98
|
+
if (OAUTH_CONSTANTS.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH) {
|
|
99
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(RegularUserOcpCheLoginPage);
|
|
100
|
+
} else {
|
|
101
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(OcpRedHatLoginPage);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
e2eContainer.bind<ICheLoginPage>(TYPES.CheLogin).to(KubernetesLoginPage);
|
|
105
|
+
}
|
|
81
106
|
|
|
82
107
|
export { e2eContainer };
|