diff --git a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/NewWorkspace.java b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/NewWorkspace.java index 17311c4badf..a7d349c1c82 100644 --- a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/NewWorkspace.java +++ b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/NewWorkspace.java @@ -35,6 +35,7 @@ import org.eclipse.che.selenium.core.webdriver.WebDriverWaitFactory; import org.eclipse.che.selenium.pageobject.TestWebElementRenderChecker; import org.openqa.selenium.By; +import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; @@ -185,7 +186,12 @@ public boolean isDevfileVisible(Devfile devfile) { public void selectDevfile(Devfile devfile) { waitDevfiles(asList(devfile)); - seleniumWebDriverHelper.waitAndClick(By.xpath(format(DEVFILE_ROW_XPATH, devfile.getId()))); + try { + seleniumWebDriverHelper.waitAndClick(By.xpath(format(DEVFILE_ROW_XPATH, devfile.getId()))); + waitDevfileSelected(devfile); + } catch (TimeoutException ex) { + seleniumWebDriverHelper.waitAndClick(By.xpath(format(DEVFILE_ROW_XPATH, devfile.getId()))); + } } public boolean isCreateWorkspaceButtonEnabled() { diff --git a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/theia/TheiaIde.java b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/theia/TheiaIde.java index 5bfbf747d9b..a98436204e6 100644 --- a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/theia/TheiaIde.java +++ b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/theia/TheiaIde.java @@ -28,6 +28,7 @@ import org.eclipse.che.selenium.core.utils.WaitUtils; import org.eclipse.che.selenium.core.webdriver.SeleniumWebDriverHelper; import org.openqa.selenium.By; +import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; @@ -151,7 +152,12 @@ public void waitNotificationPanelClosed() { } public void waitTheiaIde() { - seleniumWebDriverHelper.waitVisibility(theiaIde, PREPARING_WS_TIMEOUT_SEC); + try { + seleniumWebDriverHelper.waitVisibility(theiaIde, PREPARING_WS_TIMEOUT_SEC); + } catch (TimeoutException ex) { + switchToIdeFrame(); + seleniumWebDriverHelper.waitVisibility(theiaIde, PREPARING_WS_TIMEOUT_SEC); + } } public void waitTheiaIdeTopPanel() { diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateAndDeleteProjectsTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateAndDeleteProjectsTest.java index 641ba2963d9..93627bf3a98 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateAndDeleteProjectsTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateAndDeleteProjectsTest.java @@ -79,8 +79,9 @@ public void createProjectTest() { dashboardWindow = seleniumWebDriver.getWindowHandle(); // we are selecting 'Java' stack from the 'All Devfile' tab for compatibility with OSIO - newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); newWorkspace.typeWorkspaceName(WORKSPACE); + newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); projectSourcePage.waitCreatedProjectButton(CONSOLE_JAVA_SIMPLE); // create 'console-java-simple-1' project diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateWorkspaceTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateWorkspaceTest.java index 2fc7d606e5a..b6efd509b60 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateWorkspaceTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateWorkspaceTest.java @@ -81,6 +81,7 @@ public void checkWorkspaceName() { public void checkProjectSourcePage() { // add a project from the 'console-java-simple' sample newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); projectSourcePage.waitOpened(); projectSourcePage.waitCreatedProjectButton(projectName); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportMavenProjectFromGitTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportMavenProjectFromGitTest.java index e7236e690d7..e081c64df95 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportMavenProjectFromGitTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportMavenProjectFromGitTest.java @@ -77,9 +77,10 @@ public void checkAbilityImportMavenProjectTest() { workspaces.clickOnAddWorkspaceBtn(); newWorkspace.waitToolbar(); + newWorkspace.typeWorkspaceName(WORKSPACE); // we are selecting 'Java' stack from the 'All Devfile' tab for compatibility with OSIO newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); - newWorkspace.typeWorkspaceName(WORKSPACE); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); projectSourcePage.clickOnAddOrImportProjectButton(); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportProjectFromGitHubTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportProjectFromGitHubTest.java index 06e56508345..cc0b4b224dd 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportProjectFromGitHubTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/ImportProjectFromGitHubTest.java @@ -97,9 +97,10 @@ public void checkAbilityImportProjectFromGithub() { dashboard.selectWorkspacesItemOnDashboard(); workspaces.clickOnAddWorkspaceBtn(); newWorkspace.waitToolbar(); + newWorkspace.typeWorkspaceName(WORKSPACE); // we are selecting 'Java' stack from the 'All Devfile' tab for compatibility with OSIO newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); - newWorkspace.typeWorkspaceName(WORKSPACE); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); projectSourcePage.clickOnAddOrImportProjectButton(); projectSourcePage.selectSourceTab(GITHUB); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/AddWorkspaceToOrganizationTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/AddWorkspaceToOrganizationTest.java index 82aa3ff191a..7c82b74e91e 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/AddWorkspaceToOrganizationTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/AddWorkspaceToOrganizationTest.java @@ -173,8 +173,9 @@ private void createWorkspace(String organizationName, String workspaceName) { newWorkspace.waitToolbar(); newWorkspace.openOrganizationsList(); newWorkspace.selectOrganizationFromList(organizationName); - newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); newWorkspace.typeWorkspaceName(workspaceName); + newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); newWorkspace.clickOnCreateButtonAndEditWorkspace(); workspaceDetails.waitToolbarTitleName(workspaceName); } diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceOwnerTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceOwnerTest.java index 32db491dbf2..f6c6e4f216f 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceOwnerTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceOwnerTest.java @@ -157,8 +157,9 @@ private void createWorkspace(String organizationName, String workspaceName) { newWorkspace.waitToolbar(); newWorkspace.openOrganizationsList(); newWorkspace.selectOrganizationFromList(organizationName); - newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); newWorkspace.typeWorkspaceName(workspaceName); + newWorkspace.selectDevfile(Devfile.JAVA_MAVEN); + newWorkspace.waitDevfileSelected(Devfile.JAVA_MAVEN); newWorkspace.clickOnCreateButtonAndEditWorkspace(); workspaceDetails.waitToolbarTitleName(workspaceName); } diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithKeepDirectoryTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithKeepDirectoryTest.java index 139da544fa9..a198faa0269 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithKeepDirectoryTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithKeepDirectoryTest.java @@ -71,7 +71,6 @@ public void factoryWithDirectUrlWithKeepDirectory() { theiaIde.switchToIdeFrame(); theiaIde.waitTheiaIde(); theiaIde.waitLoaderInvisibility(); - theiaIde.waitNotificationEqualsTo("Che Workspace: Finished cloning projects."); theiaIde.waitNotificationDisappearance( "Che Workspace: Finished cloning projects.", UPDATING_PROJECT_TIMEOUT_SEC); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithRootFolderTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithRootFolderTest.java index 6de230a3482..af15c260315 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithRootFolderTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithRootFolderTest.java @@ -90,7 +90,6 @@ public void factoryWithDirectUrlWithRootFolder() { theiaIde.switchToIdeFrame(); theiaIde.waitTheiaIde(); theiaIde.waitLoaderInvisibility(); - theiaIde.waitNotificationEqualsTo("Che Workspace: Finished cloning projects."); theiaIde.waitNotificationDisappearance( "Che Workspace: Finished cloning projects.", UPDATING_PROJECT_TIMEOUT_SEC); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithSpecificBranchTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithSpecificBranchTest.java index 24b26de5456..02d51530d0b 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithSpecificBranchTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/DirectUrlFactoryWithSpecificBranchTest.java @@ -90,7 +90,6 @@ public void factoryWithDirectUrlWithSpecificBranch() { theiaIde.switchToIdeFrame(); theiaIde.waitTheiaIde(); theiaIde.waitLoaderInvisibility(); - theiaIde.waitNotificationEqualsTo("Che Workspace: Finished cloning projects."); theiaIde.waitNotificationDisappearance( "Che Workspace: Finished cloning projects.", UPDATING_PROJECT_TIMEOUT_SEC);