@eclipse-che/che-e2e
Advanced tools
Comparing version 7.77.0 to 7.78.0-next-4d97c65
@@ -21,5 +21,10 @@ /** ******************************************************************* | ||
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: string; | ||
TS_GIT_API_AUTH_TOKEN: string; | ||
} = { | ||
INBUILT_APPLICATION_DEVFILE_REGISTRY_URL: (): string => `${BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL}/devfile-registry/devfiles/`, | ||
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: 'https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/' | ||
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: 'https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/', | ||
/** | ||
* gitHub has a rate limit for unauthorized requests to GitHub API. We can prevent this problems using authorization token | ||
*/ | ||
TS_GIT_API_AUTH_TOKEN: process.env.TS_GIT_API_AUTH_TOKEN || '' | ||
}; | ||
@@ -26,0 +31,0 @@ export const API_TEST_CONSTANTS: { |
@@ -35,2 +35,3 @@ /** ******************************************************************* | ||
TESTING_APPLICATION_NAME: () => string; | ||
TEST_NAMESPACE: string; | ||
} = { | ||
@@ -58,2 +59,7 @@ /** | ||
/** | ||
* openshift project or k8s namespace which is used by test | ||
*/ | ||
TEST_NAMESPACE: process.env.TEST_NAMESPACE || '', | ||
/** | ||
* application name (DevSpaces or Che) | ||
@@ -68,3 +74,2 @@ */ | ||
}, | ||
/** | ||
@@ -71,0 +76,0 @@ * testing application version |
@@ -21,3 +21,7 @@ "use strict"; | ||
INBUILT_APPLICATION_DEVFILE_REGISTRY_URL: () => `${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL}/devfile-registry/devfiles/`, | ||
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: 'https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/' | ||
GIT_HUB_CHE_DEVFILE_REGISTRY_URL: 'https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/', | ||
/** | ||
* gitHub has a rate limit for unauthorized requests to GitHub API. We can prevent this problems using authorization token | ||
*/ | ||
TS_GIT_API_AUTH_TOKEN: process.env.TS_GIT_API_AUTH_TOKEN || '' | ||
}; | ||
@@ -24,0 +28,0 @@ exports.API_TEST_CONSTANTS = { |
@@ -36,2 +36,6 @@ "use strict"; | ||
/** | ||
* openshift project or k8s namespace which is used by test | ||
*/ | ||
TEST_NAMESPACE: process.env.TEST_NAMESPACE || '', | ||
/** | ||
* application name (DevSpaces or Che) | ||
@@ -38,0 +42,0 @@ */ |
@@ -58,2 +58,9 @@ "use strict"; | ||
projectFolderItem: selenium_webdriver_1.By.xpath('.//div[contains(@class, "rootfolder-icon projects-name-dir")]') | ||
}, | ||
ScmView: { | ||
manageWorkspaceTrust: selenium_webdriver_1.By.xpath('.//a[@class="monaco-button monaco-text-button"]'), | ||
modifiedFile: selenium_webdriver_1.By.xpath('//div[@class="monaco-list-row" and contains(@aria-label, "Modified")]') | ||
}, | ||
Workbench: { | ||
workspaceTrustButton: selenium_webdriver_1.By.xpath('//a[@role="button" and text()="Trust"]') | ||
} | ||
@@ -60,0 +67,0 @@ } |
@@ -101,2 +101,6 @@ "use strict"; | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger_1.Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -103,0 +107,0 @@ }); |
@@ -116,2 +116,6 @@ "use strict"; | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger_1.Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -118,0 +122,0 @@ }); |
@@ -113,2 +113,6 @@ "use strict"; | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger_1.Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -115,0 +119,0 @@ }); |
@@ -64,2 +64,18 @@ "use strict"; | ||
/** | ||
* manage to 'Trusted' Workspace Mode, when the trust author dialog does not appear | ||
* the "Manage Workspace Trust" box is appeared in Source Control View | ||
*/ | ||
async performManageWorkspaceTrustBox() { | ||
Logger_1.Logger.debug(); | ||
try { | ||
await this.driverHelper.waitAndClick(this.cheCodeLocatorLoader.webCheCodeLocators.ScmView.manageWorkspaceTrust, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); | ||
await this.driverHelper.waitAndClick(this.cheCodeLocatorLoader.webCheCodeLocators.Workbench.workspaceTrustButton, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); | ||
await this.driverHelper.waitAndClick(this.cheCodeLocatorLoader.webCheCodeLocators.ScmView.modifiedFile, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); | ||
} | ||
catch (err) { | ||
Logger_1.Logger.error(`Manage Workspace Trust box was not shown: ${err}`); | ||
throw err; | ||
} | ||
} | ||
/** | ||
* find an ViewSection with project tree. | ||
@@ -66,0 +82,0 @@ * @returns Promise resolving to ViewSection object |
@@ -68,6 +68,7 @@ "use strict"; | ||
const content = await this.getInbuiltDevfilesRegistryContent(sampleNamePatterns); | ||
const devfileRegistryPrefix = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_PLATFORM === BASE_TEST_CONSTANTS_1.Platform.OPENSHIFT | ||
? BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL + '/devfile-registry' | ||
: ''; | ||
for (const sample of content) { | ||
const linkToDevWorkspaceYaml = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL + | ||
'/devfile-registry' + | ||
sample.links.devWorkspaces['che-incubator/che-code/latest']; | ||
const linkToDevWorkspaceYaml = `${devfileRegistryPrefix}${sample.links.devWorkspaces['che-incubator/che-code/latest']}`; | ||
devfileSamples.push({ | ||
@@ -99,4 +100,15 @@ name: sample.displayName, | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
async getContent(url, headers) { | ||
Logger_1.Logger.trace(`${url}`); | ||
if (API_TEST_CONSTANTS_1.SUPPORTED_DEVFILE_REGISTRIES.TS_GIT_API_AUTH_TOKEN.length !== 0) { | ||
/** | ||
* if we use - https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/ URL | ||
* for generating devfiles we can get a problem with rate limits to GitHub API, | ||
* but we can pass auth. token for increase the limit and avoiding problems | ||
*/ | ||
headers = { | ||
headers: { Authorization: API_TEST_CONSTANTS_1.SUPPORTED_DEVFILE_REGISTRIES.TS_GIT_API_AUTH_TOKEN } | ||
}; | ||
} | ||
let response; | ||
@@ -103,0 +115,0 @@ try { |
@@ -73,3 +73,6 @@ "use strict"; | ||
get namespace() { | ||
if (!this._namespace) { | ||
if (BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TEST_NAMESPACE.length > 0) { | ||
this._namespace = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TEST_NAMESPACE; | ||
} | ||
else if (!this._namespace) { | ||
const applicationName = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME(); | ||
@@ -76,0 +79,0 @@ if (applicationName === 'default') { |
{ | ||
"name": "@eclipse-che/che-e2e", | ||
"version": "7.77.0", | ||
"version": "7.78.0-next-4d97c65", | ||
"description": "", | ||
@@ -68,4 +68,3 @@ "main": "dist/index.js", | ||
"inversify": "6.0.1", | ||
"reflect-metadata": "0.1.13", | ||
"@eclipse-che/che-devworkspace-generator": "7.77.0" | ||
"reflect-metadata": "0.1.13" | ||
}, | ||
@@ -72,0 +71,0 @@ "resolutions": { |
@@ -54,2 +54,9 @@ /** ******************************************************************* | ||
projectFolderItem: By.xpath('.//div[contains(@class, "rootfolder-icon projects-name-dir")]') | ||
}, | ||
ScmView: { | ||
manageWorkspaceTrust: By.xpath('.//a[@class="monaco-button monaco-text-button"]'), | ||
modifiedFile: By.xpath('//div[@class="monaco-list-row" and contains(@aria-label, "Modified")]') | ||
}, | ||
Workbench: { | ||
workspaceTrustButton: By.xpath('//a[@role="button" and text()="Trust"]') | ||
} | ||
@@ -56,0 +63,0 @@ } |
@@ -134,2 +134,6 @@ /** ******************************************************************* | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -136,0 +140,0 @@ }); |
@@ -151,2 +151,6 @@ /** ******************************************************************* | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -153,0 +157,0 @@ }); |
@@ -152,2 +152,6 @@ /** ******************************************************************* | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
if (scmProvider === undefined) { | ||
await projectAndFileTests.performManageWorkspaceTrustBox(); | ||
[scmProvider, ...rest] = await scmView.getProviders(); | ||
} | ||
Logger.debug(`scmView.getProviders: "${JSON.stringify(scmProvider)}, ${rest}"`); | ||
@@ -154,0 +158,0 @@ }); |
@@ -62,2 +62,28 @@ /** ******************************************************************* | ||
/** | ||
* manage to 'Trusted' Workspace Mode, when the trust author dialog does not appear | ||
* the "Manage Workspace Trust" box is appeared in Source Control View | ||
*/ | ||
async performManageWorkspaceTrustBox(): Promise<void> { | ||
Logger.debug(); | ||
try { | ||
await this.driverHelper.waitAndClick( | ||
(this.cheCodeLocatorLoader.webCheCodeLocators.ScmView as any).manageWorkspaceTrust, | ||
TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT | ||
); | ||
await this.driverHelper.waitAndClick( | ||
(this.cheCodeLocatorLoader.webCheCodeLocators.Workbench as any).workspaceTrustButton, | ||
TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT | ||
); | ||
await this.driverHelper.waitAndClick( | ||
(this.cheCodeLocatorLoader.webCheCodeLocators.ScmView as any).modifiedFile, | ||
TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT | ||
); | ||
} catch (err) { | ||
Logger.error(`Manage Workspace Trust box was not shown: ${err}`); | ||
throw err; | ||
} | ||
} | ||
/** | ||
* find an ViewSection with project tree. | ||
@@ -64,0 +90,0 @@ * @returns Promise resolving to ViewSection object |
@@ -15,3 +15,3 @@ /** ******************************************************************* | ||
import { injectable } from 'inversify'; | ||
import { BASE_TEST_CONSTANTS } from '../constants/BASE_TEST_CONSTANTS'; | ||
import { BASE_TEST_CONSTANTS, Platform } from '../constants/BASE_TEST_CONSTANTS'; | ||
@@ -68,7 +68,8 @@ @injectable() | ||
const content: any[any] = await this.getInbuiltDevfilesRegistryContent(sampleNamePatterns); | ||
const devfileRegistryPrefix: string = | ||
BASE_TEST_CONSTANTS.TS_PLATFORM === Platform.OPENSHIFT | ||
? BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL + '/devfile-registry' | ||
: ''; | ||
for (const sample of content) { | ||
const linkToDevWorkspaceYaml: any = | ||
BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL + | ||
'/devfile-registry' + | ||
sample.links.devWorkspaces['che-incubator/che-code/latest']; | ||
const linkToDevWorkspaceYaml: any = `${devfileRegistryPrefix}${sample.links.devWorkspaces['che-incubator/che-code/latest']}`; | ||
devfileSamples.push({ | ||
@@ -102,5 +103,15 @@ name: sample.displayName, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
private async getContent(url: string, headers?: object): Promise<AxiosResponse> { | ||
Logger.trace(`${url}`); | ||
if (SUPPORTED_DEVFILE_REGISTRIES.TS_GIT_API_AUTH_TOKEN.length !== 0) { | ||
/** | ||
* if we use - https://api.github.com/repos/eclipse-che/che-devfile-registry/contents/devfiles/ URL | ||
* for generating devfiles we can get a problem with rate limits to GitHub API, | ||
* but we can pass auth. token for increase the limit and avoiding problems | ||
*/ | ||
headers = { | ||
headers: { Authorization: SUPPORTED_DEVFILE_REGISTRIES.TS_GIT_API_AUTH_TOKEN } | ||
}; | ||
} | ||
let response: AxiosResponse | undefined; | ||
@@ -107,0 +118,0 @@ try { |
@@ -49,3 +49,5 @@ /** ******************************************************************* | ||
get namespace(): string | undefined { | ||
if (!this._namespace) { | ||
if (BASE_TEST_CONSTANTS.TEST_NAMESPACE.length > 0) { | ||
this._namespace = BASE_TEST_CONSTANTS.TEST_NAMESPACE; | ||
} else if (!this._namespace) { | ||
const applicationName: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME(); | ||
@@ -52,0 +54,0 @@ if (applicationName === 'default') { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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 5 instances 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 5 instances in 1 package
1016110
3
14932
2
54
- Removed@devfile/api@2.3.0-1738854228(transitive)
- Removed@eclipse-che/che-devworkspace-generator@7.77.0(transitive)
- Removed@types/node@22.13.1(transitive)
- Removed@types/node-fetch@2.6.12(transitive)
- Removedargparse@2.0.1(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaxios@0.21.2(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@10.1.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinversify@5.1.1(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedjsonc-parser@3.3.1(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedquerystringify@2.2.0(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)