@eclipse-che/che-e2e
Advanced tools
Comparing version 7.45.0-dev-60c4bc4 to 7.45.0-dev-ac76942
@@ -79,3 +79,3 @@ "use strict"; | ||
await this.clickOnOpenButton(timeout); | ||
await this.driverHelper.waitVisibility(selenium_webdriver_1.By.css(Ide_1.Ide.ACTIVATED_IDE_IFRAME_CSS), TimeoutConstants_1.TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT); | ||
await this.driverHelper.waitVisibility(selenium_webdriver_1.By.css(Ide_1.Ide.THEIA_EDITOR_CSS), TimeoutConstants_1.TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT); | ||
await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus_1.WorkspaceStatus.STARTING); | ||
@@ -82,0 +82,0 @@ } |
@@ -50,2 +50,6 @@ "use strict"; | ||
} | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available, Replace it with waitForEditor() or waitIde() method incase for conditional wait | ||
* @see Ide.waitForEditor() | ||
*/ | ||
async waitAndSwitchToIdeFrame(timeout = TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
@@ -81,2 +85,12 @@ Logger_1.Logger.debug('Ide.waitAndSwitchToIdeFrame'); | ||
} | ||
async waitForEditor(timeout = TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
Logger_1.Logger.debug('Ide.waitForEditor'); | ||
try { | ||
await this.driverHelper.waitVisibility(selenium_webdriver_1.By.css(Ide_1.THEIA_EDITOR_CSS), timeout); | ||
} | ||
catch (err) { | ||
Logger_1.Logger.warn(`Editor is not displayed even after ${timeout} milliseconds.`); | ||
throw err; | ||
} | ||
} | ||
async waitNotification(notificationText, timeout = TimeoutConstants_1.TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) { | ||
@@ -151,6 +165,6 @@ Logger_1.Logger.debug(`Ide.waitNotification "${notificationText}"`); | ||
Logger_1.Logger.debug('Ide.waitWorkspaceAndIde'); | ||
await this.waitAndSwitchToIdeFrame(timeout); | ||
await this.waitForEditor(timeout); | ||
await this.waitIde(timeout); | ||
} | ||
async waitIde(timeout = TimeoutConstants_1.TimeoutConstants.TS_IDE_LOAD_TIMEOUT) { | ||
async waitIde(timeout = TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
Logger_1.Logger.debug('Ide.waitIde'); | ||
@@ -311,3 +325,3 @@ const mainIdeParts = [selenium_webdriver_1.By.css(Ide_1.TOP_MENU_PANEL_CSS), selenium_webdriver_1.By.css(Ide_1.LEFT_CONTENT_PANEL_CSS), selenium_webdriver_1.By.id(Ide_1.EXPLORER_BUTTON_ID)]; | ||
Ide.SELECTED_EXPLORER_BUTTON_CSS = 'li#shell-tab-explorer-view-container.theia-mod-active'; | ||
Ide.ACTIVATED_IDE_IFRAME_CSS = '#ide-iframe-window[aria-hidden=\'false\']'; | ||
Ide.THEIA_EDITOR_CSS = '#theia-main-content-panel'; | ||
Ide.SELECTED_GIT_BUTTON_XPATH = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Git\' and contains(@class, \'p-mod-current\')])[1]'; | ||
@@ -314,0 +328,0 @@ Ide.TOP_MENU_PANEL_CSS = '#theia-app-shell #theia-top-panel .p-MenuBar-content'; |
@@ -76,2 +76,5 @@ "use strict"; | ||
} | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available anymore | ||
*/ | ||
async waitAndSwitchToWidgetFrame() { | ||
@@ -91,4 +94,2 @@ Logger_1.Logger.debug('PreviewWidget.waitAndSwitchToWidgetFrame'); | ||
if (isApplicationTitleVisible) { | ||
await this.driverHelper.getDriver().switchTo().defaultContent(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
return true; | ||
@@ -111,2 +112,5 @@ } | ||
} | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available. | ||
*/ | ||
async switchBackToIdeFrame() { | ||
@@ -113,0 +117,0 @@ Logger_1.Logger.debug('PreviewWidget.switchBackToIdeFrame'); |
@@ -195,4 +195,3 @@ "use strict"; | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -209,4 +208,3 @@ continue; | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -228,4 +226,3 @@ continue; | ||
await this.driverHelper.wait(triesPolling); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -232,0 +229,0 @@ continue; |
@@ -52,3 +52,2 @@ "use strict"; | ||
const welcomeControllerJavaFileName = 'WelcomeController.java'; | ||
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/java-maven/devfile.yaml`; | ||
const SpringAppLocators = { | ||
@@ -63,3 +62,3 @@ springTitleLocator: selenium_webdriver_1.By.xpath('//div[@class=\'container-fluid\']//h2[text()=\'Welcome\']'), | ||
suite('Workspace creation via factory url', async () => { | ||
// let factoryUrl : string = `${TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`; | ||
let factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`; | ||
const workspaceRootFolderName = 'src'; | ||
@@ -117,3 +116,2 @@ suite('Open factory URL', async () => { | ||
await browserTabsUtil.refreshPage(); | ||
await ide.waitAndSwitchToIdeFrame(); | ||
await ide.waitIde(); | ||
@@ -130,3 +128,3 @@ await editor.waitErrorInLine(30, javaFileName, TimeoutConstants_1.TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2); | ||
}); | ||
test('Codenavigation', async () => { | ||
test('CodeNavigation', async () => { | ||
await editor.moveCursorToLineAndChar(javaFileName, 32, 17); | ||
@@ -133,0 +131,0 @@ await editor.performKeyCombination(javaFileName, selenium_webdriver_1.Key.chord(selenium_webdriver_1.Key.CONTROL, selenium_webdriver_1.Key.F12)); |
@@ -6,2 +6,11 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/********************************************************************* | ||
* Copyright (c) 2021 Red Hat, Inc. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
require("reflect-metadata"); | ||
@@ -19,13 +28,12 @@ const inversify_config_1 = require("../../inversify.config"); | ||
const ide = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.Ide); | ||
const projectTree = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.ProjectTree); | ||
const editor = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.Editor); | ||
const workspaceNameHandler = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceNameHandler); | ||
const devfileUrl = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml'; | ||
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`; | ||
const preferencesHandler = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.PreferencesHandler); | ||
const devFileUrl = 'https://github.com/che-samples/java-guestbook/tree/devfilev2'; | ||
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devFileUrl}`; | ||
const codeNavigationClassName = 'String.class'; | ||
const sampleName = 'console-java-simple'; | ||
const subRootFolder = 'src'; | ||
const fileFolderPath = `${sampleName}/src/main/java/org/eclipse/che/examples`; | ||
const tabTitle = 'HelloWorld.java'; | ||
let workspaceName; | ||
const projectName = 'java-guestbook'; | ||
const subRootFolder = 'backend'; | ||
const fileFolderPath = `${projectName}/backend/src/main/java/cloudcode/guestbook/backend`; | ||
const tabTitle = 'GuestBookEntry.java'; | ||
let workspaceName = 'java-guestbook'; | ||
suite(`The 'JavaPlugin' test`, async () => { | ||
@@ -36,10 +44,6 @@ suite('Create workspace', async () => { | ||
}); | ||
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder); | ||
test('Wait until created workspace is started', async () => { | ||
await ide.waitAndSwitchToIdeFrame(); | ||
workspaceName = await workspaceNameHandler.getNameFromUrl(); | ||
CheReporter_1.default.registerRunningWorkspace(workspaceName); | ||
await ide.waitIde(TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60000); | ||
await projectTree.openProjectTreeContainer(); | ||
await projectTree.waitProjectImported(sampleName, subRootFolder); | ||
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never'); | ||
}); | ||
@@ -52,3 +56,3 @@ }); | ||
suite('Language server validation', async () => { | ||
test('Wait until Java LS is initialised', async () => { | ||
test('Wait until Java LS is initialized', async () => { | ||
await ide.checkLsInitializationStart('Activating'); | ||
@@ -58,16 +62,16 @@ await ide.waitStatusBarTextAbsence('Activating', 900000); | ||
test('Autocomplete', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 10, 20); | ||
await editor.moveCursorToLineAndChar(tabTitle, 15, 1); | ||
await editor.pressControlSpaceCombination(tabTitle); | ||
await editor.waitSuggestionContainer(); | ||
await editor.waitSuggestion(tabTitle, 'close() : void'); | ||
await editor.waitSuggestion(tabTitle, 'clone() : Object'); | ||
}); | ||
test('Error highlighting', async () => { | ||
const textForErrorDisplaying = '$'; | ||
await editor.type(tabTitle, textForErrorDisplaying, 10); | ||
await editor.waitErrorInLine(10, tabTitle, TimeoutConstants_1.TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT); | ||
await editor.type(tabTitle, textForErrorDisplaying, 15); | ||
await editor.waitErrorInLine(15, tabTitle, TimeoutConstants_1.TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT); | ||
await editor.performKeyCombination(tabTitle, selenium_webdriver_1.Key.chord(selenium_webdriver_1.Key.BACK_SPACE)); | ||
await editor.waitErrorInLineDisappearance(10, tabTitle); | ||
await editor.waitErrorInLineDisappearance(15, tabTitle); | ||
}); | ||
test('Codenavigation', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 9, 12); | ||
test('CodeNavigation', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 9, 14); | ||
await editor.performKeyCombination(tabTitle, selenium_webdriver_1.Key.chord(selenium_webdriver_1.Key.CONTROL, selenium_webdriver_1.Key.F12)); | ||
@@ -74,0 +78,0 @@ await editor.waitEditorAvailable(codeNavigationClassName, 60000); |
@@ -23,15 +23,15 @@ "use strict"; | ||
const CheReporter_1 = __importDefault(require("../../driver/CheReporter")); | ||
const projectAndFileTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.ProjectAndFileTests); | ||
const workspaceHandlingTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceHandlingTests); | ||
const browserTabsUtil = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.BrowserTabsUtil); | ||
const ide = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.Ide); | ||
const projectTree = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.ProjectTree); | ||
const editor = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.Editor); | ||
const workspaceNameHandler = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.WorkspaceNameHandler); | ||
const devfileUrl = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml'; | ||
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`; | ||
const sampleName = 'python-hello-world'; | ||
const subRootFile = 'README.md'; | ||
const fileFolderPath = `${sampleName}`; | ||
const preferencesHandler = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.PreferencesHandler); | ||
const devFileUrl = 'https://github.com/che-samples/python-hello-world/tree/devfilev2'; | ||
const factoryUrl = `${TestConstants_1.TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devFileUrl}`; | ||
const projectName = 'python-hello-world'; | ||
const subRootFolder = '.vscode'; | ||
const fileFolderPath = `${projectName}`; | ||
const tabTitle = 'hello-world.py'; | ||
let workspaceName; | ||
let workspaceName = 'python-hello-world'; | ||
suite(`The 'PythonPlugin' test`, async () => { | ||
@@ -42,10 +42,6 @@ suite('Create workspace', async () => { | ||
}); | ||
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder); | ||
test('Wait until created workspace is started', async () => { | ||
await ide.waitAndSwitchToIdeFrame(); | ||
workspaceName = await workspaceNameHandler.getNameFromUrl(); | ||
CheReporter_1.default.registerRunningWorkspace(workspaceName); | ||
await ide.waitIde(TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60000); | ||
await projectTree.openProjectTreeContainer(); | ||
await projectTree.waitProjectImported(sampleName, subRootFile); | ||
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never'); | ||
}); | ||
@@ -52,0 +48,0 @@ }); |
@@ -152,4 +152,3 @@ "use strict"; | ||
Logger_1.Logger.warn(`CodeExecutionTests.verifyRunningApplication application not located, probably blocked by preloader or content not available. Retrying.`); | ||
await this.driverHelper.getDriver().switchTo().defaultContent(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.previewWidget.refreshPage(); | ||
@@ -156,0 +155,0 @@ await this.previewWidget.waitContentAvailable(locator, applicationCheckTimeout, polling); |
@@ -36,5 +36,4 @@ "use strict"; | ||
const BrowserTabsUtil_1 = require("../utils/BrowserTabsUtil"); | ||
const DriverHelper_1 = require("../utils/DriverHelper"); | ||
let LanguageServerTests = class LanguageServerTests { | ||
constructor(editor, ide, topMenu, debugView, browserTabsUtil, driverHelper) { | ||
constructor(editor, ide, topMenu, debugView, browserTabsUtil) { | ||
this.editor = editor; | ||
@@ -45,3 +44,2 @@ this.ide = ide; | ||
this.browserTabsUtil = browserTabsUtil; | ||
this.driverHelper = driverHelper; | ||
} | ||
@@ -182,5 +180,3 @@ errorHighlighting(openedTab, textToWrite, line) { | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.driverHelper.wait(TimeoutConstants_1.TimeoutConstants.TS_IDE_LOAD_TIMEOUT); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.driverHelper.wait(TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM); | ||
await this.ide.waitIde(); | ||
await this.debugView.clickOnRunDebugButton(); | ||
@@ -205,5 +201,3 @@ } | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.driverHelper.wait(TimeoutConstants_1.TimeoutConstants.TS_IDE_LOAD_TIMEOUT); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.driverHelper.wait(TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM); | ||
await this.ide.waitIde(); | ||
await this.debugView.clickOnDebugConfigurationDropDown(); | ||
@@ -233,3 +227,2 @@ await this.debugView.clickOnDebugConfigurationItem(configurationName); | ||
__param(4, inversify_1.inject(inversify_types_1.CLASSES.BrowserTabsUtil)), | ||
__param(5, inversify_1.inject(inversify_types_1.CLASSES.DriverHelper)), | ||
__metadata("design:paramtypes", [Editor_1.Editor, | ||
@@ -239,6 +232,5 @@ Ide_1.Ide, | ||
DebugView_1.DebugView, | ||
BrowserTabsUtil_1.BrowserTabsUtil, | ||
DriverHelper_1.DriverHelper]) | ||
BrowserTabsUtil_1.BrowserTabsUtil]) | ||
], LanguageServerTests); | ||
exports.LanguageServerTests = LanguageServerTests; | ||
//# sourceMappingURL=LanguageServerTests.js.map |
@@ -58,3 +58,2 @@ "use strict"; | ||
test('Wait for workspace readiness', async () => { | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(TimeoutConstants_1.TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
@@ -61,0 +60,0 @@ if (checkNotification) { |
{ | ||
"name": "@eclipse-che/che-e2e", | ||
"version": "7.45.0-dev-60c4bc4", | ||
"version": "7.45.0-dev-ac76942", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -88,3 +88,3 @@ /********************************************************************* | ||
await this.clickOnOpenButton(timeout); | ||
await this.driverHelper.waitVisibility(By.css(Ide.ACTIVATED_IDE_IFRAME_CSS), TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT); | ||
await this.driverHelper.waitVisibility(By.css(Ide.THEIA_EDITOR_CSS), TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT); | ||
await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.STARTING); | ||
@@ -91,0 +91,0 @@ } |
@@ -32,3 +32,3 @@ /********************************************************************* | ||
public static readonly SELECTED_EXPLORER_BUTTON_CSS: string = 'li#shell-tab-explorer-view-container.theia-mod-active'; | ||
public static readonly ACTIVATED_IDE_IFRAME_CSS: string = '#ide-iframe-window[aria-hidden=\'false\']'; | ||
public static readonly THEIA_EDITOR_CSS: string = '#theia-main-content-panel'; | ||
public static readonly SELECTED_GIT_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Git\' and contains(@class, \'p-mod-current\')])[1]'; | ||
@@ -45,2 +45,6 @@ private static readonly TOP_MENU_PANEL_CSS: string = '#theia-app-shell #theia-top-panel .p-MenuBar-content'; | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available, Replace it with waitForEditor() or waitIde() method incase for conditional wait | ||
* @see Ide.waitForEditor() | ||
*/ | ||
async waitAndSwitchToIdeFrame(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
@@ -77,2 +81,12 @@ Logger.debug('Ide.waitAndSwitchToIdeFrame'); | ||
async waitForEditor(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
Logger.debug('Ide.waitForEditor'); | ||
try { | ||
await this.driverHelper.waitVisibility(By.css(Ide.THEIA_EDITOR_CSS), timeout); | ||
} catch (err) { | ||
Logger.warn(`Editor is not displayed even after ${timeout} milliseconds.`); | ||
throw err; | ||
} | ||
} | ||
async waitNotification(notificationText: string, timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) { | ||
@@ -172,7 +186,7 @@ Logger.debug(`Ide.waitNotification "${notificationText}"`); | ||
await this.waitAndSwitchToIdeFrame(timeout); | ||
await this.waitForEditor(timeout); | ||
await this.waitIde(timeout); | ||
} | ||
async waitIde(timeout: number = TimeoutConstants.TS_IDE_LOAD_TIMEOUT) { | ||
async waitIde(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { | ||
Logger.debug('Ide.waitIde'); | ||
@@ -179,0 +193,0 @@ |
@@ -79,2 +79,5 @@ /********************************************************************* | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available anymore | ||
*/ | ||
async waitAndSwitchToWidgetFrame() { | ||
@@ -102,4 +105,2 @@ Logger.debug('PreviewWidget.waitAndSwitchToWidgetFrame'); | ||
if (isApplicationTitleVisible) { | ||
await this.driverHelper.getDriver().switchTo().defaultContent(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
return true; | ||
@@ -130,2 +131,5 @@ } | ||
/** | ||
* @deprecated Method deprecated. Iframe is not available. | ||
*/ | ||
async switchBackToIdeFrame() { | ||
@@ -132,0 +136,0 @@ Logger.debug('PreviewWidget.switchBackToIdeFrame'); |
@@ -243,4 +243,3 @@ /********************************************************************* | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -260,4 +259,3 @@ continue; | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -289,4 +287,3 @@ continue; | ||
await this.driverHelper.wait(triesPolling); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.ide.waitWorkspaceAndIde(); | ||
await this.openProjectTreeContainer(); | ||
@@ -293,0 +290,0 @@ continue; |
@@ -76,3 +76,3 @@ | ||
## Plugins tests launching for the Che wit oauth authentication | ||
## Plugins tests launching for the Che with oauth authentication | ||
@@ -90,1 +90,16 @@ **Setup next environment variables:** | ||
- npm run test-plugin | ||
## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication | ||
**Setup next environment variables:** | ||
- 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\> | ||
**Execute the npm command:** | ||
- npm run test-devworkspace-happy-path |
@@ -46,3 +46,2 @@ // /********************************************************************* | ||
const welcomeControllerJavaFileName: string = 'WelcomeController.java'; | ||
const factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/java-maven/devfile.yaml`; | ||
@@ -59,3 +58,3 @@ const SpringAppLocators = { | ||
suite('Workspace creation via factory url', async () => { | ||
// let factoryUrl : string = `${TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`; | ||
let factoryUrl : string = `${TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`; | ||
@@ -122,3 +121,2 @@ const workspaceRootFolderName: string = 'src'; | ||
await browserTabsUtil.refreshPage(); | ||
await ide.waitAndSwitchToIdeFrame(); | ||
await ide.waitIde(); | ||
@@ -137,3 +135,3 @@ await editor.waitErrorInLine(30, javaFileName, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2); | ||
test('Codenavigation', async () => { | ||
test('CodeNavigation', async () => { | ||
await editor.moveCursorToLineAndChar(javaFileName, 32, 17); | ||
@@ -140,0 +138,0 @@ await editor.performKeyCombination(javaFileName, Key.chord(Key.CONTROL, Key.F12)); |
@@ -10,3 +10,2 @@ /********************************************************************* | ||
**********************************************************************/ | ||
import { WorkspaceNameHandler } from '../..'; | ||
import 'reflect-metadata'; | ||
@@ -18,3 +17,2 @@ import { e2eContainer } from '../../inversify.config'; | ||
import { TestConstants } from '../../TestConstants'; | ||
import { ProjectTree } from '../../pageobjects/ide/ProjectTree'; | ||
import { Key } from 'selenium-webdriver'; | ||
@@ -27,2 +25,3 @@ import { Editor } from '../../pageobjects/ide/Editor'; | ||
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil'; | ||
import { PreferencesHandler } from '../../utils/PreferencesHandler'; | ||
@@ -33,15 +32,14 @@ const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); | ||
const ide: Ide = e2eContainer.get(CLASSES.Ide); | ||
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree); | ||
const editor: Editor = e2eContainer.get(CLASSES.Editor); | ||
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler); | ||
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler); | ||
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml'; | ||
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`; | ||
const devFileUrl: string = 'https://github.com/che-samples/java-guestbook/tree/devfilev2'; | ||
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devFileUrl}`; | ||
const codeNavigationClassName: string = 'String.class'; | ||
const sampleName: string = 'console-java-simple'; | ||
const subRootFolder: string = 'src'; | ||
const projectName: string = 'java-guestbook'; | ||
const subRootFolder: string = 'backend'; | ||
const fileFolderPath: string = `${sampleName}/src/main/java/org/eclipse/che/examples`; | ||
const tabTitle: string = 'HelloWorld.java'; | ||
let workspaceName: string; | ||
const fileFolderPath: string = `${projectName}/backend/src/main/java/cloudcode/guestbook/backend`; | ||
const tabTitle: string = 'GuestBookEntry.java'; | ||
let workspaceName: string = 'java-guestbook'; | ||
@@ -54,12 +52,8 @@ suite(`The 'JavaPlugin' test`, async () => { | ||
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder); | ||
test('Wait until created workspace is started', async () => { | ||
await ide.waitAndSwitchToIdeFrame(); | ||
workspaceName = await workspaceNameHandler.getNameFromUrl(); | ||
CheReporter.registerRunningWorkspace(workspaceName); | ||
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000); | ||
await projectTree.openProjectTreeContainer(); | ||
await projectTree.waitProjectImported(sampleName, subRootFolder); | ||
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never'); | ||
}); | ||
@@ -74,3 +68,3 @@ }); | ||
suite('Language server validation', async () => { | ||
test('Wait until Java LS is initialised', async () => { | ||
test('Wait until Java LS is initialized', async () => { | ||
await ide.checkLsInitializationStart('Activating'); | ||
@@ -81,6 +75,6 @@ await ide.waitStatusBarTextAbsence('Activating', 900_000); | ||
test('Autocomplete', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 10, 20); | ||
await editor.moveCursorToLineAndChar(tabTitle, 15, 1); | ||
await editor.pressControlSpaceCombination(tabTitle); | ||
await editor.waitSuggestionContainer(); | ||
await editor.waitSuggestion(tabTitle, 'close() : void'); | ||
await editor.waitSuggestion(tabTitle, 'clone() : Object'); | ||
}); | ||
@@ -90,10 +84,10 @@ | ||
const textForErrorDisplaying: string = '$'; | ||
await editor.type(tabTitle, textForErrorDisplaying, 10); | ||
await editor.waitErrorInLine(10, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT); | ||
await editor.type(tabTitle, textForErrorDisplaying, 15); | ||
await editor.waitErrorInLine(15, tabTitle, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT); | ||
await editor.performKeyCombination(tabTitle, Key.chord(Key.BACK_SPACE)); | ||
await editor.waitErrorInLineDisappearance(10, tabTitle); | ||
await editor.waitErrorInLineDisappearance(15, tabTitle); | ||
}); | ||
test('Codenavigation', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 9, 12); | ||
test('CodeNavigation', async () => { | ||
await editor.moveCursorToLineAndChar(tabTitle, 9, 14); | ||
await editor.performKeyCombination(tabTitle, Key.chord(Key.CONTROL, Key.F12)); | ||
@@ -100,0 +94,0 @@ await editor.waitEditorAvailable(codeNavigationClassName, 60_000); |
@@ -13,3 +13,2 @@ /********************************************************************* | ||
import { CLASSES } from '../../inversify.types'; | ||
import { Ide } from '../../pageobjects/ide/Ide'; | ||
import { TimeoutConstants } from '../../TimeoutConstants'; | ||
@@ -24,19 +23,20 @@ import { TestConstants } from '../../TestConstants'; | ||
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil'; | ||
import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler'; | ||
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests'; | ||
import { PreferencesHandler } from '../../utils/PreferencesHandler'; | ||
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); | ||
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); | ||
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); | ||
const ide: Ide = e2eContainer.get(CLASSES.Ide); | ||
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree); | ||
const editor: Editor = e2eContainer.get(CLASSES.Editor); | ||
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler); | ||
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler); | ||
const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml'; | ||
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`; | ||
const sampleName: string = 'python-hello-world'; | ||
const subRootFile: string = 'README.md'; | ||
const devFileUrl: string = 'https://github.com/che-samples/python-hello-world/tree/devfilev2'; | ||
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devFileUrl}`; | ||
const projectName: string = 'python-hello-world'; | ||
const subRootFolder: string = '.vscode'; | ||
const fileFolderPath: string = `${sampleName}`; | ||
const fileFolderPath: string = `${projectName}`; | ||
const tabTitle: string = 'hello-world.py'; | ||
let workspaceName: string; | ||
let workspaceName: string = 'python-hello-world'; | ||
@@ -49,12 +49,8 @@ suite(`The 'PythonPlugin' test`, async () => { | ||
projectAndFileTests.waitWorkspaceReadiness(projectName, subRootFolder); | ||
test('Wait until created workspace is started', async () => { | ||
await ide.waitAndSwitchToIdeFrame(); | ||
workspaceName = await workspaceNameHandler.getNameFromUrl(); | ||
CheReporter.registerRunningWorkspace(workspaceName); | ||
await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
await ide.waitNotificationAndClickOnButton('Do you trust the authors of', 'Yes, I trust', 60_000); | ||
await projectTree.openProjectTreeContainer(); | ||
await projectTree.waitProjectImported(sampleName, subRootFile); | ||
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never'); | ||
}); | ||
@@ -61,0 +57,0 @@ }); |
@@ -143,4 +143,3 @@ /********************************************************************* | ||
Logger.warn(`CodeExecutionTests.verifyRunningApplication application not located, probably blocked by preloader or content not available. Retrying.`); | ||
await this.driverHelper.getDriver().switchTo().defaultContent(); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(); | ||
await this.previewWidget.refreshPage(); | ||
@@ -147,0 +146,0 @@ await this.previewWidget.waitContentAvailable(locator, applicationCheckTimeout, polling); |
@@ -22,3 +22,2 @@ /********************************************************************* | ||
import { BrowserTabsUtil } from '../utils/BrowserTabsUtil'; | ||
import { DriverHelper } from '../utils/DriverHelper'; | ||
@@ -33,4 +32,3 @@ @injectable() | ||
@inject(CLASSES.DebugView) private readonly debugView: DebugView, | ||
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil, | ||
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { } | ||
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil) { } | ||
@@ -169,5 +167,3 @@ public errorHighlighting(openedTab: string, textToWrite: string, line: number) { | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.driverHelper.wait(TimeoutConstants.TS_IDE_LOAD_TIMEOUT); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.driverHelper.wait(TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM); | ||
await this.ide.waitIde(); | ||
await this.debugView.clickOnRunDebugButton(); | ||
@@ -193,5 +189,3 @@ } | ||
await this.browserTabsUtil.refreshPage(); | ||
await this.driverHelper.wait(TimeoutConstants.TS_IDE_LOAD_TIMEOUT); | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.driverHelper.wait(TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM); | ||
await this.ide.waitIde(); | ||
await this.debugView.clickOnDebugConfigurationDropDown(); | ||
@@ -198,0 +192,0 @@ await this.debugView.clickOnDebugConfigurationItem(configurationName); |
@@ -51,3 +51,2 @@ /********************************************************************* | ||
test('Wait for workspace readiness', async () => { | ||
await this.ide.waitAndSwitchToIdeFrame(); | ||
await this.ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT); | ||
@@ -54,0 +53,0 @@ if (checkNotification) { |
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
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 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 3 instances in 1 package
104
1518100
41
20584