use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project linuxtools by eclipse.
the class NewDockerConnectionPage method finish.
public void finish() {
new WaitUntil(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL));
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(NEW_DOCKER_CONNECTION_SHELL), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method next.
private void next() {
new NextButton().click();
TestUtils.acceptSSLCertificate();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(new BackButton()));
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class CDK3ServerWizardTest method testNewCDK3ServerWizard.
@Test
public void testNewCDK3ServerWizard() {
NewCDKServerWizard dialog = (NewCDKServerWizard) CDKTestUtils.openNewServerWizardDialog();
NewServerWizardPage page = new NewServerWizardPage(dialog);
page.selectType(SERVER_TYPE_GROUP, CDK3_SERVER_NAME);
page.setName(getServerAdapter());
dialog.next();
NewCDK3ServerWizardPage containerPage = new NewCDK3ServerWizardPage();
checkWizardPagewidget("Minishift Binary: ", CDK3_SERVER_NAME);
// just check that default domain is choosen correctly
assertTrue(containerPage.getDomain().equalsIgnoreCase(CREDENTIALS_DOMAIN));
// needs to activate validator
containerPage.setMinishiftBinary(EXISTING_PATH);
// first the credentials are checked
assertSameMessage(dialog, NO_USER);
containerPage.setCredentials(USERNAME, PASSWORD);
assertDiffMessage(dialog, NO_USER);
// checking of minishift binary validation
// test that existing folder cannot be run
containerPage.setMinishiftBinary(EXISTING_PATH);
assertSameMessage(dialog, CANNOT_RUN_PROGRAM);
containerPage.setMinishiftBinary(NON_EXECUTABLE_FILE);
assertSameMessage(dialog, NOT_EXECUTABLE);
containerPage.setMinishiftBinary(NON_EXISTING_PATH);
assertSameMessage(dialog, DOES_NOT_EXIST);
containerPage.setMinishiftBinary(EXECUTABLE_FILE);
assertSameMessage(dialog, CHECK_MINISHIFT_VERSION);
// check compatibility of cdk version with server adapter
containerPage.setMinishiftBinary(MOCK_CDK320);
assertSameMessage(dialog, NOT_COMPATIBLE);
// Positive test of proper minishift binary
containerPage.setMinishiftBinary(MINISHIFT_PATH);
assertDiffMessage(dialog, CHECK_MINISHIFT_VERSION);
new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM, false);
assertTrue("Expected Finish button is not enabled", dialog.isFinishEnabled());
dialog.cancel();
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class CDKServerWizardAbstractTest method assertServerType.
protected void assertServerType(final String serverType) {
NewCDKServerWizard wizard = (NewCDKServerWizard) CDKTestUtils.openNewServerWizardDialog();
try {
TreeItem item = new DefaultTreeItem(new String[] { SERVER_TYPE_GROUP }).getItem(serverType);
item.select();
assertTrue(item.getText().equalsIgnoreCase(serverType));
new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false);
} catch (CoreLayerException coreExp) {
log.error(coreExp.getMessage());
fail("Server type " + serverType + " was not found in New Server Wizard");
}
assertEquals(new LabeledText("Server's host name:").getText(), "localhost");
assertEquals(new LabeledText("Server name:").getText(), getServerAdapter());
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.MEDIUM, false);
assertTrue("Dialog button Next is not enabled!", wizard.isNextEnabled());
try {
new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false);
new CancelButton().click();
} catch (WaitTimeoutExpiredException exc) {
exc.printStackTrace();
log.error("Dialog could not be canceled because there were unfinished jobs running after timeout" + "\n\rTrying to cancel dialog manually");
new DefaultShell("New Server").close();
}
}
use of org.eclipse.reddeer.swt.condition.ControlIsEnabled in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method createApplicationFromLocalWorkspaceTemplate.
@Test
public void createApplicationFromLocalWorkspaceTemplate() {
new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer(DatastoreOS3.PROJECT1_DISPLAYED_NAME);
new DefaultTabItem(OpenShiftLabel.TextLabels.CUSTOM_TEMPLATE).activate();
new PushButton(OpenShiftLabel.Button.BROWSE_WORKSPACE).click();
new DefaultShell(OpenShiftLabel.Shell.SELECT_OPENSHIFT_TEMPLATE);
new DefaultTreeItem(TESTS_PROJECT, "eap64-basic-s2i.json").select();
new OkButton().click();
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Template from workspace is not correctly shown in text field containing its path", new LabeledText(OpenShiftLabel.TextLabels.SELECT_LOCAL_TEMPLATE).getText().equals("${workspace_loc:" + File.separator + TESTS_PROJECT + File.separator + "eap64-basic-s2i.json}"));
new WaitUntil(new ControlIsEnabled(new CancelButton()));
// TODO: Remove comment once JBIDE-24492 is resolved
// assertTrue("Defined resource button should be enabled",
// new PushButton(OpenShiftLabel.Button.DEFINED_RESOURCES).isEnabled());
completeApplicationCreationAndVerify(helloworldProject);
}
Aggregations