Search in sources :

Example 6 with DefaultCombo

use of org.eclipse.reddeer.swt.impl.combo.DefaultCombo in project jbosstools-hibernate by jbosstools.

the class MappingFileTest method createMappingFileWithNoConfig.

// JBIDE-21766
@Test
public void createMappingFileWithNoConfig() {
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    PropertyDialog pd = pe.getProject(PRJ).openProperties();
    pd.select("Hibernate Settings");
    new DefaultCombo(pd).setSelection("<None>");
    pd.ok();
    createMappingFileFromFile();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) PropertyDialog(org.eclipse.reddeer.eclipse.ui.dialogs.PropertyDialog) Test(org.junit.Test)

Example 7 with DefaultCombo

use of org.eclipse.reddeer.swt.impl.combo.DefaultCombo in project jbosstools-openshift by jbosstools.

the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardFromCentralWithNoProjects.

@Test
public void testOpenNewApplicationWizardFromCentralWithNoProjects() {
    new DefaultToolItem(new WorkbenchShell(), OpenShiftLabel.Others.RED_HAT_CENTRAL).click();
    new InternalBrowser().execute(OpenShiftLabel.Others.OPENSHIFT_CENTRAL_SCRIPT);
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    for (String comboItem : new DefaultCombo(0).getItems()) {
        if (comboItem.contains(connectionReq.getUsername()) && comboItem.contains(connectionReq.getHost())) {
            new DefaultCombo(0).setSelection(comboItem);
            break;
        }
    }
    new NextButton().click();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
    new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
    new FinishButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    assertTrue("Created project was not preselected for a new OpenShift application", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getText().equals(projectName));
    closeWizard();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) InternalBrowser(org.eclipse.reddeer.swt.impl.browser.InternalBrowser) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 8 with DefaultCombo

use of org.eclipse.reddeer.swt.impl.combo.DefaultCombo in project jbosstools-openshift by jbosstools.

the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardViaShellMenuWithNoProjects.

@Test
public void testOpenNewApplicationWizardViaShellMenuWithNoProjects() {
    new WorkbenchShell().setFocus();
    new ShellMenuItem("File", "New", "Other...").select();
    new DefaultShell("New").setFocus();
    new DefaultTreeItem("OpenShift", "OpenShift Application").select();
    new NextButton().click();
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    for (String comboItem : new DefaultCombo(0).getItems()) {
        if (comboItem.contains(connectionReq.getUsername()) && comboItem.contains(connectionReq.getHost())) {
            new DefaultCombo(0).setSelection(comboItem);
            break;
        }
    }
    new NextButton().click();
    TestUtils.acceptSSLCertificate();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
    new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
    new FinishButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    assertTrue("Created project was not preselected for a new OpenShift application", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getText().equals(projectName));
    closeWizard();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) ShellMenuItem(org.eclipse.reddeer.swt.impl.menu.ShellMenuItem) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 9 with DefaultCombo

use of org.eclipse.reddeer.swt.impl.combo.DefaultCombo in project jbosstools-openshift by jbosstools.

the class AbstractOpenShiftApplicationWizard method signToOpenShiftAndClickNext.

private void signToOpenShiftAndClickNext() {
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    selectConnection(username, server, new DefaultCombo(0));
    new NextButton().click();
    processUntrustedSSLCertificate();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 10 with DefaultCombo

use of org.eclipse.reddeer.swt.impl.combo.DefaultCombo in project linuxtools by eclipse.

the class DockerConnection method pullImage.

public void pullImage(String imageName, String imageTag, String dockerRegister) {
    if (getImage(imageName, imageTag) == null) {
        refreshImages();
        treeViewerHandler.getTreeItem(item, "Images").select();
        new ContextMenu().getItem("Pull...").select();
        new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
        Shell pullShell = new DefaultShell("Pull Image");
        // select register
        if (dockerRegister != null) {
            Combo combo = new DefaultCombo();
            combo.setSelection(dockerRegister);
        }
        new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
        new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
        new WaitUntil(new ControlIsEnabled(new FinishButton()));
        new FinishButton(pullShell).click();
        new WaitWhile(new ShellIsAvailable(pullShell));
        new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)19 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)8 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)8 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)8 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)8 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)7 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)7 Combo (org.eclipse.reddeer.swt.api.Combo)6 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)6 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)6 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)5 ContextMenu (org.eclipse.reddeer.swt.impl.menu.ContextMenu)5 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)4 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)4 Test (org.junit.Test)4 Shell (org.eclipse.reddeer.swt.api.Shell)3 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)3 LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)3 DefaultGroup (org.eclipse.reddeer.swt.impl.group.DefaultGroup)3 WorkbenchShell (org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell)3