use of org.eclipse.reddeer.core.exception.CoreLayerException in project linuxtools by eclipse.
the class DockerExplorerView method getDockerConnectionNames.
/**
* Gets names of all docker connections present in docker explorer.
*
* @return list of docker connections names
*/
public List<String> getDockerConnectionNames() {
activate();
List<String> connectionsNames = new ArrayList<String>();
try {
List<TreeItem> connections = new DefaultTree().getItems();
for (TreeItem item : connections) {
connectionsNames.add(getName(item));
}
} catch (CoreLayerException ex) {
// no connections in view
}
return connectionsNames;
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project linuxtools by eclipse.
the class AbstractDockerBotTest method clearConsole.
protected void clearConsole() {
ConsoleView cview = new ConsoleView();
cview.open();
try {
cview.clearConsole();
} catch (CoreLayerException ex) {
// swallow intentionally
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project linuxtools by eclipse.
the class AbstractImageBotTest method setUpRegister.
protected void setUpRegister(String serverAddress, String email, String userName, String password) {
WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
RegistryAccountsPreferencePage page = new RegistryAccountsPreferencePage(dialog);
dialog.open();
dialog.select(page);
page.removeRegistry(serverAddress);
page.addRegistry(serverAddress, email, userName, password);
try {
new DefaultShell("New Registry Account").setFocus();
} catch (CoreLayerException e) {
new DefaultShell("Preferences").setFocus();
}
new PushButton("Apply and Close").click();
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class OSExplorerResourceTest method testDeploymentConfigVisibleAfterServiceDeletion.
/**
* Test if deployment config is visible in OS Explorer, when there is no service.
*/
@Test(expected = OpenshiftTestInFailureException.class)
public void testDeploymentConfigVisibleAfterServiceDeletion() {
this.project.expand();
Service service = this.project.getService(OpenShiftResources.EAP_SERVICE);
assertTrue("Service does not exist!", service != null);
service.select();
new ContextMenuItem("Delete").select();
new DefaultShell("Delete OpenShift Resource");
new OkButton().click();
// assert service is deleted
List<OpenShiftResource> resources = this.project.getOpenShiftResources(Resource.SERVICE);
assertTrue("Service not deleted!", resources.isEmpty());
try {
this.project.getTreeItem().getItem("eap-app selector: deploymentConfig=eap-app");
} catch (CoreLayerException e) {
// TODO: do not throw after JBIDE-24217 is fixed
throw new OpenshiftTestInFailureException("JBIDE-24217");
// TODO: uncomment after JBIDE-24217 is fixed
// fail("Deployment config not visible!");
}
}
use of org.eclipse.reddeer.core.exception.CoreLayerException in project jbosstools-openshift by jbosstools.
the class EditResourcesTest method testIncorrectResourceContent.
@Test
public void testIncorrectResourceContent() {
TextEditor editor = getBuildConfigTextEditor();
String text = editor.getText();
if (buildConfig == null) {
buildConfig = text;
}
editor.setText(text.replace("\"namespace\" : \"" + DatastoreOS3.PROJECT1 + "\"", "\"namespace\" : \"" + DatastoreOS3.PROJECT1 + "\"wtf"));
try {
editor.save();
} catch (CoreLayerException ex) {
// ok
}
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT, false);
assertTrue("Editor should be dirty, it should not be able to save incorrect content", editor.isDirty());
try {
new DefaultShell("Problem Occurred");
new OkButton().click();
} catch (RedDeerException ex) {
// sometimes it occures, sometimes not
}
}
Aggregations