Search in sources :

Example 11 with WithTextMatcher

use of org.eclipse.reddeer.core.matcher.WithTextMatcher in project jbosstools-openshift by jbosstools.

the class NewApplicationWizardHandlingTest method testTemplatesRelatedWidgetAccess.

@Test
public void testTemplatesRelatedWidgetAccess() {
    assertTrue("Server template selection should be chosen by default.", new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).isSelected());
    new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
    try {
        new DefaultTree();
        fail("Tree with server templates should not be visible if local template " + "tab item is selected.");
    } catch (RedDeerException ex) {
    // pass
    }
    assertTrue("Browse button should be visible and enabled while local template " + "tab item is selected.", new PushButton(OpenShiftLabel.Button.BROWSE).isEnabled());
    new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
    assertTrue("Tree with server templates should be visible and enabled if server template " + "tab item is selected.", new DefaultTree().isEnabled());
    try {
        new PushButton(1, new WithTextMatcher(OpenShiftLabel.Button.BROWSE));
        fail("Browse button should not be visible while server template tab item is selected.");
    } catch (RedDeerException ex) {
    // pass
    }
}
Also used : DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) DefaultTabItem(org.eclipse.reddeer.swt.impl.tab.DefaultTabItem) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) Test(org.junit.Test)

Example 12 with WithTextMatcher

use of org.eclipse.reddeer.core.matcher.WithTextMatcher 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 13 with WithTextMatcher

use of org.eclipse.reddeer.core.matcher.WithTextMatcher 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 14 with WithTextMatcher

use of org.eclipse.reddeer.core.matcher.WithTextMatcher 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 15 with WithTextMatcher

use of org.eclipse.reddeer.core.matcher.WithTextMatcher 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

WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)19 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)15 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)9 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)8 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)7 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)5 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)4 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)4 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)3 RadioButton (org.eclipse.reddeer.swt.impl.button.RadioButton)3 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)3 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)3 Test (org.junit.Test)3 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 RegexMatcher (org.eclipse.reddeer.common.matcher.RegexMatcher)2 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)2 WidgetIsFound (org.eclipse.reddeer.core.condition.WidgetIsFound)2 Button (org.eclipse.reddeer.swt.api.Button)2 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)2 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)2