use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class NewApplicationWizardHandlingTest method testAccessibilityOfDefinedResourcesButton.
@Test(expected = OpenshiftTestInFailureException.class)
public void testAccessibilityOfDefinedResourcesButton() {
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
assertDefinedResourcesButtonIsNotPresent();
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
assertDefinedResourcesButtonIsNotPresent();
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
OpenShiftUtils.selectEAPTemplate();
assertTrue("Defines Resources button should be enabled if a server template is selected.", new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
assertDefinedResourcesButtonIsNotPresent();
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
new DefaultTree().unselectAllItems();
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
Display.syncExec(new Runnable() {
@Override
public void run() {
new DefaultText(1).getSWTWidget().setText(DatastoreOS3.TEMPLATE_PATH);
}
});
try {
assertTrue("Defines Resources button should be enabled if a local template is selected.", new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
} catch (CoreLayerException ex) {
throw new OpenshiftTestInFailureException("Defined resources button was not found. Probable cause: JBIDE-24492", ex);
}
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
assertDefinedResourcesButtonIsNotPresent();
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class TemplateParametersTest method testModifyTemplateParameter.
@Test
public void testModifyTemplateParameter() {
new DefaultTable().getItem(SOURCE_REPOSITORY_URL).select();
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER);
new DefaultText().setText(PERSONAL_GIT_REPO_URI);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER));
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("New value of git repo URI has not been modified successfully.", new DefaultTable().getItem(SOURCE_REPOSITORY_URL).getText(1).equals(PERSONAL_GIT_REPO_URI));
new PushButton(OpenShiftLabel.Button.RESET).click();
try {
new WaitUntil(new TableContainsItem(new DefaultTable(), SOURCE_REPOSITORY_URL_VALUE, 1), TimePeriod.DEFAULT);
} catch (WaitTimeoutExpiredException ex) {
fail("Value for git repo URI has not been reset.");
}
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class NewApplicationWizardHandlingTest method testShowDefinedResourcesForLocalTemplate.
@Test(expected = OpenshiftTestInFailureException.class)
public void testShowDefinedResourcesForLocalTemplate() {
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
Display.syncExec(new Runnable() {
@Override
public void run() {
new DefaultText(1).getSWTWidget().setText(DatastoreOS3.TEMPLATE_PATH);
}
});
verifyDefinedResourcesForTemplate();
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText 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);
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText 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);
}
Aggregations