Search in sources :

Example 21 with CheckBox

use of org.eclipse.reddeer.swt.impl.button.CheckBox in project linuxtools by eclipse.

the class DockerImage method pushImage.

public void pushImage(String registryAccount, boolean forceTagging, boolean keepTaggedImage) {
    select();
    new ContextMenu().getItem("Push...").select();
    new DefaultShell("Push Image");
    Combo combo = new DefaultCombo();
    combo.setSelection(registryAccount);
    new CheckBox("Force tagging image with selected registry").toggle(forceTagging);
    new CheckBox("Keep tagged image upon completion").toggle(keepTaggedImage);
    new FinishButton().click();
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) Combo(org.eclipse.reddeer.swt.api.Combo) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo)

Example 22 with CheckBox

use of org.eclipse.reddeer.swt.impl.button.CheckBox in project linuxtools by eclipse.

the class ImageRunResourceVolumesVariablesPage method setResourceLimitation.

public void setResourceLimitation(String CPU, String memoryLimit) {
    new CheckBox("Enable resource limitations").click();
    switch(CPU) {
        case "Low":
            new RadioButton("Low").click();
            break;
        case "Medium":
            new RadioButton("Medium").click();
            break;
        case "High":
            new RadioButton("High").click();
            break;
        default:
            new RadioButton("Medium").click();
    }
    new LabeledText("Memory limit:").setText(memoryLimit);
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton)

Example 23 with CheckBox

use of org.eclipse.reddeer.swt.impl.button.CheckBox in project linuxtools by eclipse.

the class LoggingPreferencePage method setRequestTimestamp.

public void setRequestTimestamp(boolean toggle) {
    CheckBox cb = new CheckBox("Request time stamp for logs");
    cb.toggle(toggle);
}
Also used : CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox)

Example 24 with CheckBox

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

the class ImportApplicationTest method testImportOpenShiftApplicationViaOpenShiftExplorer.

@Test
public void testImportOpenShiftApplicationViaOpenShiftExplorer() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();
    new WaitUntil(new OpenShiftResourceExists(Resource.BUILD_CONFIG, (Matcher<String>) null, ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.LONG);
    explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getOpenShiftResources(Resource.BUILD_CONFIG).get(0).select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION), TimePeriod.LONG);
    new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
    new CheckBox("Use default clone destination").toggle(false);
    File gitRepo = new File(GIT_REPO_DIRECTORY);
    new LabeledText("Git Clone Location:").setText(gitRepo.getAbsolutePath());
    new FinishButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION), TimePeriod.VERY_LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    ProjectExplorer projectExplorer = new ProjectExplorer();
    projectExplorer.open();
    assertTrue("There should be imported kitchen sink project, but there is not", projectExplorer.containsProject(PROJECT_NAME));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) Matcher(org.hamcrest.Matcher) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) File(java.io.File) OpenShiftResourceExists(org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 25 with CheckBox

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

the class TemplatesCreator method executeImport.

private void executeImport(boolean importProject) {
    new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
    if (!importProject) {
        new CancelButton().click();
    } else {
        new FinishButton().click();
        try {
            new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET), TimePeriod.LONG);
            new DefaultShell(OpenShiftLabel.Shell.CHEATSHEET);
            new CheckBox(0).click();
            new NoButton().click();
            new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET));
        } catch (WaitTimeoutExpiredException ex) {
        // do nothing if cheat sheet is not provided
        }
        new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
        new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) NoButton(org.eclipse.reddeer.swt.impl.button.NoButton) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)32 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)11 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)9 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)8 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)8 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)7 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)7 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)7 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)6 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)5 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)5 Test (org.junit.Test)5 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)4 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)4 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)3 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)3 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)2 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)2 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)2