use of org.eclipse.reddeer.swt.impl.button.CancelButton in project linuxtools by eclipse.
the class SearchDialogTest method testSearchDialog.
@Test
public void testSearchDialog() {
DockerExplorerView explorer = new DockerExplorerView();
getConnection().openImageSearchDialog(IMAGE_NAME, null, REGISTRY_URL);
ImageSearchPage pageOne = new ImageSearchPage(explorer);
pageOne.searchImage();
assertFalse("Search result is empty!", pageOne.getSearchResults().isEmpty());
assertTrue("Search result do not contains image:" + EXPECTED_IMAGE_NAME + "!", pageOne.searchResultsContains(EXPECTED_IMAGE_NAME));
pageOne.next();
// new WaitUntil(new ShellIsAvailable("Progress Information"), TimePeriod.DEFAULT);
AbstractWait.sleep(TimePeriod.getCustom(5));
ImageTagSelectionPage pageTwo = new ImageTagSelectionPage(pageOne);
assertFalse("Search tags are empty!", pageTwo.getTags().isEmpty());
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
if (!pageTwo.tagsContains(IMAGE_TAG)) {
pageTwo.cancel();
new CancelButton().click();
fail("Search results do not contain tag: " + IMAGE_TAG + "!");
}
pageTwo.selectTag(IMAGE_TAG);
pageTwo.finish();
new PushButton("Finish").click();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method closeShell.
@After
public void closeShell() {
Shell shell = ShellLookup.getInstance().getShell(OpenShiftLabel.Shell.ADAPTER);
if (shell != null) {
new DefaultShell(OpenShiftLabel.Shell.ADAPTER);
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.ADAPTER));
}
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class ConnectionWizardHandlingTest method closeNewConnectionShell.
@After
public void closeNewConnectionShell() {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(""));
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton 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.impl.button.CancelButton 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