diff --git a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/ProjectExplorer.java b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/ProjectExplorer.java index 6f6a444c8a..bdf7c149a0 100644 --- a/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/ProjectExplorer.java +++ b/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/ProjectExplorer.java @@ -639,7 +639,8 @@ public class ProjectExplorer { By.xpath( format( "//div[@path='/%s']/div/*[local-name() = 'svg' and @id='%s']", - path, folderType.get()))); + path, folderType.get())), + ELEMENT_TIMEOUT_SEC); } /** diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateFactoryTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateFactoryTest.java index 54a082093c..b1d033fcde 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateFactoryTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateFactoryTest.java @@ -142,9 +142,7 @@ public class CreateFactoryTest { createFactoryPage.typeGitRepositoryUrl(repositoryUrl); createFactoryPage.typeFactoryName(FACTORY_CREATED_FROM_GIT_NAME); - assertTrue( - createFactoryPage.isCreateFactoryButtonEnabled(), - "Known issue https://github.com/eclipse/che/issues/9709"); + assertTrue(createFactoryPage.isCreateFactoryButtonEnabled()); // create factory createFactoryPage.clickOnCreateFactoryButton(); diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckOpenFileFeatureTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckOpenFileFeatureTest.java index cdf9d4c93e..db015e0ce8 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckOpenFileFeatureTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/factory/CheckOpenFileFeatureTest.java @@ -13,9 +13,10 @@ package org.eclipse.che.selenium.factory; import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.CREATE_PROJECT; import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.WORKSPACE; -import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.ELEMENT_TIMEOUT_SEC; +import static org.eclipse.che.selenium.core.constant.TestTimeoutsConstants.WIDGET_TIMEOUT_SEC; import static org.eclipse.che.selenium.pageobject.Wizard.SamplesName.WEB_JAVA_SPRING; import static org.eclipse.che.selenium.pageobject.dashboard.DashboardFactories.AddAction.OPEN_FILE; +import static org.testng.Assert.fail; import com.google.inject.Inject; import org.eclipse.che.commons.lang.NameGenerator; @@ -34,6 +35,7 @@ import org.eclipse.che.selenium.pageobject.ProjectExplorer; import org.eclipse.che.selenium.pageobject.Wizard; import org.eclipse.che.selenium.pageobject.dashboard.Dashboard; import org.eclipse.che.selenium.pageobject.dashboard.DashboardFactories; +import org.openqa.selenium.TimeoutException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -90,7 +92,13 @@ public class CheckOpenFileFeatureTest { loadingBehaviorPage.waitWhileLoadPageIsClosed(); seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); projectExplorer.waitItem(PROJECT_NAME); - editor.waitTabIsPresent("web-java-spring", ELEMENT_TIMEOUT_SEC); + + try { + editor.waitTabIsPresent("web-java-spring", WIDGET_TIMEOUT_SEC); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known random failure https://github.com/eclipse/che/issues/11001"); + } } private void createProject(String projectName) { diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithTerminalTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithTerminalTest.java index 1811968087..3b8c6000a9 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithTerminalTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/miscellaneous/WorkingWithTerminalTest.java @@ -176,38 +176,37 @@ public class WorkingWithTerminalTest { for (String partOfContent : CHECK_MC_OPENING) { terminal.waitTextInFirstTerminal(partOfContent); } + terminal.waitNoTextInFirstTerminal(".dockerenv"); } catch (TimeoutException ex) { // remove try-catch block after issue has been resolved - fail("Known issue https://github.com/eclipse/che/issues/10854", ex); + fail("Known random failure https://github.com/eclipse/che/issues/10854", ex); } - terminal.waitNoTextInFirstTerminal(".dockerenv"); consoles.clickOnMaximizePanelIcon(); loader.waitOnClosed(); // check resize of the terminal - for (String partOfContent : CHECK_MC_OPENING) { - try { + try { + for (String partOfContent : CHECK_MC_OPENING) { terminal.waitTextInFirstTerminal(partOfContent); - } catch (TimeoutException ex) { - // remove try-catch block after issue has been resolved - fail("Known issue https://github.com/eclipse/che/issues/10854"); } + terminal.waitTextInFirstTerminal(".dockerenv"); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known random failure https://github.com/eclipse/che/issues/10854", ex); } - terminal.waitTextInFirstTerminal(".dockerenv"); consoles.clickOnMaximizePanelIcon(); loader.waitOnClosed(); - for (String partOfContent : CHECK_MC_OPENING) { - terminal.waitTextInFirstTerminal(partOfContent); - } - try { + for (String partOfContent : CHECK_MC_OPENING) { + terminal.waitTextInFirstTerminal(partOfContent); + } terminal.waitNoTextInFirstTerminal(".dockerenv"); } catch (TimeoutException ex) { // remove try-catch block after issue has been resolved - fail("Known issue https://github.com/eclipse/che/issues/10854", ex); + fail("Known random failure https://github.com/eclipse/che/issues/10854", ex); } } diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/ProjectStateAfterWorkspaceRestartTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/ProjectStateAfterWorkspaceRestartTest.java index 337519580e..ca450c3198 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/ProjectStateAfterWorkspaceRestartTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/ProjectStateAfterWorkspaceRestartTest.java @@ -14,6 +14,7 @@ package org.eclipse.che.selenium.workspaces; import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.STOP_WORKSPACE; import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.WORKSPACE; import static org.eclipse.che.selenium.core.project.ProjectTemplates.MAVEN_SPRING; +import static org.testng.Assert.fail; import com.google.inject.Inject; import java.net.URL; @@ -27,6 +28,7 @@ import org.eclipse.che.selenium.pageobject.Ide; import org.eclipse.che.selenium.pageobject.Menu; import org.eclipse.che.selenium.pageobject.ProjectExplorer; import org.eclipse.che.selenium.pageobject.ToastLoader; +import org.openqa.selenium.TimeoutException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -95,7 +97,13 @@ public class ProjectStateAfterWorkspaceRestartTest { } private void checkFilesAreOpened() { - projectExplorer.waitItem(PROJECT_NAME + "/src/main/webapp/WEB-INF"); + try { + projectExplorer.waitItem(PROJECT_NAME + "/src/main/webapp/WEB-INF"); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known random failure https://github.com/eclipse/che/issues/11000"); + } + projectExplorer.waitItem(PROJECT_NAME + "/src/main/webapp/WEB-INF/jsp"); projectExplorer.waitItem(PROJECT_NAME + "/src/main/webapp/index.jsp"); projectExplorer.waitItem(