Search in sources :

Example 46 with PushButton

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

the class ComposeTest method testCompose.

@Test
public void testCompose() {
    // Set up Docker Compose location
    PreferenceDialog dialog = new WorkbenchPreferenceDialog();
    DockerComposePreferencePage composePreference = new DockerComposePreferencePage(dialog);
    dialog.open();
    dialog.select(composePreference);
    composePreference.setPathToDockerCompose(this.dockerComposePath);
    composePreference.apply();
    new PushButton("Apply and Close").click();
    // Build Image
    DockerImagesTab imagesTab = openDockerImagesTab();
    buildImage(IMAGE_NAME, PATH_TEST_COMPOSE, imagesTab);
    assertConsoleSuccess();
    // Import resource folder
    importProject(PATH_TEST_COMPOSE);
    // Run Docker Compose
    runDockerCompose(PROJECT_TEST_COMPOSE, FILE_DOCKER_COMPOSE);
    // Check if application is running
    WebBrowserView browserView = new WebBrowserView();
    browserView.open();
    // Skip browser contents check, if mockito is used
    if (!mockitoIsUsed()) {
        browserView.openPageURL(URL);
        BrowserContentsCheck.checkBrowserForErrorPage(browserView, URL);
    }
}
Also used : WebBrowserView(org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView) PreferenceDialog(org.eclipse.reddeer.jface.preference.PreferenceDialog) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) DockerImagesTab(org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) DockerComposePreferencePage(org.eclipse.linuxtools.docker.reddeer.preferences.DockerComposePreferencePage) AbstractImageBotTest(org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest) Test(org.junit.Test)

Example 47 with PushButton

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

the class ImageRunResourceVolumesVariablesPage method addDataVolumeToContainer.

public void addDataVolumeToContainer(String containerPath, String containerName) {
    new PushButton(0, new WithTextMatcher("Add...")).click();
    new LabeledText("Container path:").setText(containerPath);
    new RadioButton("Mount a data volume container").click();
    new DefaultCombo("Container").setText(containerName);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) RadioButton(org.eclipse.reddeer.swt.impl.button.RadioButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 48 with PushButton

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

the class ImageRunResourceVolumesVariablesPage method addEnviromentVariable.

public void addEnviromentVariable(String name, String value) {
    new PushButton(1, new WithTextMatcher("Add...")).click();
    new LabeledText("Name:").setText(name);
    new LabeledText("Value:").setText(value);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 49 with PushButton

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

the class ImageRunResourceVolumesVariablesPage method addLabel.

public void addLabel(String name, String value) {
    new PushButton(2, new WithTextMatcher("Add...")).click();
    new LabeledText("Name:").setText(name);
    new LabeledText("Value:").setText(value);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 50 with PushButton

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

the class ImageRunSelectionPage method addLinkToContainer.

public void addLinkToContainer(String containerName, String alias) {
    new PushButton(1, new WithTextMatcher("Add...")).click();
    new DefaultShell("Container Linking");
    new LabeledCombo("Container:").setText(containerName);
    new LabeledText("Alias:").setText(alias);
    new OkButton().click();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)94 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)49 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)43 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)41 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)38 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)38 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)34 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)28 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)20 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)17 Test (org.junit.Test)16 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)15 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)9 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)8 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)7 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)6 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)6 Button (org.eclipse.reddeer.swt.api.Button)6 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)6 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)6