Search in sources :

Example 11 with ConsoleView

use of org.eclipse.reddeer.eclipse.ui.console.ConsoleView in project jbosstools-openshift by jbosstools.

the class CDKServerAdapterAbstractTest method verifyConsoleContainsRegEx.

/**
 * Verification of successful registration of rhel image during cdk start up
 * Checks for reg. expressions in console
 */
public void verifyConsoleContainsRegEx(String regex) {
    ConsoleView view = new ConsoleView();
    view.open();
    String consoleText = view.getConsoleText();
    Pattern pattern = Pattern.compile(regex);
    assertTrue("Console text does not contains regex: \r\n" + regex + "\r\nConsole text:\r\n" + consoleText, pattern.matcher(consoleText).find());
}
Also used : Pattern(java.util.regex.Pattern) ConsoleView(org.eclipse.reddeer.eclipse.ui.console.ConsoleView)

Aggregations

ConsoleView (org.eclipse.reddeer.eclipse.ui.console.ConsoleView)11 ConsoleHasNoChange (org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange)5 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)4 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)3 ConsoleHasText (org.eclipse.reddeer.eclipse.condition.ConsoleHasText)2 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)2 StringStartsWith (org.hamcrest.core.StringStartsWith)2 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)2 OpenShiftResource (org.jboss.tools.openshift.reddeer.view.resources.OpenShiftResource)2 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)2 Test (org.junit.Test)2 Pattern (java.util.regex.Pattern)1 DockerTerminal (org.eclipse.linuxtools.docker.reddeer.ui.DockerTerminal)1 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 ProjectItem (org.eclipse.reddeer.eclipse.core.resources.ProjectItem)1 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)1 ContextMenu (org.eclipse.reddeer.swt.impl.menu.ContextMenu)1 DefaultToolItem (org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1