use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method openNewServerAdapterWizard.
private void openNewServerAdapterWizard() {
NewServerWizard dialog = new NewServerWizard();
dialog.open();
NewServerWizardPage page = new NewServerWizardPage(dialog);
dialog.open();
new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
page.selectType(OpenShiftLabel.Others.OS3_SERVER_ADAPTER);
dialog.next();
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method handleCheatSheetCreateServerAdapter.
public static void handleCheatSheetCreateServerAdapter() {
try {
new WaitUntil(new ShellIsAvailable(new WithTextMatcher(new RegexMatcher(OpenShiftLabel.Shell.CHEATSHEET + "|" + OpenShiftLabel.Shell.CREATE_SERVER_ADAPTER))), TimePeriod.LONG);
new NoButton().click();
new DefaultShell("Create server adapter");
new NoButton().click();
} catch (CoreLayerException ex) {
// Swallow, shells are not opened
} catch (WaitTimeoutExpiredException e) {
// Also swallow, shells are not opened
}
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method openImportApplicationWizardFromOpenshiftView.
public static ImportApplicationWizard openImportApplicationWizardFromOpenshiftView(OpenShiftProject openshiftProject) {
openshiftProject.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
return new ImportApplicationWizard();
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method openServerSettingsWizardFromOpenshiftView.
public static ServerSettingsWizard openServerSettingsWizardFromOpenshiftView(Service openshiftService) {
openshiftService.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS), TimePeriod.LONG);
return new ServerSettingsWizard();
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class OpenShiftServiceRequirement method waitForResources.
private void waitForResources(final String serviceName, final String projectName, final IService service) {
new WaitUntil(new ServicePodsExist(serviceName, projectName, connection), TimePeriod.VERY_LONG);
new WaitUntil(new ResourceExists(ResourceKind.REPLICATION_CONTROLLER, new BaseMatcher<List<IResource>>() {
@Override
public boolean matches(Object item) {
if (!(item instanceof List)) {
return false;
}
@SuppressWarnings("unchecked") List<IReplicationController> resources = (List<IReplicationController>) item;
if (resources.isEmpty()) {
return false;
}
return ResourceUtils.getReplicationControllerFor(service, resources) != null;
}
@Override
public void describeTo(Description description) {
}
}, projectName, connection), TIMEPERIOD_WAIT_FOR_BUILD);
}
Aggregations