Search in sources :

Example 1 with TreeItemRegexMatcher

use of org.eclipse.reddeer.core.matcher.TreeItemRegexMatcher in project jbosstools-hibernate by jbosstools.

the class ConnectionProfileFactory method deleteConnectionProfile.

/**
 * Deletes connection profile
 * @param profileName profile name to delete
 */
@SuppressWarnings("unchecked")
public static void deleteConnectionProfile(String profileName) {
    DataSourceExplorerView explorer = new DataSourceExplorerView();
    explorer.open();
    new DefaultTreeItem(new TreeItemRegexMatcher("Database Connections"), new TreeItemRegexMatcher(profileName + ".*")).select();
    new ContextMenuItem("Delete").select();
    Shell delete = new DefaultShell("Delete confirmation");
    new YesButton(delete).click();
    new WaitWhile(new ShellIsAvailable(delete));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) TreeItemRegexMatcher(org.eclipse.reddeer.core.matcher.TreeItemRegexMatcher) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) 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) DataSourceExplorerView(org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) YesButton(org.eclipse.reddeer.swt.impl.button.YesButton)

Example 2 with TreeItemRegexMatcher

use of org.eclipse.reddeer.core.matcher.TreeItemRegexMatcher in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardTest method testImportOpenShift3AppViaServerAdapterSettings.

@SuppressWarnings("unchecked")
@Test(expected = OpenshiftTestInFailureException.class)
public void testImportOpenShift3AppViaServerAdapterSettings() {
    ServerSettingsWizard serverWizard = OpenShiftUtils.openServerSettingsWizardFromOpenshiftView(service);
    ImportApplicationWizard importWizard = new ServerSettingsWizardPage().importProject();
    new DefaultTree(importWizard).getItem(new TreeItemRegexMatcher(OpenShiftResources.NODEJS_SERVICE + ".*")).select();
    importWizard.next();
    importWizard.finish();
    new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
    assertProjectNameFilled();
    serverWizard.cancel();
    assertProjectExistsInProjectView(OpenShiftResources.NODEJS_GIT_NAME);
}
Also used : DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) TreeItemRegexMatcher(org.eclipse.reddeer.core.matcher.TreeItemRegexMatcher) ServerSettingsWizard(org.jboss.tools.openshift.reddeer.wizard.server.ServerSettingsWizard) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) ServerSettingsWizardPage(org.jboss.tools.openshift.reddeer.wizard.server.ServerSettingsWizardPage) Test(org.junit.Test)

Aggregations

TreeItemRegexMatcher (org.eclipse.reddeer.core.matcher.TreeItemRegexMatcher)2 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)2 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 DataSourceExplorerView (org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView)1 Shell (org.eclipse.reddeer.swt.api.Shell)1 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)1 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)1 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)1 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)1 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)1 ImportApplicationWizard (org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard)1 ServerSettingsWizard (org.jboss.tools.openshift.reddeer.wizard.server.ServerSettingsWizard)1 ServerSettingsWizardPage (org.jboss.tools.openshift.reddeer.wizard.server.ServerSettingsWizardPage)1 Test (org.junit.Test)1