Search in sources :

Example 81 with LabeledText

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

the class LabelsTest method setInvalidName.

private void setInvalidName(String name) {
    new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(name);
    assertFalse("OK button should be disable for invalid name, but it is not.", buttonIsEnabled(new OkButton()));
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText)

Example 82 with LabeledText

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

the class ProjectNameValidationTest method testInvalidProjectNameFormat.

@Test
public void testInvalidProjectNameFormat() {
    new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText("--");
    new DefaultText(PROJECT_NAME_FORMAT_ERROR);
}
Also used : DefaultText(org.eclipse.reddeer.swt.impl.text.DefaultText) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 83 with LabeledText

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

the class ProjectNameValidationTest method testLongProjectName.

@Test
public void testLongProjectName() {
    new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText("0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "0123456789" + "01234");
    new DefaultText(PROJECT_NAME_MAX_LENGTH_ERROR);
}
Also used : DefaultText(org.eclipse.reddeer.swt.impl.text.DefaultText) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 84 with LabeledText

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

the class ServerAdapterWizardHandlingTest method testPodPathWidgetAccessibility.

@Test
public void testPodPathWidgetAccessibility() {
    openNewServerAdapterWizard();
    next();
    new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
    new CheckBox("Use inferred Pod Deployment Path").toggle(false);
    LabeledText podPath = new LabeledText("Pod Deployment Path: ");
    String podDeploymentPath = "/opt/eap/standalone/deployments/";
    podPath.setText("");
    assertFalse("Next button should be disable if pod path is empty is selected.", nextButtonIsEnabled());
    podPath.setText(podDeploymentPath);
    assertTrue("Next button should be reeenabled if pod path is correctly filled in.", nextButtonIsEnabled());
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 85 with LabeledText

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

the class ServerAdapterWizardHandlingTest method testSourcePathWidgetAccessibility.

@Test
public void testSourcePathWidgetAccessibility() {
    openNewServerAdapterWizard();
    new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
    next();
    new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
    LabeledText srcPath = new LabeledText("Source Path: ");
    String srcPathText = srcPath.getText();
    srcPath.setText("");
    assertFalse("Next button should be disable if source path is empty is selected.", nextButtonIsEnabled());
    srcPath.setText(srcPathText);
    assertTrue("Next button should be reeenabled if source path is correctly filled in.", nextButtonIsEnabled());
    srcPath.setText("invalid path");
    assertFalse("Next button should be disabled if source path is invalid or not existing.", nextButtonIsEnabled());
    srcPath.setText(srcPathText);
    assertTrue("Next button should be reeenabled if source path is correctly filled in.", nextButtonIsEnabled());
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

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