Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the latest nightly image #14285

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@ che.wsagent.cors.enabled=true
## Factory defaults.
# Editor and plugin which will be used for factories which are created from remote git repository
# which doesn't contain any Che-specific workspace descriptors (like .devfile of .factory.json)
che.factory.default_editor=eclipse/che-theia/7.0.0
che.factory.default_editor=eclipse/che-theia/next
# multiple plugins must be comma-separated, for example:
# pluginFooPublisher/pluginFooName/pluginFooVersion,pluginBarPublisher/pluginBarName/pluginBarVersion
che.factory.default_plugins=eclipse/che-machine-exec-plugin/7.0.0
che.factory.default_plugins=eclipse/che-machine-exec-plugin/next

## Devfile settings

Expand All @@ -660,12 +660,12 @@ che.factory.default_plugins=eclipse/che-machine-exec-plugin/7.0.0
# Default Editor that should be provisioned into Devfile if there is no specified Editor
# Format is `editorPublisher/editorName/editorVersion` value.
# `NULL` or absence of value means that default editor should not be provisioned.
che.workspace.devfile.default_editor=eclipse/che-theia/7.0.0
che.workspace.devfile.default_editor=eclipse/che-theia/next

# Default Plugins which should be provisioned for Default Editor.
# All the plugins from this list that are not explicitly mentioned in the user-defined devfile
# will be provisioned but only when the default editor is used or if the user-defined editor is
# the same as the default one (even if in different version).
# Format is comma-separated `pluginPublisher/pluginName/pluginVersion` values, for example
# eclipse/che-theia-exec-plugin/0.0.1,eclipse/che-theia-terminal-plugin/0.0.1
che.workspace.devfile.default_editor.plugins=eclipse/che-machine-exec-plugin/7.0.0
che.workspace.devfile.default_editor.plugins=eclipse/che-machine-exec-plugin/next
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#

cheDevfileRegistry:
image: quay.io/eclipse/che-devfile-registry:7.0.0
image: quay.io/eclipse/che-devfile-registry:nightly
imagePullPolicy: Always
memoryLimit: 256Mi
memoryRequests: 16Mi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#

chePluginRegistry:
image: quay.io/eclipse/che-plugin-registry:7.0.0
image: quay.io/eclipse/che-plugin-registry:nightly
imagePullPolicy: Always
memoryLimit: 256Mi
memoryRequests: 16Mi
2 changes: 1 addition & 1 deletion deploy/kubernetes/helm/che/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
cheWorkspaceHttpProxy: ""
cheWorkspaceHttpsProxy: ""
cheWorkspaceNoProxy: ""
cheImage: eclipse/che-server:7.0.0
cheImage: eclipse/che-server:nigthly
cheImagePullPolicy: Always
cheKeycloakRealm: "che"
cheKeycloakClientId: "che-public"
Expand Down
4 changes: 2 additions & 2 deletions deploy/openshift/deploy_che.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD:-${DEFAULT_KEYCLOAK_PASSWORD}}
###
### Plugin Registry settings
###
DEFAULT_PLUGIN_REGISTRY_IMAGE_TAG="7.0.0"
DEFAULT_PLUGIN_REGISTRY_IMAGE_TAG="nightly"
export PLUGIN_REGISTRY_IMAGE_TAG=${PLUGIN_REGISTRY_IMAGE_TAG:-${DEFAULT_PLUGIN_REGISTRY_IMAGE_TAG}}

