Selenium: Remove workaround in "MacrosCommandsEditorTest" selenium test (#9460)

6.19.x
Igor Ohrimenko 2018-04-17 15:57:00 +03:00 committed by GitHub
parent fa046bd6e3
commit 233ac4047d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 16 deletions

View File

@ -32,7 +32,6 @@ import org.eclipse.che.selenium.pageobject.ProjectExplorer;
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;
@ -103,7 +102,8 @@ public class MacrosCommandsEditorTest {
commandsEditor.typeTextIntoEditor(Keys.SPACE.toString());
commandsEditor.enterMacroCommandByDoubleClick("${current.project.path}");
commandsEditor.waitTextIntoEditor("echo ${current.project.path}");
runCommandWithCheckResult();
commandsEditor.clickOnRunButton();
consoles.waitExpectedTextIntoConsole(PATH_TO_ROOT_FOLDER);
}
@Test(priority = 2)
@ -157,18 +157,4 @@ public class MacrosCommandsEditorTest {
commandsExplorer.waitCommandInExplorerByName(JAVA_NAME);
commandsEditor.waitTabIsPresent(JAVA_NAME);
}
/**
* in very rare cases on the OCP platform we have a situation when after command start, the macros
* output is not displayed
*/
private void runCommandWithCheckResult() {
commandsEditor.clickOnRunButton();
try {
consoles.waitExpectedTextIntoConsole(PATH_TO_ROOT_FOLDER);
} catch (TimeoutException ex) {
commandsEditor.clickOnRunButton();
consoles.waitExpectedTextIntoConsole(PATH_TO_ROOT_FOLDER);
}
}
}