use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method createApplicationFromLocalWorkspaceTemplate.
@Test
public void createApplicationFromLocalWorkspaceTemplate() {
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer(DatastoreOS3.PROJECT1_DISPLAYED_NAME);
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new PushButton(OpenShiftLabel.Button.BROWSE_WORKSPACE).click();
new DefaultShell(OpenShiftLabel.Shell.SELECT_OPENSHIFT_TEMPLATE);
new DefaultTreeItem(TESTS_PROJECT, "eap64-basic-s2i.json").select();
new OkButton().click();
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Template from workspace is not correctly shown in text field containing its path", new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).getText().equals("${workspace_loc:" + File.separator + TESTS_PROJECT + File.separator + "eap64-basic-s2i.json}"));
new WaitUntil(new ControlIsEnabled(new CancelButton()));
// TODO: Remove comment once JBIDE-24492 is resolved
// assertTrue("Defined resource button should be enabled",
// new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
completeApplicationCreationAndVerify(helloworldProject);
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem 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
}
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method createApplicationFromTemplateProvidedByURL.
@Test
public void createApplicationFromTemplateProvidedByURL() {
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer(DatastoreOS3.PROJECT1_DISPLAYED_NAME);
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).setText(URL);
// TODO: Remove comment once JBIDE-24492 is resolved
// assertTrue("Defined resource button should be enabled",
// new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
completeApplicationCreationAndVerify(helloworldProject);
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method createApplicationFromLocalFileSystemTemplate.
@Test
public void createApplicationFromLocalFileSystemTemplate() {
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer(DatastoreOS3.PROJECT1_DISPLAYED_NAME);
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).setText(TESTS_PROJECT_LOCATION + File.separator + "eap64-basic-s2i.json");
// TODO: Remove comment once JBIDE-24492 is resolved
// assertTrue("Defined resource button should be enabled",
// new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
completeApplicationCreationAndVerify(helloworldProject);
}
use of org.eclipse.reddeer.swt.impl.tab.DefaultTabItem in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method selectServerTemplate.
private void selectServerTemplate(String templateName) {
new DefaultTabItem(OpenShiftLabel.TextLabels.SERVER_TEMPLATE).activate();
new WaitUntil(new TreeIsAvailable());
new DefaultTree().selectItems(new DefaultTreeItem(templateName));
}
Aggregations