Search in sources :

Example 66 with LabeledText

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

the class CreateServerAdapterTest method setAdapterDetailsAndCreateAdapterAndVerifyExistence.

private void setAdapterDetailsAndCreateAdapterAndVerifyExistence() {
    new LabeledText("Eclipse Project: ").setText(PROJECT_NAME);
    new DefaultTreeItem(projectReq.getProjectName()).getItems().get(0).select();
    next();
    finishNewServerAdapterWizardAndVerifyExistence();
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)

Example 67 with LabeledText

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

the class CreateServerAdapterTest method testCreateOpenShift3ServerAdapterViaOpenShiftExplorerView.

@Test
public void testCreateOpenShift3ServerAdapterViaOpenShiftExplorerView() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.getOpenShift3Connection(connectionReq.getConnection()).refresh();
    explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName()).getServicesWithName("eap-app").get(0).select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
    new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
    assertTrue("Service should be preselected for new OpenShift 3 server adapter", new DefaultTreeItem(projectReq.getProjectName(), "eap-app deploymentConfig=eap-app").isSelected());
    assertTrue("Eclipse project should be preselected automatically for new server adapter", new LabeledText("Eclipse Project: ").getText().equals(PROJECT_NAME));
    new FinishButton().click();
    new WaitWhile(new ShellIsAvailable(""));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG, false);
    assertTrue("OpenShift 3 server adapter was not created.", new ServerAdapterExists(Version.OPENSHIFT3, "eap-app", "Service").test());
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ServerAdapterExists(org.jboss.tools.openshift.reddeer.condition.ServerAdapterExists) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 68 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText 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);
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTabItem(org.eclipse.reddeer.swt.impl.tab.DefaultTabItem) NewOpenShift3ApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.v3.NewOpenShift3ApplicationWizard) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test) TemplateParametersTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.TemplateParametersTest)

Example 69 with LabeledText

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

the class CreateApplicationOnBuilderImageTest method validateJBIDE22704.

private void validateJBIDE22704() {
    BuilderImageApplicationWizardHandlingTest.nextToBuildConfigurationWizardPage();
    applicationName = new LabeledText("Name: ").getText();
    assertNotNull(applicationName);
    assertTrue(applicationName.length() > 0);
    String gitUrl = new LabeledText("Git Repository URL:").getText();
    assertNotNull(gitUrl);
    if (gitUrl.length() < 1) {
        new CancelButton().click();
        new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD));
        throw new OpenshiftTestInFailureException("JBIDE-23704 should be fixed now.");
    }
    new WaitUntil(new ControlIsEnabled(new NextButton()));
    /*
		 * switch to the Deployment page
		 */
    new NextButton().click();
    new WaitUntil(new ControlIsEnabled(new BackButton()));
    int numberofEnvironmentVariables = new DefaultTable().rowCount();
    assertTrue(numberofEnvironmentVariables > 0);
    /*
		 * switch to the Routing page
		 */
    new NextButton().click();
    new WaitUntil(new ControlIsEnabled(new BackButton()));
    int numberOfServicePorts = new DefaultTable().rowCount();
    assertTrue(numberOfServicePorts > 0);
    new CancelButton().click();
    new WaitWhile(new JobIsRunning(), TimePeriod.getCustom(120));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OpenshiftTestInFailureException(org.jboss.tools.openshift.ui.bot.test.common.OpenshiftTestInFailureException) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 70 with LabeledText

use of org.eclipse.reddeer.swt.impl.text.LabeledText 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);
}
Also used : LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) DefaultTabItem(org.eclipse.reddeer.swt.impl.tab.DefaultTabItem) NewOpenShift3ApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.v3.NewOpenShift3ApplicationWizard) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test) TemplateParametersTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.TemplateParametersTest)

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