use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project linuxtools by eclipse.
the class ContainerLogTest method getContainerLog.
private String getContainerLog() {
new ContextMenu().getItem("Display Log").select();
String consoleText;
if (mockitoIsUsed()) {
ConsoleView consoleView = new ConsoleView();
consoleView.open();
consoleView = MockUtils.getConsoleViewText(CONSOLE_TEXT);
consoleText = consoleView.getConsoleText();
} else {
DockerTerminal dockerTerminal = new DockerTerminal();
dockerTerminal.activate();
consoleText = dockerTerminal.getTextFromPage(CONTAINER_NAME);
}
return consoleText;
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class PublishChangesTest method changeProjectAndVerifyAutoPublish.
private void changeProjectAndVerifyAutoPublish() {
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
projectExplorer.getProject(PROJECT_NAME).select();
ProjectItem projectItem = projectExplorer.getProject(PROJECT_NAME).getProjectItem("Java Resources", "src/main/java", "org.jboss.as.quickstarts.helloworld", "HelloService.java");
projectItem.select();
projectItem.open();
TextEditor textEditor = new TextEditor("HelloService.java");
textEditor.setText(PUBLISHED_CODE);
textEditor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
new WaitUntil(new ConsoleHasNoChange(), TimePeriod.VERY_LONG);
assertTrue("Local changes performed to project have not been autopublished, or at least rsync " + "output in console view does not contain information about sending incremental list of changes," + "specifically with changed class " + changedClass, new ConsoleView().getConsoleText().contains(changedClass));
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method collectConsoleOutput.
/**
* Prints out console output via logger and returns console content
*
* @param log reference to logger
* @param onFail if true then error log method is used, debug otherwise
* @return returns console output
*/
public String collectConsoleOutput(Logger log, boolean onFail) {
String consoleOutput = "Console is empty...";
ConsoleView view = new ConsoleView();
view.open();
if (view.getConsoleText() != null) {
new WaitWhile(new ConsoleHasNoChange(), TimePeriod.DEFAULT, false);
consoleOutput = view.getConsoleLabel() + "\n\r" + view.getConsoleText();
if (onFail) {
log.info("Loggin console, called from test failure");
log.error(consoleOutput);
} else {
log.info("Logging console for debugging purposes");
log.debug(consoleOutput);
}
}
return consoleOutput;
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project linuxtools by eclipse.
the class BrowserContentsCheck method evaluateBrowserPage.
/**
* Evaluate page text, if it not empty or without error.
*
* @param browserPage
*/
private static void evaluateBrowserPage(String browserPage) {
ConsoleView consoleView = new ConsoleView();
consoleView.open();
assertFalse("Browser contains text 'Status 404'\n Console output:\n" + consoleView.getConsoleText() + System.getProperty("line.separator") + "Browser contents:" + browserPage, browserPage.contains("Status 404") || browserPage.contains("404 - Not Found"));
assertFalse("Browser contains text 'Error processing request'\n Console output:\n" + consoleView.getConsoleText() + System.getProperty("line.separator") + "Browser contents:" + browserPage, browserPage.contains("Error processing request"));
assertFalse("Browser contains text 'Forbidden'\n Console output:\n" + consoleView.getConsoleText() + System.getProperty("line.separator") + "Browser contents:" + browserPage, browserPage.contains("Forbidden"));
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project linuxtools by eclipse.
the class AbstractDockerBotTest method clearConsole.
protected void clearConsole() {
ConsoleView cview = new ConsoleView();
cview.open();
try {
cview.clearConsole();
} catch (CoreLayerException ex) {
// swallow intentionally
}
}
Aggregations