@eclipse-che/che-e2e
Advanced tools
Comparing version 7.96.0 to 7.97.0-next-34e2649
@@ -36,4 +36,4 @@ # Coding Standards and Conventions | ||
- [.eslintrc](.eslintrc.js) | ||
- [.prettierrc](.prettierrc.json) | ||
- [.eslintrc](.eslintrc.js) | ||
- [.prettierrc](.prettierrc.json) | ||
@@ -40,0 +40,0 @@ ### Preferable code style |
@@ -7,3 +7,3 @@ "use strict"; | ||
/** ******************************************************************* | ||
* copyright (c) 2023 Red Hat, Inc. | ||
* copyright (c) 2024 Red Hat, Inc. | ||
* | ||
@@ -33,2 +33,3 @@ * This program and the accompanying materials are made | ||
let devfileContent = ''; | ||
let dwtName = ''; | ||
suiteSetup(`Prepare login ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function () { | ||
@@ -42,2 +43,3 @@ kubernetesCommandLineToolsExecutor.loginToOcp(); | ||
const editorDevfileContent = devfilesRegistryHelper.obtainCheDevFileEditorFromCheConfigMap('editors-definitions'); | ||
dwtName = yaml_1.default.parse(devfileContent).metadata.name; | ||
const uniqName = yaml_1.default.parse(devfileContent).metadata.name + randomPref; | ||
@@ -68,6 +70,6 @@ kubernetesCommandLineToolsExecutor.workspaceName = uniqName; | ||
}); | ||
suiteTeardown('Delete workspace', function () { | ||
kubernetesCommandLineToolsExecutor.deleteDevWorkspace(); | ||
suiteTeardown('Delete DevWorkspace', function () { | ||
kubernetesCommandLineToolsExecutor.deleteDevWorkspace(dwtName); | ||
}); | ||
}); | ||
//# sourceMappingURL=PhpDevFileAPI.spec.js.map |
@@ -115,7 +115,14 @@ "use strict"; | ||
} | ||
deleteDevWorkspace() { | ||
Logger_1.Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' workspace`); | ||
deleteDevWorkspace(dwTemplateName) { | ||
Logger_1.Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' devWorkspace`); | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} patch dw ${this.workspaceName} -n ${this.namespace} -p '{ "metadata": { "finalizers": null }}' --type merge || true`); | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dw ${this.workspaceName} -n ${this.namespace} || true`); | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${this.workspaceName} -n ${this.namespace} || true`); | ||
if (dwTemplateName === undefined) { | ||
Logger_1.Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' devWorkspaceTemplate`); | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${this.workspaceName} -n ${this.namespace} || true`); | ||
} | ||
else { | ||
Logger_1.Logger.debug(`${this.kubernetesCommandLineTool} - delete '${dwTemplateName}' devWorkspaceTemplate`); | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${dwTemplateName} -n ${this.namespace} || true`); | ||
} | ||
} | ||
@@ -122,0 +129,0 @@ applyAndWaitDevWorkspace(yamlConfiguration) { |
{ | ||
"name": "@eclipse-che/che-e2e", | ||
"version": "7.96.0", | ||
"version": "7.97.0-next-34e2649", | ||
"description": "", | ||
@@ -69,4 +69,3 @@ "main": "dist/index.js", | ||
"inversify": "6.0.1", | ||
"reflect-metadata": "0.1.13", | ||
"@eclipse-che/che-devworkspace-generator": "7.96.0" | ||
"reflect-metadata": "0.1.13" | ||
}, | ||
@@ -73,0 +72,0 @@ "resolutions": { |
@@ -5,5 +5,5 @@ # Module for launch E2E tests related to Che 7 | ||
- node 16.x | ||
- "Chrome" browser 114.x or later | ||
- deployed Che 7 with accessible URL | ||
- node 16.x | ||
- "Chrome" browser 114.x or later | ||
- deployed Che 7 with accessible URL | ||
@@ -14,4 +14,4 @@ ## Before launch | ||
- `export TS_SELENIUM_BASE_URL=<Che7 URL>` | ||
- `npm ci` | ||
- `export TS_SELENIUM_BASE_URL=<Che7 URL>` | ||
- `npm ci` | ||
@@ -22,14 +22,14 @@ 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 | ||
- Provide connection credentials: | ||
- `export TS_SELENIUM_OCP_USERNAME=<username>` | ||
- `export TS_SELENIUM_OCP_PASSWORD=<password>` | ||
- `npm run test` | ||
- Provide connection credentials: | ||
- `export TS_SELENIUM_OCP_USERNAME=<username>` | ||
- `export TS_SELENIUM_OCP_PASSWORD=<password>` | ||
- `npm run test` | ||
## Custom launch | ||
- Use environment variables which described in the "constants" folder | ||
- 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'` | ||
- To test one specification export file name as `export USERSTORY=<spec-file-name-without-extension> && npm run test` (example: `-e USERSTORY=Quarkus`) | ||
- 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`) | ||
- 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: | ||
- Use environment variables which described in the "constants" folder | ||
- 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'` | ||
- To test one specification export file name as `export USERSTORY=<spec-file-name-without-extension> && npm run test` (example: `-e USERSTORY=Quarkus`) | ||
- 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`) | ||
- 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: | ||
``` | ||
@@ -43,9 +43,9 @@ export TS_PLATFORM=kubernetes && \ | ||
Also, environmental variables can be set in files in "constants" folder. | ||
- Local test results can be represented with Allure reporter `npm run open-allure-dasboard` | ||
- Local test results can be represented with Allure reporter `npm run open-allure-dasboard` | ||
## Docker launch | ||
- open terminal and go to the "e2e" directory | ||
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url | ||
- run command `"npm run test-docker"` | ||
- open terminal and go to the "e2e" directory | ||
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url | ||
- run command `"npm run test-docker"` | ||
@@ -56,5 +56,5 @@ ## Docker launch with changed tests | ||
- open terminal and go to the "e2e" directory | ||
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url | ||
- run command `"npm run test-docker-mount-e2e"` | ||
- open terminal and go to the "e2e" directory | ||
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url | ||
- run command `"npm run test-docker-mount-e2e"` | ||
@@ -70,10 +70,10 @@ ## Debug docker launch | ||
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse-che/che-server/blob/HEAD/deploy/kubernetes/README.md> | ||
- Create workspace by using 'Chectl' and devfile | ||
- link to 'Chectl' manual <https://github.com/che-incubator/chectl#chectl-workspacestart> | ||
- link to devfile ( **`For successfull test passing, exactly provided devfile should be used`** ) | ||
<https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml> | ||
- Provide the **`'TS_SELENIUM_BASE_URL'`** environment variable as described above | ||
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts) | ||
- perform command **`export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`** | ||
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse-che/che-server/blob/HEAD/deploy/kubernetes/README.md> | ||
- Create workspace by using 'Chectl' and devfile | ||
- link to 'Chectl' manual <https://github.com/che-incubator/chectl#chectl-workspacestart> | ||
- link to devfile ( **`For successfull test passing, exactly provided devfile should be used`** ) | ||
<https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml> | ||
- Provide the **`'TS_SELENIUM_BASE_URL'`** environment variable as described above | ||
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts) | ||
- perform command **`export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`** | ||
@@ -84,12 +84,12 @@ ## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication | ||
- export TS_SELENIUM_BASE_URL=\<Che-URL\> | ||
- export TS_SELENIUM_OCP_USERNAME=\<cluster-username\> | ||
- export TS_SELENIUM_OCP_PASSWORD=\<cluster-password\> | ||
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true" | ||
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\> | ||
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\> | ||
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts) | ||
- export TS_SELENIUM_BASE_URL=\<Che-URL\> | ||
- export TS_SELENIUM_OCP_USERNAME=\<cluster-username\> | ||
- export TS_SELENIUM_OCP_PASSWORD=\<cluster-password\> | ||
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true" | ||
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\> | ||
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\> | ||
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts) | ||
**Execute the npm command:** | ||
- perform command `export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles` | ||
- perform command `export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles` |
/** ******************************************************************* | ||
* copyright (c) 2023 Red Hat, Inc. | ||
* copyright (c) 2024 Red Hat, Inc. | ||
* | ||
@@ -34,2 +34,3 @@ * This program and the accompanying materials are made | ||
let devfileContent: string = ''; | ||
let dwtName: string = ''; | ||
@@ -45,2 +46,3 @@ suiteSetup(`Prepare login ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function (): void { | ||
const editorDevfileContent: string = devfilesRegistryHelper.obtainCheDevFileEditorFromCheConfigMap('editors-definitions'); | ||
dwtName = YAML.parse(devfileContent).metadata.name; | ||
const uniqName: string = YAML.parse(devfileContent).metadata.name + randomPref; | ||
@@ -75,5 +77,5 @@ kubernetesCommandLineToolsExecutor.workspaceName = uniqName; | ||
suiteTeardown('Delete workspace', function (): void { | ||
kubernetesCommandLineToolsExecutor.deleteDevWorkspace(); | ||
suiteTeardown('Delete DevWorkspace', function (): void { | ||
kubernetesCommandLineToolsExecutor.deleteDevWorkspace(dwtName); | ||
}); | ||
}); |
@@ -97,5 +97,11 @@ /** ******************************************************************* | ||
deleteDevWorkspace(): void { | ||
Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' workspace`); | ||
// used to delete when devWorkspace and devWorkspaceTemplate have the same names | ||
deleteDevWorkspace(): void; | ||
// used to delete when devWorkspace and devWorkspaceTemplate have different names | ||
deleteDevWorkspace(dwTemplateName: string): void; | ||
deleteDevWorkspace(dwTemplateName?: string): void { | ||
Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' devWorkspace`); | ||
this.shellExecutor.executeCommand( | ||
@@ -105,5 +111,16 @@ `${this.kubernetesCommandLineTool} patch dw ${this.workspaceName} -n ${this.namespace} -p '{ "metadata": { "finalizers": null }}' --type merge || true` | ||
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dw ${this.workspaceName} -n ${this.namespace} || true`); | ||
this.shellExecutor.executeCommand( | ||
`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${this.workspaceName} -n ${this.namespace} || true` | ||
); | ||
if (dwTemplateName === undefined) { | ||
Logger.debug(`${this.kubernetesCommandLineTool} - delete '${this.workspaceName}' devWorkspaceTemplate`); | ||
this.shellExecutor.executeCommand( | ||
`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${this.workspaceName} -n ${this.namespace} || true` | ||
); | ||
} else { | ||
Logger.debug(`${this.kubernetesCommandLineTool} - delete '${dwTemplateName}' devWorkspaceTemplate`); | ||
this.shellExecutor.executeCommand( | ||
`${this.kubernetesCommandLineTool} delete dwt ${BASE_TEST_CONSTANTS.TS_SELENIUM_EDITOR}-${dwTemplateName} -n ${this.namespace} || true` | ||
); | ||
} | ||
} | ||
@@ -110,0 +127,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 3 instances in 1 package
1264363
3
319
18177
2
- Removed@devfile/api@2.3.0-1733171449(transitive)
- Removed@eclipse-che/che-devworkspace-generator@7.96.0(transitive)
- Removed@inversifyjs/common@1.4.0(transitive)
- Removed@inversifyjs/core@1.3.5(transitive)
- Removed@inversifyjs/reflect-metadata-utils@0.2.4(transitive)
- Removed@types/node@22.10.5(transitive)
- Removed@types/node-fetch@2.6.12(transitive)
- Removedargparse@2.0.1(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaxios@1.7.9(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedes6-promise@4.2.8(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedform-data@2.5.24.0.1(transitive)
- Removedfs-extra@11.2.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinversify@6.2.1(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedjsonc-parser@3.3.1(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedjsonschema@1.5.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedproxy-from-env@1.1.0(transitive)
- Removedquerystringify@2.2.0(transitive)
- Removedreflect-metadata@0.2.2(transitive)
- Removedrequires-port@1.0.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedtr46@0.0.3(transitive)
- Removedundici-types@6.20.0(transitive)
- Removeduniversalify@2.0.1(transitive)
- Removedurl-parse@1.5.10(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)