diff --git a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullTest.java b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullTest.java index f1c53ec18df..3184dbb5285 100644 --- a/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullTest.java +++ b/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/git/GitPullTest.java @@ -15,6 +15,7 @@ import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Git.Remotes.PULL; import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Git.Remotes.REMOTES_TOP; import static org.eclipse.che.selenium.pageobject.Wizard.TypeProject.BLANK; +import static org.testng.Assert.fail; import com.google.inject.Inject; import com.google.inject.name.Named; @@ -31,6 +32,7 @@ import org.eclipse.che.selenium.pageobject.Menu; import org.eclipse.che.selenium.pageobject.NotificationsPopupPanel; import org.eclipse.che.selenium.pageobject.ProjectExplorer; +import org.openqa.selenium.TimeoutException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -92,7 +94,7 @@ public void pullTest() throws Exception { git.waitGitStatusBarWithMess( String.format("Successfully pulled from %s", testRepo.getHtmlUrl())); - checkPullAfterUpdatingContent(readmeTxtFileName, currentTimeInMillis); + checkPullAfterUpdatingContent(jsFileName, currentTimeInMillis); checkPullAfterUpdatingContent(htmlFileName, currentTimeInMillis); checkPullAfterUpdatingContent(readmeTxtFileName, currentTimeInMillis); @@ -105,7 +107,7 @@ public void pullTest() throws Exception { readmeTxtFileName, String.format("/%s/%s/%s", PROJECT_NAME, folderWithPlainFilesPath, readmeTxtFileName)); checkPullAfterRemovingContent( - "README.md", + readmeMdFileName, String.format("/%s/%s/%s", PROJECT_NAME, folderWithPlainFilesPath, readmeMdFileName)); } @@ -129,7 +131,14 @@ private void checkPullAfterUpdatingContent(String tabNameOpenedFile, String expe private void checkPullAfterRemovingContent( String tabNameOpenedFile, String pathToItemInProjectExplorer) { - editor.waitTabIsNotPresent(tabNameOpenedFile); + + try { + editor.waitTabIsNotPresent(tabNameOpenedFile); + } catch (TimeoutException ex) { + // remove try-catch block after issue has been resolved + fail("Known random failure https://github.com/eclipse/che/issues/11648"); + } + projectExplorer.waitLibrariesAreNotPresent(pathToItemInProjectExplorer); } }