use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project linuxtools by eclipse.
the class AbstractImageBotTest method assertConsoleContains.
protected void assertConsoleContains(String text) {
new WaitWhile(new ConsoleHasNoChange());
ConsoleView consoleView = new ConsoleView();
consoleView.open();
if (mockitoIsUsed()) {
consoleView = MockUtils.getConsoleViewText(text);
}
assertFalse("Console has no output!", consoleView.getConsoleText().isEmpty());
assertTrue("Build has not been successful", consoleView.getConsoleText().contains(text));
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class LogsTest method setUp.
@Before
public void setUp() {
assertThat(requiredService.getService(), notNullValue());
this.explorer = new OpenShiftExplorerView();
explorer.open();
explorer.activate();
this.consoleView = new ConsoleView();
this.consoleView.open();
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class LogsTest method shouldShowLogFromApplicationPodContextMenu.
@Test
public void shouldShowLogFromApplicationPodContextMenu() {
new WaitUntil(new OpenShiftResourceExists(Resource.POD, new StringStartsWith("eap-app-"), ResourceState.RUNNING, requiredProject.getProjectName(), requiredConnection.getConnection()), TimePeriod.VERY_LONG);
this.consoleView = new ConsoleView();
this.consoleView.open();
OpenShiftResource pod = OpenShiftUtils.getOpenShiftPod(requiredProject.getProjectName(), new StringStartsWith("eap-app-"), requiredConnection.getConnection());
String podName = pod.getName();
pod.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.POD_LOG).select();
new WaitUntil(new ConsoleHasText(), TimePeriod.DEFAULT);
new WaitUntil(new ConsoleHasNoChange(TimePeriod.getCustom(WAIT_CONSOLE_NO_CHANGE)), TimePeriod.VERY_LONG);
assertTrue("Console label is incorrect, it should contains project name and pod name.\n" + "but label is: " + consoleView.getConsoleLabel(), consoleView.getConsoleLabel().contains(requiredProject.getProjectName() + "\\" + podName));
assertTrue("Console text should contain output from EAP runtime", consoleView.getConsoleText().contains("Admin console is not enabled"));
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class LogsTest method shouldShowLogFromBuildPodContextMenu.
@Test
public void shouldShowLogFromBuildPodContextMenu() {
new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, new StringStartsWith("eap-app-"), ResourceState.RUNNING, requiredProject.getProjectName(), requiredConnection.getConnection()), TimePeriod.VERY_LONG);
this.consoleView = new ConsoleView();
this.consoleView.open();
OpenShiftResource pod = OpenShiftUtils.getOpenShiftPod(requiredProject.getProjectName(), Resource.BUILD, new StringStartsWith("eap-app-"), requiredConnection.getConnection());
String podName = pod.getName();
pod.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.BUILD_LOG).select();
new WaitUntil(new ConsoleHasText(), TimePeriod.LONG);
new WaitUntil(new ConsoleHasNoChange(TimePeriod.getCustom(WAIT_CONSOLE_NO_CHANGE)), TimePeriod.VERY_LONG);
assertTrue("Console label is incorrect, it should contain project name and name of build pod.\n" + "but label is: " + consoleView.getConsoleLabel(), consoleView.getConsoleLabel().contains(requiredProject.getProjectName() + "\\" + podName));
try {
new WaitUntil(new ConsoleHasText("Push successful"), TimePeriod.getCustom(WAIT_CONSOLE_PUSH_SUCCESS));
} catch (WaitTimeoutExpiredException ex) {
fail("There should be output of succesful build in console log, but there is not.\n" + "Check whether output has not changed. Assumed output in the end of log is 'Push successful'");
}
}
use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method disableShowConsoleWhenOutputChanges.
private static void disableShowConsoleWhenOutputChanges() {
ConsoleView consoleView = new ConsoleView();
consoleView.open();
new WaitUntil(new ShowConsoleOutputToolItemIsAvailable(), TimePeriod.VERY_LONG);
DefaultToolItem showConsoleOnChange = new DefaultToolItem(new WorkbenchShell(), "Show Console Output When Standard Out Changes");
showConsoleOnChange.click();
}
Aggregations