Search in sources :

Example 16 with LabeledCombo

use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.

the class ServerAdapterWizardHandlingTest method testPreselectedConnectionForNewOpenShift3ServerAdapter.

@Test
public void testPreselectedConnectionForNewOpenShift3ServerAdapter() {
    openNewServerAdapterWizard();
    assertTrue("There should be preselected an existing OpenShift 3 connection in new server adapter wizard.", new LabeledCombo(OpenShiftLabel.TextLabels.CONNECTION).getSelection().contains(connectionReq.getConnection().getUsername()));
}
Also used : LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 17 with LabeledCombo

use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.

the class CreateNewConnectionTest method openConnectionWizardAndSetDefaultServer.

private void openConnectionWizardAndSetDefaultServer() {
    OpenShiftExplorerView openShiftExplorerView = new OpenShiftExplorerView();
    openShiftExplorerView.open();
    openShiftExplorerView.openConnectionShell();
    new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
    new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
    new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(DatastoreOS3.SERVER);
}
Also used : LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)

Example 18 with LabeledCombo

use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.

the class CreateNewConnectionTest method invalidRegistryURLShouldReportErrorMessage.

@Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void invalidRegistryURLShouldReportErrorMessage() {
    openConnectionWizardAndSetDefaultServer();
    new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.BASIC.toString());
    new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(DatastoreOS3.USERNAME);
    new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText(DatastoreOS3.PASSWORD);
    new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
    new LabeledText(OpenShiftLabel.TextLabels.IMAGE_REGISTRY_URL).setText("invalidURL");
    new WaitUntil(new ControlIsEnabled(new CancelButton()), TimePeriod.DEFAULT);
    new WaitUntil(new ControlIsEnabled(new DefaultText(" Please provide a valid image registry (HTTP/S) URL.")), TimePeriod.DEFAULT);
    new CancelButton().click();
}
Also used : DefaultText(org.eclipse.reddeer.swt.impl.text.DefaultText) LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) RunIf(org.eclipse.reddeer.junit.execution.annotation.RunIf) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

Example 19 with LabeledCombo

use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.

the class CreateNewConnectionTest method openConnectionWizardAndSetDefaultServerOAuth.

private void openConnectionWizardAndSetDefaultServerOAuth() {
    openConnectionWizardAndSetDefaultServer();
    new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.OAUTH.toString());
}
Also used : LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo)

Example 20 with LabeledCombo

use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.

the class ConnectionWizardHandlingTest method switchToBasic.

private void switchToBasic() {
    new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.BASIC.toString());
    try {
        new LabeledText(OpenShiftLabel.TextLabels.USERNAME);
        new LabeledText(OpenShiftLabel.TextLabels.PASSWORD);
    // pass
    } catch (RedDeerException ex) {
        fail("Text field for username and/or password is not present for Basic authentication protocol.");
    }
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) LabeledCombo(org.eclipse.reddeer.swt.impl.combo.LabeledCombo) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText)

Aggregations

LabeledCombo (org.eclipse.reddeer.swt.impl.combo.LabeledCombo)26 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)11 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)10 Test (org.junit.Test)10 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)8 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)7 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)6 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)6 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)6 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)5 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)5 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)4 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)4 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)3 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)3 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)3 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)3 WorkbenchShell (org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell)3 InternalBrowser (org.eclipse.reddeer.swt.impl.browser.InternalBrowser)2 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)2