Search in sources :

Example 26 with NextButton

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

the class BuilderImageApplicationWizardHandlingTest method setDefaultValuesAndAssert.

private void setDefaultValuesAndAssert(String defaultRepo, String defaultRef, String defaultContextDir) {
    new LabeledText(OpenShiftLabel.TextLabels.GIT_REPO_URL).setText(defaultRepo);
    new LabeledText(OpenShiftLabel.TextLabels.GIT_REF).setText(defaultRef);
    new LabeledText(OpenShiftLabel.TextLabels.CONTEXT_DIR).setText(defaultContextDir);
    assertTrue("Next button should be enabled after setting git values to default.", new NextButton().isEnabled());
    assertTrue("Finish button should be enabled after setting git values to default.", new FinishButton().isEnabled());
}
Also used : NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText)

Example 27 with NextButton

use of org.eclipse.reddeer.swt.impl.button.NextButton 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 28 with NextButton

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

Aggregations

NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)28 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)17 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)16 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)14 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)14 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)13 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)11 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)10 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)9 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)9 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)6 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)6 Test (org.junit.Test)5 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)4 WorkbenchShell (org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell)4 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)3 LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)3 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)2 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)2 Shell (org.eclipse.reddeer.swt.api.Shell)2