use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method selectLocalTemplate.
private void selectLocalTemplate(final String templateLocalPath) {
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new WaitWhile(new TreeIsAvailable());
new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).setText(templateLocalPath);
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem 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.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class NewApplicationWizardHandlingTest method testShowDefinedResourcesForServerTemplate.
@Test
public void testShowDefinedResourcesForServerTemplate() {
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
OpenShiftUtils.selectEAPTemplate();
verifyDefinedResourcesForTemplate();
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem 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();
}
Aggregations