DEFAULT_PLUGIN_REGISTRY_IMAGE="quay.io/eclipse/che-plugin-registry"
Expand All @@ -218,7 +218,7 @@ export PLUGIN__REGISTRY__URL=${PLUGIN__REGISTRY__URL:-${DEFAULT_PLUGIN__REGISTRY
###
### Devfile Registry settings
###
DEFAULT_DEVFILE_REGISTRY_IMAGE_TAG="7.0.0"
DEFAULT_DEVFILE_REGISTRY_IMAGE_TAG="nightly"
export DEVFILE_REGISTRY_IMAGE_TAG=${DEVFILE_REGISTRY_IMAGE_TAG:-${DEFAULT_DEVFILE_REGISTRY_IMAGE_TAG}}

DEFAULT_DEVFILE_REGISTRY_IMAGE="quay.io/eclipse/che-devfile-registry"
Expand Down
2 changes: 1 addition & 1 deletion e2e/driver/CheReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class CheReporter extends mocha.reporters.Spec {

// stop and remove running workspace
if (TestConstants.DELETE_WORKSPACE_ON_FAILED_TEST) {
console.log("Property DELETE_WORKSPACE_ON_FAILED_TEST se to true - trying to stop and delete running workspace.")
console.log('Property DELETE_WORKSPACE_ON_FAILED_TEST se to true - trying to stop and delete running workspace.');
let namespace = TestConstants.TS_SELENIUM_USERNAME;
let workspaceId = await testWorkspaceUtil.getIdOfRunningWorkspace(namespace);
testWorkspaceUtil.stopWorkspaceById(workspaceId);
Expand Down
2 changes: 2 additions & 0 deletions e2e/driver/ContainerInitializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { TestConstants } from '../TestConstants';
import { OcpLoginPage } from '../pageobjects/openshift/OcpLoginPage';
import { OcpWebConsolePage } from '../pageobjects/openshift/OcpWebConsolePage';
import { OcpLoginByTempAdmin } from '../pageobjects/login/OcpLoginByTempAdmin';
import { OpenWorkspaceWidget } from '../pageobjects/ide/OpenWorkspaceWidget';
import { ITestWorkspaceUtil } from '..';

export function getContainer(): Container {
Expand Down Expand Up @@ -73,5 +74,6 @@ export function getContainer(): Container {
e2eContainer.bind<ScreenCatcher>(CLASSES.ScreenCatcher).to(ScreenCatcher).inSingletonScope();
e2eContainer.bind<OcpLoginPage>(CLASSES.OcpLoginPage).to(OcpLoginPage).inSingletonScope();
e2eContainer.bind<OcpWebConsolePage>(CLASSES.OcpWebConsolePage).to(OcpWebConsolePage).inSingletonScope();
e2eContainer.bind<OpenWorkspaceWidget>(CLASSES.OpenWorkspaceWidget).to(OpenWorkspaceWidget).inSingletonScope();
return e2eContainer;
}
3 changes: 2 additions & 1 deletion e2e/inversify.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const CLASSES = {
WarningDialog: 'WarningDialog',
ScreenCatcher: 'ScreenCatcher',
OcpLoginPage: 'OcpLoginPage',
OcpWebConsolePage: 'OcpWebConsolePage'
OcpWebConsolePage: 'OcpWebConsolePage',
OpenWorkspaceWidget: 'OpenWorkspaceWidget'
};

export { TYPES, CLASSES };
2 changes: 1 addition & 1 deletion e2e/mocha-happy-path.opts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--timeout 1200000
--timeout 2200000
--reporter 'dist/driver/CheReporter.js'
-u tdd
--bail
Expand Down
4 changes: 2 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/node": "^11.13.4",
"@types/rimraf": "^2.0.2",
"@types/selenium-webdriver": "^3.0.16",
"axios": "0.17.1",
"chai": "^4.2.0",
"chromedriver": "^2.46.0",
"mocha": "^6.1.4",
Expand All @@ -26,8 +27,7 @@
"ts-node": "^8.0.3",
"tslint": "5.10.0",
"typed-rest-client": "^1.2.0",
"typescript": "^3.4.3",
"axios": "0.17.1"
"typescript": "^3.4.3"
},
"dependencies": {
"inversify": "^5.0.1",
Expand Down
3 changes: 1 addition & 2 deletions e2e/pageobjects/ide/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class Editor {
timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT,
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {

await this.selectTab(editorTabTitle);
await this.selectTab(editorTabTitle, timeout);
await this.driverHelper.getDriver().wait(async () => {
await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.END));
const editorText: string = await this.getEditorVisibleText(editorTabTitle);
Expand Down Expand Up @@ -228,7 +228,6 @@ export class Editor {

async waitStoppedDebugBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
const stoppedDebugBreakpointLocator: By = By.xpath(await this.getStoppedDebugBreakpointXpathLocator(tabTitle, lineNumber));

await this.driverHelper.waitVisibility(stoppedDebugBreakpointLocator, timeout);
}

Expand Down
31 changes: 15 additions & 16 deletions e2e/pageobjects/ide/Ide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export enum RightToolbarButton {

@injectable()
export class Ide {
public static readonly EXPLORER_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Explorer\'])[1]';
public static readonly SELECTED_EXPLORER_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Explorer\' and contains(@class, \'p-mod-current\')])[1]';
public static readonly EXPLORER_BUTTON_ID: string = 'shell-tab-explorer-view-container';
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 SELECTED_GIT_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Git\' and contains(@class, \'p-mod-current\')])[1]';
private static readonly TOP_MENU_PANEL_CSS: string = '#theia-app-shell #theia-top-panel .p-MenuBar-content';
Expand Down Expand Up @@ -95,9 +95,7 @@ export class Ide {
}

async clickOnNotificationButton(notificationText: string, buttonText: string) {
const notificationLocator: string = this.getNotificationXpathLocator(notificationText);
const yesButtonLocator: string = notificationLocator + `//button[text()=\'${buttonText}\']`;

const yesButtonLocator: string = `//div[@class='theia-notification-list']//span[contains(.,'${notificationText}')]/parent::div/parent::div/parent::div/div[@class='theia-notification-list-item-content-bottom']//div[@class='theia-notification-buttons']//button[text()='${buttonText}'] `;
await this.driverHelper.waitAndClick(By.xpath(yesButtonLocator));
}

Expand All @@ -111,7 +109,7 @@ export class Ide {
}

async waitIde(timeout: number = TestConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
const mainIdeParts: Array<By> = [By.css(Ide.TOP_MENU_PANEL_CSS), By.css(Ide.LEFT_CONTENT_PANEL_CSS), By.xpath(Ide.EXPLORER_BUTTON_XPATH)];
const mainIdeParts: Array<By> = [By.css(Ide.TOP_MENU_PANEL_CSS), By.css(Ide.LEFT_CONTENT_PANEL_CSS), By.id(Ide.EXPLORER_BUTTON_ID)];

for (const idePartLocator of mainIdeParts) {
await this.driverHelper.waitVisibility(idePartLocator, timeout);
Expand Down Expand Up @@ -233,7 +231,7 @@ export class Ide {
}

async getApplicationUrlFromNotification(notificationText: string) {
const notificationTextLocator: By = By.xpath(`//div[@class='theia-Notification']//p[contains(@id,'${notificationText}')]`);
const notificationTextLocator: By = By.xpath(`//div[@class='theia-notification-message']/span[contains(.,'${notificationText}')]`);
Ohrimenko1988 marked this conversation as resolved.
Show resolved Hide resolved

let notification = await this.driverHelper.waitAndGetText(notificationTextLocator);
let regexp: RegExp = new RegExp('^.*(https?://.*)$');
Expand All @@ -247,17 +245,16 @@ export class Ide {

async waitApllicationIsReady(url: string,
timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {

await this.driverHelper.getDriver().wait(async () => {
let res = await axios.get(url);
await this.driverHelper.getDriver().wait(async () => {
try {
let res = await axios.get(url);

res = await axios.get(url);
if (res.status === 200) {
console.log('Application is ready for use.');
console.log('Application is ready for use. App url:');
return true;
}
} catch (error) {
console.log('Application is not yet ready for use');
console.log('Application is not yet ready for use');
}

await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
Expand All @@ -266,16 +263,18 @@ export class Ide {

private getSelectedRightToolbarButtonLocator(buttonTitle: string): By {
return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
`//li[@title='${buttonTitle}' and contains(@id, 'shell-tab')] and contains(@class, 'p-mod-current')`);
`//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab')] and contains(@class, 'p-mod-current')`);
Ohrimenko1988 marked this conversation as resolved.
Show resolved Hide resolved
}

private getRightToolbarButtonLocator(buttonTitle: String): By {
return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
`//li[@title='${buttonTitle}' and contains(@id, 'shell-tab')]`);
`//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab')]`);
Ohrimenko1988 marked this conversation as resolved.
Show resolved Hide resolved
}

private getNotificationXpathLocator(notificationText: string): string {
return `//div[@class='theia-Notification' and contains(@id,'${notificationText}')]`;
return `//div[@class='theia-notification-message']/span[contains(.,'${notificationText}')]`;
Ohrimenko1988 marked this conversation as resolved.
Show resolved Hide resolved
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An extra rows


}
60 changes: 60 additions & 0 deletions e2e/pageobjects/ide/OpenWorkspaceWidget.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*********************************************************************
* Copyright (c) 2019 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
**********************************************************************/
import { injectable, inject } from 'inversify';
import { CLASSES } from '../../inversify.types';
import { DriverHelper } from '../../utils/DriverHelper';
import { By } from 'selenium-webdriver';
import { TestConstants } from '../../TestConstants';

@injectable()
export class OpenWorkspaceWidget {
private static readonly OPEN_WORKSPACE_MAIN_VIEW_XPATH = '//div[@class=\'dialogTitle\']/div[text()=\'Open Workspace\']';
private static readonly OPEN_WORKSPACE_OPEN_BTN_CSS = 'div.dialogControl>button.main';
private static readonly THEIA_LOCATION_LIST_CSS = 'select.theia-LocationList';

constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {
}

async waitOpenWorkspaceWidget(timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.driverHelper.waitVisibility(By.xpath(OpenWorkspaceWidget.OPEN_WORKSPACE_MAIN_VIEW_XPATH), timeout);
}

async waitWidgetIsClosed(timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.driverHelper.waitDisappearance(By.xpath(OpenWorkspaceWidget.OPEN_WORKSPACE_MAIN_VIEW_XPATH), timeout);
}

async selectItemInTree(pathToItem: string, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.driverHelper.waitAndClick(By.id(pathToItem), timeout);
}

async clickOnOpenButton(timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.driverHelper.waitAndClick(By.css(OpenWorkspaceWidget.OPEN_WORKSPACE_OPEN_BTN_CSS), timeout);
}

async selectItemInTreeAndOpenWorkspace(item: string, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.selectItemInTree(item, timeout);
await this.clickOnOpenButton();
await this.waitWidgetIsClosed();
}

async expandTreeToPath(path: string) {
const pathNodes: string[] = path.split('/');
for (let currentPath of pathNodes) {
await this.driverHelper.waitAndClick(By.id(`/${currentPath}`));
}
}

async selectRootWorkspaceItemInDropDawn(rootProject: string) {
await this.driverHelper.waitAndClick(By.css(OpenWorkspaceWidget.THEIA_LOCATION_LIST_CSS));
await this.driverHelper.waitAndClick(By.css(`option[value=\'file:///${rootProject}']`));
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An extra rows


}
26 changes: 20 additions & 6 deletions e2e/pageobjects/ide/PreviewWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export class PreviewWidget {
@inject(CLASSES.Ide) private readonly ide: Ide) { }

async waitAndSwitchToWidgetFrame() {
const iframeLocator: By = By.css('.theia-mini-browser iframe');

const iframeLocator: By = By.css('div.theia-mini-browser iframe');
await this.driverHelper.waitAndSwitchToFrame(iframeLocator);

}

async waitPreviewWidget(timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
Expand All @@ -36,16 +36,12 @@ export class PreviewWidget {
async waitContentAvailable(contentLocator: By,
timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT,
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5) {

await this.waitAndSwitchToWidgetFrame();

await this.driverHelper.getDriver().wait(async () => {
const isApplicationTitleVisible: boolean = await this.driverHelper.isVisible(contentLocator);

if (isApplicationTitleVisible) {
await this.driverHelper.getDriver().switchTo().defaultContent();
await this.ide.waitAndSwitchToIdeFrame();

return true;
}

Expand All @@ -56,6 +52,24 @@ export class PreviewWidget {
}, timeout);
}

async waitContentAvailableInAssociatedWorkspace(contentLocator: By,
timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT,
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5) {
await this.waitAndSwitchToWidgetFrame();
await this.driverHelper.getDriver().wait(async () => {
const isApplicationTitleVisible: boolean = await this.driverHelper.isVisible(contentLocator);
if (isApplicationTitleVisible) {
await this.driverHelper.getDriver().switchTo().defaultContent();
return true;
}

await this.driverHelper.getDriver().switchTo().defaultContent();
await this.refreshPage();
await this.waitAndSwitchToWidgetFrame();
await this.driverHelper.wait(polling);
}, timeout);
}

async waitVisibility(element: By, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
await this.driverHelper.waitVisibility(element, timeout);
}
Expand Down
Loading