use of org.eclipse.reddeer.swt.impl.text.LabeledText 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();
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class CreateNewConnectionTest method shouldExtractTokenInBrowserWindow.
// Skip Test for now, not stable
// @Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void shouldExtractTokenInBrowserWindow() {
openConnectionWizardAndSetDefaultServerOAuth();
String token = new AuthenticationTokenRetrival(DatastoreOS3.USERNAME, DatastoreOS3.PASSWORD).retrieveToken();
String tokenText = new LabeledText(OpenShiftLabel.TextLabels.TOKEN).getText();
assertEquals(token, tokenText);
new CancelButton().click();
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText 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.");
}
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method testDeployDockerImageFromOpenShiftExplorer.
@Test
public void testDeployDockerImageFromOpenShiftExplorer() {
selectProject(PROJECT2);
new ContextMenuItem(OpenShiftLabel.ContextMenu.DEPLOY_DOCKER_IMAGE).select();
new DefaultShell(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT);
new LabeledText(OpenShiftLabel.TextLabels.IMAGE_NAME).setText(HELLO_OS_DOCKER_IMAGE + ":" + TAG);
proceedThroughDeployImageToOpenShiftWizard();
verifyDeployedHelloWorldDockerImage(PROJECT2);
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText 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());
}
Aggregations