Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,6 +22,7 @@
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;
Expand All @@ -38,10 +40,12 @@
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";
Expand Down Expand Up @@ -97,7 +101,13 @@ public void checkLanguageServerInitialized() {

// 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,7 +24,6 @@
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;
Expand All @@ -49,12 +47,10 @@
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";
Expand Down Expand Up @@ -119,11 +115,11 @@ public void checkRunPlainJavaProject() {
// 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();
Expand All @@ -135,11 +131,11 @@ public void checkRunPlainJavaProject() {
// 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();
Expand Down Expand Up @@ -221,14 +217,7 @@ private void importPlainJavaApp(String url, String nameApp, String typeProject)
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();
}
Expand Down