Search in sources :

Example 71 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.

the class TemplatesCreator method createOpenShiftLabels.

private void createOpenShiftLabels(List<Label> labels) {
    for (Label label : labels) {
        new PushButton(OpenShiftLabel.Button.ADD).click();
        new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
        new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(label.getName());
        new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(label.getValue());
        new WaitUntil(new ControlIsEnabled(new OkButton()));
        new OkButton().click();
        new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
        new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    }
}
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) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) OpenShiftLabel(org.jboss.tools.openshift.reddeer.utils.OpenShiftLabel) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 72 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.

the class TemplatesCreator method selectLocalTemplate.

private void selectLocalTemplate(final String templateLocalPath) {
    new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
    new WaitWhile(new TreeIsAvailable());
    new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).setText(templateLocalPath);
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) TreeIsAvailable(org.jboss.tools.openshift.reddeer.condition.TreeIsAvailable) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTabItem(org.eclipse.reddeer.swt.impl.tab.DefaultTabItem)

Example 73 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.

the class EnvironmentVariableWizardPage method addEnvironmentVariable.

/**
 * Creates a new environment variable.
 *
 * @param envVar environment variable to create
 * @return true if environment variable was created successfully, false otherwise
 */
public boolean addEnvironmentVariable(EnvVar envVar) {
    DefaultTable table = new DefaultTable();
    new PushButton(OpenShiftLabel.Button.ADD).click();
    new DefaultShell(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE);
    new LabeledText("Name:").setText(envVar.getName());
    new LabeledText("Value:").setText(envVar.getValue());
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE));
    return table.containsItem(envVar.getName(), 0) && table.containsItem(envVar.getValue(), 1);
}
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) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 74 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.

the class EnvironmentVariableWizardPage method editEnvironmentVariable.

/**
 * Changes an existing environment variable to have new values.
 * New and old environment variables passed as arguments should be different
 * at least in one attribute (name or value).
 *
 * @param oldVar old environment variable
 * @param newVar environment variable with new values
 * @return if environment variable was edited successfully, false otherwise
 */
public boolean editEnvironmentVariable(EnvVar oldVar, EnvVar newVar) {
    DefaultTable table = new DefaultTable();
    table.getItem(oldVar.getName()).select();
    new PushButton(OpenShiftLabel.Button.EDIT).click();
    new DefaultShell(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE);
    LabeledText name = new LabeledText(OpenShiftLabel.TextLabels.NAME);
    if (!name.isReadOnly()) {
        name.setText(newVar.getName());
    }
    new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(newVar.getValue());
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.ENVIRONMENT_VARIABLE));
    return (table.containsItem(newVar.getName(), 0) && table.containsItem(newVar.getValue(), 1)) && !(table.containsItem(oldVar.getName(), 0) && table.containsItem(oldVar.getValue(), 1));
}
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) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 75 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.

the class DeleteResourcesWizard method setFilter.

public void setFilter(String filter) {
    new LabeledText(OpenShiftLabel.TextLabels.LABEL_FILTER).setFocus();
    new LabeledText(OpenShiftLabel.TextLabels.LABEL_FILTER).setText(filter);
    new WaitUntil(new JobIsRunning(), false);
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)93 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)34 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)32 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)30 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)30 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)30 Test (org.junit.Test)29 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)25 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)23 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)19 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)18 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)14 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)11 LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)11 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)10 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)9 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)9 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)8 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)8 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)8