@eclipse-che/che-e2e
Advanced tools
Comparing version 7.94.0-next-3bef038 to 7.94.0-next-51a833a
@@ -50,3 +50,3 @@ /** ******************************************************************* | ||
import { OauthPage } from '../pageobjects/git-providers/OauthPage'; | ||
import { DevfilesRegistryHelper } from '../utils/DevfilesRegistryHelper'; | ||
import { DevfilesHelper } from '../utils/DevfilesHelper'; | ||
import { Main as Generator } from '@eclipse-che/che-devworkspace-generator/lib/main'; | ||
@@ -88,3 +88,3 @@ import { ContainerTerminal, KubernetesCommandLineToolsExecutor } from '../utils/KubernetesCommandLineToolsExecutor'; | ||
e2eContainer.bind<RedHatLoginPage>(CLASSES.RedHatLoginPage).to(RedHatLoginPage); | ||
e2eContainer.bind<DevfilesRegistryHelper>(CLASSES.DevfilesRegistryHelper).to(DevfilesRegistryHelper); | ||
e2eContainer.bind<DevfilesHelper>(CLASSES.DevfilesRegistryHelper).to(DevfilesHelper); | ||
e2eContainer.bind<KubernetesCommandLineToolsExecutor>(CLASSES.KubernetesCommandLineToolsExecutor).to(KubernetesCommandLineToolsExecutor); | ||
@@ -91,0 +91,0 @@ e2eContainer.bind<ShellExecutor>(CLASSES.ShellExecutor).to(ShellExecutor); |
@@ -47,3 +47,3 @@ "use strict"; | ||
const OauthPage_1 = require("../pageobjects/git-providers/OauthPage"); | ||
const DevfilesRegistryHelper_1 = require("../utils/DevfilesRegistryHelper"); | ||
const DevfilesHelper_1 = require("../utils/DevfilesHelper"); | ||
const main_1 = require("@eclipse-che/che-devworkspace-generator/lib/main"); | ||
@@ -84,3 +84,3 @@ const KubernetesCommandLineToolsExecutor_1 = require("../utils/KubernetesCommandLineToolsExecutor"); | ||
e2eContainer.bind(inversify_types_1.CLASSES.RedHatLoginPage).to(RedHatLoginPage_1.RedHatLoginPage); | ||
e2eContainer.bind(inversify_types_1.CLASSES.DevfilesRegistryHelper).to(DevfilesRegistryHelper_1.DevfilesRegistryHelper); | ||
e2eContainer.bind(inversify_types_1.CLASSES.DevfilesRegistryHelper).to(DevfilesHelper_1.DevfilesHelper); | ||
e2eContainer.bind(inversify_types_1.CLASSES.KubernetesCommandLineToolsExecutor).to(KubernetesCommandLineToolsExecutor_1.KubernetesCommandLineToolsExecutor); | ||
@@ -87,0 +87,0 @@ e2eContainer.bind(inversify_types_1.CLASSES.ShellExecutor).to(ShellExecutor_1.ShellExecutor); |
@@ -38,3 +38,3 @@ "use strict"; | ||
__exportStar(require("./utils/DevWorkspaceConfigurationHelper"), exports); | ||
__exportStar(require("./utils/DevfilesRegistryHelper"), exports); | ||
__exportStar(require("./utils/DevfilesHelper"), exports); | ||
__exportStar(require("./utils/DriverHelper"), exports); | ||
@@ -41,0 +41,0 @@ __exportStar(require("./utils/IContextParams"), exports); |
@@ -63,2 +63,4 @@ "use strict"; | ||
OauthPage_1.DENY_ACCESS_BUTTON = selenium_webdriver_1.By.xpath('//button[@value="deny"]'); | ||
OauthPage_1.ENABLE_TWO_STEP_VERIFICATION_FORM = selenium_webdriver_1.By.id('ProductHeading'); | ||
OauthPage_1.DENY_TWO_STEP_VERIFICATION = selenium_webdriver_1.By.id('mfa-promote-dismiss'); | ||
} | ||
@@ -139,2 +141,14 @@ break; | ||
} | ||
async waitVisibilityTwoStepVerificationForm() { | ||
Logger_1.Logger.debug(); | ||
return this.driverHelper.waitVisibilityBoolean(OauthPage_1.ENABLE_TWO_STEP_VERIFICATION_FORM); | ||
} | ||
async clickOnDenyTwoStepVerification() { | ||
Logger_1.Logger.debug(); | ||
await this.driverHelper.waitAndClick(OauthPage_1.DENY_TWO_STEP_VERIFICATION); | ||
} | ||
async waitDisappearanceTwoStepVerificationForm() { | ||
Logger_1.Logger.debug(); | ||
await this.driverHelper.waitDisappearance(OauthPage_1.ENABLE_TWO_STEP_VERIFICATION_FORM); | ||
} | ||
async login() { | ||
@@ -154,2 +168,8 @@ Logger_1.Logger.debug(); | ||
await this.waitClosingLoginPage(); | ||
if (FACTORY_TEST_CONSTANTS_1.FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER === FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_CLOUD_OAUTH2) { | ||
if (await this.waitVisibilityTwoStepVerificationForm()) { | ||
await this.clickOnDenyTwoStepVerification(); | ||
await this.waitDisappearanceTwoStepVerificationForm(); | ||
} | ||
} | ||
} | ||
@@ -156,0 +176,0 @@ async confirmAccess() { |
@@ -24,4 +24,6 @@ "use strict"; | ||
const devfileContent = 'schemaVersion: 2.2.0\n' + 'metadata:\n' + ` name: ${workspaceName}\n`; | ||
const editorContent = ''; | ||
devWorkspaceConfigurationHelper = new DevWorkspaceConfigurationHelper_1.DevWorkspaceConfigurationHelper({ | ||
devfileContent | ||
devfileContent, | ||
editorContent | ||
}); | ||
@@ -28,0 +30,0 @@ devfileContext = await devWorkspaceConfigurationHelper.generateDevfileContext(); |
@@ -9,3 +9,3 @@ import * as inversifyConfig from './configs/inversify.config'; | ||
export * from './utils/DevWorkspaceConfigurationHelper'; | ||
export * from './utils/DevfilesRegistryHelper'; | ||
export * from './utils/DevfilesHelper'; | ||
export * from './utils/DriverHelper'; | ||
@@ -12,0 +12,0 @@ export * from './utils/IContextParams'; |
{ | ||
"name": "@eclipse-che/che-e2e", | ||
"version": "7.94.0-next-3bef038", | ||
"version": "7.94.0-next-51a833a", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -27,2 +27,4 @@ /** ******************************************************************* | ||
private static DENY_SAVE_CREDENTIALS_BUTTON: By; | ||
private static ENABLE_TWO_STEP_VERIFICATION_FORM: By; | ||
private static DENY_TWO_STEP_VERIFICATION: By; | ||
@@ -59,2 +61,4 @@ constructor( | ||
OauthPage.DENY_ACCESS_BUTTON = By.xpath('//button[@value="deny"]'); | ||
OauthPage.ENABLE_TWO_STEP_VERIFICATION_FORM = By.id('ProductHeading'); | ||
OauthPage.DENY_TWO_STEP_VERIFICATION = By.id('mfa-promote-dismiss'); | ||
} | ||
@@ -158,2 +162,20 @@ break; | ||
async waitVisibilityTwoStepVerificationForm(): Promise<boolean> { | ||
Logger.debug(); | ||
return this.driverHelper.waitVisibilityBoolean(OauthPage.ENABLE_TWO_STEP_VERIFICATION_FORM); | ||
} | ||
async clickOnDenyTwoStepVerification(): Promise<void> { | ||
Logger.debug(); | ||
await this.driverHelper.waitAndClick(OauthPage.DENY_TWO_STEP_VERIFICATION); | ||
} | ||
async waitDisappearanceTwoStepVerificationForm(): Promise<void> { | ||
Logger.debug(); | ||
await this.driverHelper.waitDisappearance(OauthPage.ENABLE_TWO_STEP_VERIFICATION_FORM); | ||
} | ||
async login(): Promise<void> { | ||
@@ -176,2 +198,9 @@ Logger.debug(); | ||
await this.waitClosingLoginPage(); | ||
if (FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER === GitProviderType.BITBUCKET_CLOUD_OAUTH2) { | ||
if (await this.waitVisibilityTwoStepVerificationForm()) { | ||
await this.clickOnDenyTwoStepVerification(); | ||
await this.waitDisappearanceTwoStepVerificationForm(); | ||
} | ||
} | ||
} | ||
@@ -178,0 +207,0 @@ |
@@ -19,3 +19,3 @@ /** ******************************************************************* | ||
import { CLASSES } from '../../configs/inversify.types'; | ||
import { DevfilesRegistryHelper } from '../../utils/DevfilesRegistryHelper'; | ||
import { DevfilesHelper } from '../../utils/DevfilesHelper'; | ||
import { MOCHA_CONSTANTS } from '../../constants/MOCHA_CONSTANTS'; | ||
@@ -30,3 +30,3 @@ import { API_TEST_CONSTANTS } from '../../constants/API_TEST_CONSTANTS'; | ||
void (async function (): Promise<void> { | ||
const devfilesRegistryHelper: DevfilesRegistryHelper = e2eContainer.get(CLASSES.DevfilesRegistryHelper); | ||
const devfilesRegistryHelper: DevfilesHelper = e2eContainer.get(CLASSES.DevfilesRegistryHelper); | ||
@@ -33,0 +33,0 @@ let devfileSamples: any = []; |
@@ -37,5 +37,7 @@ /** ******************************************************************* | ||
const devfileContent: string = 'schemaVersion: 2.2.0\n' + 'metadata:\n' + ` name: ${workspaceName}\n`; | ||
const editorContent: string = ''; | ||
devWorkspaceConfigurationHelper = new DevWorkspaceConfigurationHelper({ | ||
devfileContent | ||
devfileContent, | ||
editorContent | ||
}); | ||
@@ -42,0 +44,0 @@ devfileContext = await devWorkspaceConfigurationHelper.generateDevfileContext(); |
@@ -15,3 +15,3 @@ /** ******************************************************************* | ||
import { StringUtil } from '../../utils/StringUtil'; | ||
import { DevfilesRegistryHelper } from '../../utils/DevfilesRegistryHelper'; | ||
import { DevfilesHelper } from '../../utils/DevfilesHelper'; | ||
import { Logger } from '../../utils/Logger'; | ||
@@ -31,3 +31,3 @@ import { e2eContainer } from '../../configs/inversify.config'; | ||
void (async function (): Promise<void> { | ||
const devfilesRegistryHelper: DevfilesRegistryHelper = e2eContainer.get(CLASSES.DevfilesRegistryHelper); | ||
const devfilesRegistryHelper: DevfilesHelper = e2eContainer.get(CLASSES.DevfilesRegistryHelper); | ||
let devfileSamples: any; | ||
@@ -34,0 +34,0 @@ if (MOCHA_CONSTANTS.MOCHA_DELAYED_SUITE) { |
@@ -101,2 +101,3 @@ /** ******************************************************************* | ||
} | ||
patchDevWorkspaceConfigWithBuildContainerAttribute(devfileContextDevWorkspace: any): void { | ||
@@ -103,0 +104,0 @@ Logger.debug(); |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 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 1 instance in 1 package
1202736
310
17386
38