use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CDKServerEditorAbstractTest method checkEditorStateAfterSave.
protected void checkEditorStateAfterSave(String location, boolean canSave) {
LabeledText label = ((CDKPart) editor).getMinishiftBinaryLabel();
label.setText(location);
new WaitUntil(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.SHORT, false);
new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.DEFAULT, false);
if (canSave) {
verifyEditorCanSave();
} else {
verifyEditorCannotSave();
}
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method setupCDKServerAbstract.
@Before
public void setupCDKServerAbstract() {
// $NON-NLS-1$
log.info("Open Servers view tab");
setServersView(new CDKServersView());
getServersView().open();
// $NON-NLS-1$
log.info("Getting server object from Servers View with name: " + getServerAdapter());
setCDKServer(getServersView().getServer(getServerAdapter()));
new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method addNewCDK32Server.
/**
* Creates new CDK 3.2+ server adapter via ServersView -> New -> Server
*
* @param serverAdapter server adapter name
* @param hypervisor hypervisor to use
* @param path path to minishift binary file
* @param profile what profile to use
* @param username redhat developers username
* @param password user password
*/
public static void addNewCDK32Server(String serverAdapter, String hypervisor, String path, String profile, String username, String password) {
NewCDKServerWizard dialog = setupFirstNewServerWizardPage(CDK32_SERVER_NAME, serverAdapter);
// set second new server dialog page
NewCDK32ServerWizardPage containerPage = new NewCDK32ServerWizardPage();
containerPage.setCredentials(username, password);
if (hypervisor != null && !hypervisor.isEmpty()) {
// $NON-NLS-1$
log.info("Setting hypervisor to " + hypervisor);
containerPage.setHypervisor(hypervisor);
}
// $NON-NLS-1$
log.info("Setting minishift binary file folder to " + path);
containerPage.setMinishiftBinary(path);
if (!profile.isEmpty()) {
// $NON-NLS-1$
log.info("Setting minishift profile to " + profile);
containerPage.setMinishiftProfile(profile);
} else {
log.info("Keeping minishift profile default: " + containerPage.getMinishiftProfile());
}
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
// $NON-NLS-1$
log.info("Finishing Add new server dialog");
if (!(new FinishButton().isEnabled())) {
// $NON-NLS-1$
log.error("Finish button was not enabled");
}
dialog.finish();
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CDK3ServerEditorTest method setServerEditor.
public void setServerEditor() {
serversView = new CDKServersView();
serversView.open();
serversView.getServer(getServerAdapter()).open();
editor = new CDK3ServerEditor(getServerAdapter());
editor.activate();
new WaitUntil(new JobIsRunning(), TimePeriod.getCustom(1), false);
}
use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.
the class CDKServerAdapterAbstractTest method addNewMinishiftServer.
/**
* Creates new Minishift server adapter via ServersView -> New -> Server
*
* @param serverAdapter server adapter name
* @param hypervisor hypervisor to use
* @param path path to minishift binary file
* @param profile what profile to use
*/
public static void addNewMinishiftServer(String serverAdapter, String hypervisor, String path, String profile) {
NewCDKServerWizard dialog = setupFirstNewServerWizardPage(MINISHIFT_SERVER_NAME, serverAdapter);
// set second new server dialog page
NewMinishiftServerWizardPage containerPage = new NewMinishiftServerWizardPage();
if (!StringUtils.isEmptyOrNull(hypervisor)) {
// $NON-NLS-1$
log.info("Setting hypervisor to " + hypervisor);
containerPage.setHypervisor(hypervisor);
}
// $NON-NLS-1$
log.info("Setting minishift binary file folder to " + path);
containerPage.setMinishiftBinary(path);
// $NON-NLS-1$
log.info("Setting minishift profile to " + profile);
containerPage.setMinishiftProfile(profile);
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
// $NON-NLS-1$
log.info("Finishing Add new server dialog");
if (!(new FinishButton().isEnabled())) {
// $NON-NLS-1$
log.error("Finish button was not enabled");
}
dialog.finish(TimePeriod.MEDIUM);
}
Aggregations