Upgrade version of selenium chrome-node to 3.141.59-dubnium (#12286)
* Upgrade version of selenium chromenode to 3.141.59-dubnium * Fix test timeouts to comply with new chrome-node version * Fix NewWorkspacePageTest selenium test * Fix ImportProjectFromGitHubTest, AuthorizeOnGithubFromDashboardTest Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>6.19.x
parent
a082fbe047
commit
af48cd877b
|
|
@ -1201,8 +1201,7 @@ public class SeleniumWebDriverHelper {
|
|||
public void waitOpenedSomeWin() {
|
||||
webDriverWaitFactory
|
||||
.get(WIDGET_TIMEOUT_SEC)
|
||||
.until(
|
||||
(ExpectedCondition<Boolean>) driver -> seleniumWebDriver.getWindowHandles().size() > 1);
|
||||
.until((ExpectedCondition<Boolean>) driver -> isTwoOrMoreWindowsOpened());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
version: '2'
|
||||
services:
|
||||
selenium_hub:
|
||||
image: selenium/hub:3.14.0-curium
|
||||
image: selenium/hub:3.141.59-dubnium
|
||||
container_name: selenium_hub
|
||||
ports:
|
||||
- 4444:4444
|
||||
|
|
@ -20,7 +20,7 @@ services:
|
|||
- selenium_grid_internal
|
||||
|
||||
chromenode:
|
||||
image: selenium/node-chrome${NODE_CHROME_DEBUG_SUFFIX}:3.14.0-curium
|
||||
image: selenium/node-chrome${NODE_CHROME_DEBUG_SUFFIX}:3.141.59-dubnium
|
||||
depends_on:
|
||||
- selenium_hub
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.ELEME
|
|||
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.LOADER_TIMEOUT_SEC;
|
||||
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.LOAD_PAGE_TIMEOUT_SEC;
|
||||
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.REDRAW_UI_ELEMENTS_TIMEOUT_SEC;
|
||||
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.WIDGET_TIMEOUT_SEC;
|
||||
import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.ACTIVE_LINES_XPATH;
|
||||
import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.ACTIVE_TAB_FILE_NAME;
|
||||
import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.ALL_TABS_XPATH;
|
||||
|
|
@ -487,7 +488,7 @@ public class CodenvyEditor {
|
|||
* @param expectedText text which should be present in the editor
|
||||
*/
|
||||
public void waitTextIntoEditor(final String expectedText) {
|
||||
waitTextIntoEditor(expectedText, ELEMENT_TIMEOUT_SEC);
|
||||
waitTextIntoEditor(expectedText, WIDGET_TIMEOUT_SEC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.che.selenium.pageobject.dashboard.account;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.ELEMENT_TIMEOUT_SEC;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.account.DashboardAccount.Locators.EDIT_BUTTON;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.account.DashboardAccount.Locators.EMAIL_FIELD;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.account.DashboardAccount.Locators.FIRST_NAME_FIELD;
|
||||
|
|
@ -80,6 +81,8 @@ public class DashboardAccount {
|
|||
|
||||
public void waitPageIsLoaded() {
|
||||
asList(EMAIL_FIELD, LOGIN_FIELD, FIRST_NAME_FIELD, LAST_NAME_FIELD, EDIT_BUTTON)
|
||||
.forEach(locator -> seleniumWebDriverHelper.waitVisibility(By.name(locator)));
|
||||
.forEach(
|
||||
locator ->
|
||||
seleniumWebDriverHelper.waitVisibility(By.name(locator), ELEMENT_TIMEOUT_SEC));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,10 @@ public class Workspaces {
|
|||
public void waitErrorNotificationContainsText(String expectedText) {
|
||||
final String textAttribute = "che-error-text";
|
||||
seleniumWebDriverHelper.waitAttributeContainsValue(
|
||||
By.xpath(ERROR_NOTIFICATION_MESSAGE_XPATH), textAttribute, expectedText);
|
||||
By.xpath(ERROR_NOTIFICATION_MESSAGE_XPATH),
|
||||
textAttribute,
|
||||
expectedText,
|
||||
ELEMENT_TIMEOUT_SEC);
|
||||
}
|
||||
|
||||
public void waitProgressBarInvisibility() {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.che.selenium.dashboard;
|
||||
|
||||
import static org.eclipse.che.commons.lang.NameGenerator.generate;
|
||||
import static org.eclipse.che.selenium.core.utils.WaitUtils.sleepQuietly;
|
||||
import static org.eclipse.che.selenium.pageobject.ProjectExplorer.FolderTypes.PROJECT_FOLDER;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.NewWorkspace.Stack.JAVA;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.ProjectSourcePage.Sources.GITHUB;
|
||||
|
|
@ -126,9 +127,15 @@ public class ImportProjectFromGitHubTest {
|
|||
|
||||
private void connectGithubAccount() {
|
||||
projectSourcePage.clickOnConnectGithubAccountButton();
|
||||
|
||||
seleniumWebDriverHelper.waitOpenedSomeWin();
|
||||
seleniumWebDriverHelper.switchToNextWindow(ideWin);
|
||||
|
||||
// workaround to avoid freezing blank popup window in chrome-node 3.141.59-dubnium
|
||||
sleepQuietly(5);
|
||||
|
||||
projectSourcePage.waitAuthorizationPageOpened();
|
||||
|
||||
projectSourcePage.typeLogin(gitHubUsername);
|
||||
projectSourcePage.typePassword(gitHubPassword);
|
||||
projectSourcePage.clickOnSignInButton();
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static List<NewWorkspace.Stack> EXPECTED_OPENSHIFT_QUICK_START_STACKS =
|
||||
asList(
|
||||
JAVA,
|
||||
BLANK,
|
||||
JAVA,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CPP,
|
||||
|
|
@ -99,8 +99,8 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static List<NewWorkspace.Stack> EXPECTED_K8S_QUICK_START_STACKS =
|
||||
asList(
|
||||
JAVA,
|
||||
BLANK,
|
||||
JAVA,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CPP,
|
||||
|
|
@ -117,9 +117,9 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static final List<NewWorkspace.Stack> EXPECTED_DOCKER_QUICK_START_STACKS =
|
||||
asList(
|
||||
BLANK,
|
||||
JAVA,
|
||||
JAVA_MYSQL,
|
||||
BLANK,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CPP,
|
||||
|
|
@ -133,8 +133,8 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static List<NewWorkspace.Stack> EXPECTED_OPENSHIFT_SINGLE_MACHINE_STACKS =
|
||||
asList(
|
||||
JAVA,
|
||||
BLANK,
|
||||
JAVA,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CAMEL_SPRINGBOOT,
|
||||
|
|
@ -159,8 +159,8 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static List<NewWorkspace.Stack> EXPECTED_K8S_SINGLE_MACHINE_STACKS =
|
||||
asList(
|
||||
JAVA,
|
||||
BLANK,
|
||||
JAVA,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CAMEL_SPRINGBOOT,
|
||||
|
|
@ -185,8 +185,8 @@ public class NewWorkspacePageTest {
|
|||
|
||||
private static List<NewWorkspace.Stack> EXPECTED_DOCKER_SINGLE_MACHINE_STACKS =
|
||||
asList(
|
||||
JAVA,
|
||||
BLANK,
|
||||
JAVA,
|
||||
DOT_NET,
|
||||
ANDROID,
|
||||
CAMEL_SPRINGBOOT,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
package org.eclipse.che.selenium.git;
|
||||
|
||||
import static org.eclipse.che.selenium.core.utils.WaitUtils.sleepQuietly;
|
||||
import static org.eclipse.che.selenium.pageobject.dashboard.ProjectSourcePage.Sources.GITHUB;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
|
|
@ -110,7 +111,12 @@ public class AuthorizeOnGithubFromDashboardTest {
|
|||
projectSourcePage.clickOnConnectGithubAccountButton();
|
||||
|
||||
// login to github
|
||||
seleniumWebDriverHelper.waitOpenedSomeWin();
|
||||
seleniumWebDriverHelper.switchToNextWindow(ideWin);
|
||||
|
||||
// workaround to avoid freezing blank popup window in chrome-node 3.141.59-dubnium
|
||||
sleepQuietly(5);
|
||||
|
||||
projectSourcePage.waitAuthorizationPageOpened();
|
||||
projectSourcePage.typeLogin(gitHubUsername);
|
||||
projectSourcePage.typePassword(gitHubPassword);
|
||||
|
|
|
|||
Loading…
Reference in New Issue