use of org.jboss.tools.openshift.reddeer.widget.ShellWithButton in project jbosstools-openshift by jbosstools.
the class ConnectionWizardHandlingTest method testLinkToRetrieveToken.
@Test
@Ignore("Link has been changed to Styled text. Test need to be corrected")
public void testLinkToRetrieveToken() {
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER_TYPE).setSelection(OpenShiftLabel.Others.OPENSHIFT3);
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.OAUTH.toString());
try {
new DefaultStyledText("Enter a token or retrieve a new one.");
// pass
} catch (RedDeerException ex) {
fail("Link to retrieve token for a connection is not available.");
}
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText("https://nonexisting.server.com");
WidgetHandler.getInstance().sendClickNotifications(new DefaultStyledText("Enter a token or retrieve a new one.").getSWTWidget());
// There can be problem occured dialog, or it is only in log
try {
new DefaultShell("Problem Occurred");
new OkButton().click();
new WaitWhile(new ShellIsAvailable("Problem Occurred"));
new DefaultShell("");
// pass
} catch (RedDeerException ex) {
// pass
}
try {
new InternalBrowser();
fail("Browser with token should not opened for nonexisting server.");
} catch (RedDeerException ex) {
// pass
}
new LabeledCombo(OpenShiftLabel.TextLabels.SERVER).setText(DatastoreOS3.SERVER);
WidgetHandler.getInstance().sendClickNotifications(new DefaultStyledText("Enter a token or retrieve a new one.").getSWTWidget());
try {
new ShellWithButton("", "Close");
new PushButton("Close").click();
AbstractWait.sleep(TimePeriod.SHORT);
} catch (RedDeerException ex) {
fail("Browser with token was not opened.");
}
}
use of org.jboss.tools.openshift.reddeer.widget.ShellWithButton in project jbosstools-openshift by jbosstools.
the class DeployDockerImageTest method proceedThroughDeployImageToOpenShiftWizard.
/**
* Proceeds through the image if the first wizard page has correct details -
* connection, project and image name.
*/
private void proceedThroughDeployImageToOpenShiftWizard() {
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT, false);
assertTrue("Next button should be enabled if all details are set correctly", new NextButton().isEnabled());
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
new NextButton().click();
if (!new CheckBox("Add Route").isChecked()) {
new CheckBox("Add Route").click();
}
new FinishButton().click();
new ShellWithButton("Deploy Image to OpenShift", "OK");
new OkButton().click();
new WaitWhile(new ShellIsAvailable("Deploy Image to OpenShift"), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Aggregations