use of org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2 in project jbosstools-openshift by jbosstools.
the class BrowserIsReadyElseReloadCondition method test.
@Override
public boolean test() {
BrowserEditor browserEditor = null;
try {
browserEditor = new BrowserEditor(new BaseMatcher<String>() {
@Override
public boolean matches(Object arg0) {
return true;
}
@Override
public void describeTo(Description arg0) {
// TODO Auto-generated method stub
}
});
} catch (CoreLayerException ex) {
LOGGER.debug("CoreLayerException in waiting for browser in BrowserIsReadyElseReloadCondition");
LOGGER.debug(StackTraceUtils.stackTraceToString(ex));
return false;
}
String text = browserEditor.getText();
if (text.contains("Unable to load page") || text.contains("404")) {
LOGGER.debug("Refreshing browser");
new ServersView2().open();
serverAdapter.select();
new ContextMenuItem("Show In", "Web Browser").select();
return false;
} else {
// Browser is ready
return true;
}
}
use of org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2 in project jbosstools-openshift by jbosstools.
the class CreateServerAdapterTest method testCreateOpenShift3ServerAdapterViaServersView.
@Test
public void testCreateOpenShift3ServerAdapterViaServersView() {
ServersView2 serversView = new ServersView2();
serversView.open();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_SERVER).select();
new DefaultShell(OpenShiftLabel.Shell.ADAPTER);
new DefaultTreeItem(OpenShiftLabel.Others.OS3_SERVER_ADAPTER).select();
next();
next();
setAdapterDetailsAndCreateAdapterAndVerifyExistence();
}
use of org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2 in project jbosstools-openshift by jbosstools.
the class CDKTestUtils method getAllServers.
public static List<Server> getAllServers() {
log.info("Collecting all server adapters");
ServersView2 view = new ServersView2();
view.open();
return view.getServers();
}
use of org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2 in project jbosstools-openshift by jbosstools.
the class CDKTestUtils method deleteCDEServer.
public static void deleteCDEServer(String adapter) {
// $NON-NLS-1$
log.info("Deleting Container Development Environment server adapter: " + adapter);
ServersView2 servers = new ServersView2();
servers.open();
try {
servers.getServer(adapter).delete(true);
} catch (EclipseLayerException exc) {
log.error(exc.getMessage());
exc.printStackTrace();
}
}
use of org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2 in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method waitForserverAdapterToBeInRightState.
private static void waitForserverAdapterToBeInRightState() {
new WaitUntil(new ServerHasState(new ServersView2().getServer(serverAdapter.getLabel()), ServerState.DEBUGGING), TimePeriod.VERY_LONG);
new WaitUntil(new ServerHasPublishState(new ServersView2().getServer(serverAdapter.getLabel()), ServerPublishState.SYNCHRONIZED));
}
Aggregations