use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class LaunchConfigurationsDialog method run.
/**
* Executes configuration
*/
public void run() {
new PushButton(this, "Run").click();
new WaitWhile(new ShellIsAvailable(this));
new WaitUntil(new JobIsRunning());
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class LaunchConfigurationsDialog method close.
/**
* Presses Close button on the Dialog.
*/
public void close() {
new PushButton(this, "Close").click();
new WaitWhile(new ShellIsAvailable(this));
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class DriverDefinitionFactory method createDatabaseDriverDefinition.
/**
* Creates Driver definition based on DatabaseRequirement configuration
* @param conf given database requirement configuration
*/
public static void createDatabaseDriverDefinition(DatabaseConfiguration cfg) {
DriverTemplate dt = getDriverTemplate(cfg);
DriverDefinition dd = getDriverDefinition(cfg);
// Driver Definition creation
WorkbenchPreferenceDialog preferenceDialog = new WorkbenchPreferenceDialog();
preferenceDialog.open();
DriverPreferences preferencePage = new DriverPreferences(preferenceDialog);
preferenceDialog.select(preferencePage);
// TODO implement this in preference page
// TODO dont create new driver def if it already exists
List<TableItem> items = new DefaultTable().getItems();
for (int i = 0; i < items.size(); i++) {
new DefaultTableItem(0).select();
new PushButton("Remove").click();
Shell confirm = new DefaultShell("Confirm Driver Removal");
new YesButton().click();
new WaitWhile(new ShellIsAvailable(confirm));
new DefaultShell("Preferences");
}
DriverDialog ddw = preferencePage.addDriverDefinition();
ddw.selectDriverTemplate(dt.getType(), dt.getVersion());
ddw.setName(cfg.getDriverName());
ddw.addDriverLibrary(dd.getDriverLibrary());
ddw.setDriverClass(cfg.getDriverClass());
ddw.ok();
preferenceDialog.ok();
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class OpenShiftUtils method updateMavenProject.
public static void updateMavenProject(String projectName) {
new ProjectExplorer().getProject(projectName);
new ContextMenuItem("Maven", "Update Project...").select();
new DefaultShell("Update Maven Project");
new PushButton("Select All").click();
new PushButton("OK").click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ConnectionWizardHandlingTest method testLinkToRetrieveToken.
@Test
@Ignore("Link has been changed to Styled text. Test need to be corrected")
public void testLinkToRetrieveToken() {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.OAUTH.toString());
try {
new DefaultStyledText("Enter a token or retrieve a new one.");
// pass
} catch (RedDeerException ex) {
fail("Link to retrieve token for a connection is not available.");
}
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText("https://nonexisting.server.com");
WidgetHandler.getInstance().sendClickNotifications(new DefaultStyledText("Enter a token or retrieve a new one.").getSWTWidget());
// There can be problem occured dialog, or it is only in log
try {
new DefaultShell("Problem Occurred");
new OkButton().click();
new WaitWhile(new ShellIsAvailable("Problem Occurred"));
new DefaultShell("");
// pass
} catch (RedDeerException ex) {
// pass
}
try {
new InternalBrowser();
fail("Browser with token should not opened for nonexisting server.");
} catch (RedDeerException ex) {
// pass
}
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(DatastoreOS3.SERVER);
WidgetHandler.getInstance().sendClickNotifications(new DefaultStyledText("Enter a token or retrieve a new one.").getSWTWidget());
try {
new ShellWithButton("", "Close");
new PushButton("Close").click();
AbstractWait.sleep(TimePeriod.SHORT);
} catch (RedDeerException ex) {
fail("Browser with token was not opened.");
}
}
Aggregations