Search in sources :

Example 21 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.

the class GetOpenShiftIOTokenTest method checkPluginInSecureStorage.

private void checkPluginInSecureStorage() {
    WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
    preferences.open();
    StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
    preferences.select(storagePreferencePage);
    storagePreferencePage.selectContentTab();
    DefaultTreeItem account = new DefaultTreeItem(new DefaultTree(storagePreferencePage, 1), "[Default Secure Storage]", "org.jboss.tools.openshift.io.core", "accounts", "OpenShift.io", DatastoreOS3.OPENSHIFT_IO_USERNAME);
    account.select();
    assertNotNull("Account does not exists in secure storage", account);
    preferences.ok();
}
Also used : DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) StoragePreferencePage(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.StoragePreferencePage)

Example 22 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-openshift by jbosstools.

the class AbstractOpenShiftApplicationWizard method openWizardFromShellMenu.

/**
 * Opens new application wizard via shell menu File - New. There has to be
 * an existing connection in OpenShift explorer, otherwise method fails.
 */
public void openWizardFromShellMenu() {
    new WorkbenchShell().setFocus();
    new NewWizard().open();
    new DefaultShell("New").setFocus();
    new DefaultTreeItem("OpenShift", "OpenShift Application").select();
    new NextButton().click();
    signToOpenShiftAndClickNext();
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD).setFocus();
}
Also used : WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) NewWizard(org.eclipse.reddeer.eclipse.ui.dialogs.NewWizard) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)

Example 23 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-hibernate by jbosstools.

the class LaunchConfigurationsDialog method setRevengFile.

/**
 * Select reveng file
 * @param path path to existing reveng file
 */
public void setRevengFile(String... path) {
    new PushButton(this, "Setup...").click();
    org.eclipse.reddeer.swt.api.Shell setupShell = new DefaultShell("Setup reverse engineering");
    new PushButton(setupShell, "Use existing...").click();
    org.eclipse.reddeer.swt.api.Shell selectShell = new DefaultShell("Select reverse engineering settings file");
    new DefaultTreeItem(new DefaultTree(selectShell), path).select();
    new OkButton(selectShell).click();
    new WaitWhile(new ShellIsAvailable(selectShell));
    new WaitWhile(new ShellIsAvailable(setupShell));
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 24 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-hibernate by jbosstools.

the class LaunchConfigurationsDialog method createNewConfiguration.

/**
 * Creates new hibernate launch configuration
 */
public void createNewConfiguration() {
    new DefaultTreeItem(new DefaultTree(this), "Hibernate Code Generation").select();
    new DefaultToolItem(this, "New launch configuration").click();
}
Also used : DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)

Example 25 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-hibernate by jbosstools.

the class KnownConfigurationsView method deleteConsoleConfiguration.

/**
 * Deletes hibernate console configuration
 * @param console hibernate console configuration name
 */
public void deleteConsoleConfiguration(String console) {
    new DefaultTreeItem(new DefaultTree(this), console).select();
    new ContextMenuItem("Delete Configuration").select();
    Shell deleteShell = new DefaultShell("Delete console configuration");
    new OkButton(deleteShell).click();
    new WaitWhile(new ShellIsAvailable(deleteShell));
    new WaitWhile(new JobIsRunning());
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) EditConfigurationShell(org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Aggregations

DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)28 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)16 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)15 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)12 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)11 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)9 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)8 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)8 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)7 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)6 Test (org.junit.Test)6 Shell (org.eclipse.reddeer.swt.api.Shell)5 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)5 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)5 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)5 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)5 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)5 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)4 DataSourceExplorerView (org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView)3 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)3