Selenium: Add/Delete 'try-catch' according to known issues (#12473)

6.19.x
Aleksandr Shmaraiev 2019-01-19 22:29:28 +02:00 committed by GitHub
parent cba874fc4f
commit eaf20dfa7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 17 deletions

View File

@ -11,6 +11,7 @@
*/
package org.eclipse.che.selenium.languageserver;
import static org.eclipse.che.selenium.core.TestGroup.UNDER_REPAIR;
import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Assistant.ASSISTANT;
import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Assistant.GO_TO_SYMBOL;
import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.CREATE_PROJECT;
@ -21,6 +22,7 @@ import static org.eclipse.che.selenium.pageobject.CodenvyEditor.MarkerLocator.ER
import static org.eclipse.che.selenium.pageobject.Wizard.SamplesName.NODEJS_HELLO_WORLD;
import static org.openqa.selenium.Keys.BACK_SPACE;
import static org.openqa.selenium.Keys.ENTER;
import static org.testng.Assert.fail;
import com.google.inject.Inject;
import org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Project;
@ -38,10 +40,12 @@ import org.eclipse.che.selenium.pageobject.ProjectExplorer;
import org.eclipse.che.selenium.pageobject.PullRequestPanel;
import org.eclipse.che.selenium.pageobject.Wizard;
import org.openqa.selenium.Keys;
import org.openqa.selenium.TimeoutException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/** @author Skoryk Serhii */
@Test(groups = UNDER_REPAIR)
public class JsonFileEditingTest {
private static final String PROJECT_NAME = "nodejs-hello-world";
@ -97,7 +101,13 @@ public class JsonFileEditingTest {
// check JSON language server initialized
consoles.selectProcessByTabName("dev-machine");
consoles.waitExpectedTextIntoConsole(LS_INIT_MESSAGE);
try {
consoles.waitExpectedTextIntoConsole(LS_INIT_MESSAGE);
} catch (TimeoutException ex) {
// remove try-catch block after issue has been resolved
fail("Known permanent failure https://github.com/eclipse/che/issues/12472");
}
}
@Test(priority = 1)

View File

@ -11,7 +11,6 @@
*/
package org.eclipse.che.selenium.plainjava;
import static org.eclipse.che.selenium.core.TestGroup.UNDER_REPAIR;
import static org.eclipse.che.selenium.core.constant.TestIntelligentCommandsConstants.CommandsDefaultNames.JAVA_NAME;
import static org.eclipse.che.selenium.core.constant.TestIntelligentCommandsConstants.CommandsGoals.RUN_GOAL;
import static org.eclipse.che.selenium.core.constant.TestIntelligentCommandsConstants.CommandsTypes.JAVA_TYPE;
@ -25,7 +24,6 @@ import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.W
import static org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants.Workspace.WORKSPACE;
import static org.eclipse.che.selenium.core.constant.TestProjectExplorerContextMenuConstants.SubMenuNew.FOLDER;
import static org.eclipse.che.selenium.pageobject.CodenvyEditor.MarkerLocator.ERROR;
import static org.testng.Assert.fail;
import com.google.inject.Inject;
import com.google.inject.name.Named;
@ -49,12 +47,10 @@ import org.eclipse.che.selenium.pageobject.Wizard;
import org.eclipse.che.selenium.pageobject.intelligent.CommandsEditor;
import org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer;
import org.openqa.selenium.Keys;
import org.openqa.selenium.TimeoutException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/** @author Aleksandr Shmaraev */
@Test(groups = UNDER_REPAIR)
public class RunPlainJavaProjectTest {
private static final String PROJECT_NAME = "run-plain-java-project";
private static final String NEW_PACKAGE = "base.test";
@ -119,11 +115,11 @@ public class RunPlainJavaProjectTest {
// create the instance of the library
projectExplorer.openItemByPath(PROJECT_NAME + "/src/com/company/nba/MainClass.java");
codenvyEditor.waitActive();
codenvyEditor.setCursorToLine(19);
codenvyEditor.setCursorToLine(20);
codenvyEditor.typeTextIntoEditor(Keys.TAB.toString());
codenvyEditor.typeTextIntoEditor("Mockito mockito = new Mockito();");
codenvyEditor.waitTextIntoEditor("Mockito mockito = new Mockito();");
codenvyEditor.waitMarkerInPosition(ERROR, 19);
codenvyEditor.waitMarkerInPosition(ERROR, 20);
// check code assist
codenvyEditor.launchPropositionAssistPanel();
@ -135,11 +131,11 @@ public class RunPlainJavaProjectTest {
// create the instance of new Java class
projectExplorer.openItemByPath(PROJECT_NAME + "/src/com/company/nba/MainClass.java");
codenvyEditor.waitActive();
codenvyEditor.setCursorToLine(22);
codenvyEditor.setCursorToLine(23);
codenvyEditor.typeTextIntoEditor(Keys.TAB.toString());
codenvyEditor.typeTextIntoEditor("A a = new A();");
codenvyEditor.waitTextIntoEditor("A a = new A();");
codenvyEditor.waitMarkerInPosition(ERROR, 22);
codenvyEditor.waitMarkerInPosition(ERROR, 23);
// check the code assist
codenvyEditor.launchPropositionAssistPanel();
@ -221,14 +217,7 @@ public class RunPlainJavaProjectTest {
projectWizard.waitCreateProjectWizardForm();
projectWizard.selectTypeProject(typeProject);
projectWizard.clickNextButton();
try {
projectWizard.waitExpTextInSourceFolder("src", Wizard.TypeFolder.SOURCE_FOLDER);
} catch (TimeoutException ex) {
// remove try-catch block after issue has been resolved
fail("Known permanent failure https://github.com/eclipse/che/issues/11516");
}
projectWizard.waitExpTextInSourceFolder("src", Wizard.TypeFolder.SOURCE_FOLDER);
projectWizard.clickSaveButton();
projectWizard.waitCloseProjectConfigForm();
}