Search in sources :

Example 66 with OkButton

use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.

the class RemoveConnectionTest method testRemoveConnection.

@Test
public void testRemoveConnection() {
    explorer.open();
    explorer.getOpenShift3Connection(connectionReq.getConnection()).select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_CONNECTION).select();
    new DefaultShell(OpenShiftLabel.Shell.REMOVE_CONNECTION);
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    assertFalse("Connection is still presented in OpenShift explorer", explorer.connectionExists(connectionReq.getConnection().getUsername(), DatastoreOS3.SERVER));
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 67 with OkButton

use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.

the class StoreConnectionTest method secureStorageDisabledJBIDE19604Test.

@Test
public void secureStorageDisabledJBIDE19604Test() {
    deleteSecureStorage();
    invokeNewAppWizardFromCentral();
    new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(true);
    new NextButton().click();
    // Cancel secure storage shell
    try {
        new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE_PASSWORD);
    } catch (CoreLayerException ex) {
        new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE);
    }
    new CancelButton().click();
    // Cancel warning shell
    new DefaultShell("Warning");
    new OkButton().click();
    new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(false);
    // Next button should work
    new NextButton().click();
    AbstractWaitCondition backButtonIsEnabled = new AbstractWaitCondition() {

        @Override
        public boolean test() {
            return new BackButton().isEnabled();
        }
    };
    new WaitUntil(backButtonIsEnabled);
    new CancelButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException) AbstractWaitCondition(org.eclipse.reddeer.common.condition.AbstractWaitCondition) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 68 with OkButton

use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.

the class ServerAdapter method delete.

/**
 * Deletes server adapter safely - if it was not selected, selects it and
 * then deletes.
 */
public void delete() {
    select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE).select();
    new DefaultShell(OpenShiftLabel.Shell.DELETE_ADAPTER);
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_ADAPTER));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 69 with OkButton

use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-hibernate by jbosstools.

the class SelectConnectionProfileDialog method ok.

public void ok() {
    new OkButton(this).click();
    new WaitWhile(new ShellIsAvailable(this));
    new DefaultShell("");
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell)

Example 70 with OkButton

use of org.eclipse.reddeer.swt.impl.button.OkButton 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)

Aggregations

OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)73 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)48 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)45 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)43 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)37 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)32 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)32 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)22 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)17 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)15 Test (org.junit.Test)15 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)11 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)11 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)10 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)9 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)9 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)6 Shell (org.eclipse.reddeer.swt.api.Shell)6 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)6