use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method assertDockerImageIsProcessedCorrectlyWhenUsedFromOpenShiftExplorer.
/**
* Selects project in OpenShift explorer view, open Deploy Image to OpenShift wizard
* from its context menu and assert that there are correct values.
* @param projectName
* @param projectDisplayName
*/
private void assertDockerImageIsProcessedCorrectlyWhenUsedFromOpenShiftExplorer(String projectName) {
selectProject(projectName);
new ContextMenuItem(OpenShiftLabel.ContextMenu.DEPLOY_DOCKER_IMAGE).select();
new DefaultShell(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT);
assertFalse("No project has been preselected.", new LabeledCombo("OpenShift Project: ").getSelection().equals(""));
assertTrue("Wrong project has been preselected.", new LabeledCombo("OpenShift Project: ").getSelection().equals(projectName));
closeWizard();
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class ConnectionWizardHandlingTest method testUserAndPassCachingAfterSwitchingAuthProtocol.
@Test
public void testUserAndPassCachingAfterSwitchingAuthProtocol() {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
String username = "randomuser";
switchToBasic();
new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(username);
new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText("openshiftv3");
switchToOAuth();
switchToBasic();
assertTrue("Username text field does not cache user name after switching authentication protocol.", username.equals(new LabeledText(OpenShiftLabel.TextLabels.USERNAME).getText()));
assertFalse("Password text field does not cache password after switching authentication protocol.", new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).getText().isEmpty());
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class ConnectionWizardHandlingTest method testTokenCachingAfterSwitchingAuthProtocol.
@Test
public void testTokenCachingAfterSwitchingAuthProtocol() {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
String token = "r4nd0mT0k3n";
switchToOAuth();
new LabeledText(OpenShiftLabel.TextLabels.TOKEN).setText(token);
switchToBasic();
switchToOAuth();
assertTrue("Token text field does not cache token after switching authentication protocol.", token.equals(new LabeledText(OpenShiftLabel.TextLabels.TOKEN).getText()));
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-openshift by jbosstools.
the class OpenShiftExplorerView method connectToOpenShift.
public void connectToOpenShift(String server, String username, String password, boolean storePassword, boolean useDefaultServer, AuthenticationMethod authMethod, boolean certificateShown) {
new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
if (new CheckBox(0).isChecked() != useDefaultServer) {
new CheckBox(0).click();
}
if (!useDefaultServer) {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(server);
}
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(authMethod.toString());
if (AuthenticationMethod.OAUTH.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.TOKEN).setText(password);
}
if (AuthenticationMethod.BASIC.equals(authMethod)) {
new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(username);
new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText(password);
if (new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).isChecked() != storePassword) {
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).click();
}
}
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.DEFAULT);
new FinishButton().click();
if (certificateShown) {
try {
new DefaultShell(OpenShiftLabel.Shell.UNTRUSTED_SSL_CERTIFICATE);
new PushButton("Yes").click();
} catch (RedDeerException ex) {
fail("Aceptance of SSL certificate failed.");
}
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_CONNECTION), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.combo.LabeledCombo in project jbosstools-hibernate by jbosstools.
the class JpaXmlEditor method setHibernateDialect.
/**
* Sets hibernate dialect on hibernate tab
* @param dialect hibernate dialect
*/
public void setHibernateDialect(String dialect) {
activateHibernateTab();
new LabeledCombo(this, "Database dialect:").setSelection(dialect);
}
Aggregations