use of org.eclipse.reddeer.swt.api.Shell in project linuxtools by eclipse.
the class DockerImage method remove.
/**
* * Removes docker image.
*/
public void remove() {
select();
new ContextMenu().getItem("Remove").select();
Shell confirm = new DefaultShell("Confirm Remove Image");
new OkButton().click();
new WaitWhile(new ShellIsAvailable(confirm));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.api.Shell in project jbosstools-openshift by jbosstools.
the class OpenNewConnectionWizardTest method verifyNewConnectionWizardIsOpened.
private void verifyNewConnectionWizardIsOpened() {
Shell connectionShell = new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
new DefaultCombo(OpenShiftLabel.TextLabels.NEW_CONNECTION);
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(connectionShell));
}
use of org.eclipse.reddeer.swt.api.Shell in project jbosstools-hibernate by jbosstools.
the class HibernateRedDeerTest method importMavenProject.
public static void importMavenProject(String prjName) {
try {
Path sourceFolder = new File("resources/prj/" + prjName).toPath();
File dir = new File("target/" + prjName);
if (dir.exists()) {
deleteDir(dir);
}
Path destFolder = dir.toPath();
Files.walkFileTree(sourceFolder, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException {
Files.createDirectories(destFolder.resolve(sourceFolder.relativize(dir)));
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
Files.copy(file, destFolder.resolve(sourceFolder.relativize(file)));
return FileVisitResult.CONTINUE;
}
});
MavenImportWizard wizard = new MavenImportWizard();
wizard.open();
wizard.getWizardPage().setRootDirectory("target/" + prjName);
wizard.getWizardPage().refresh();
wizard.getWizardPage().waitUntilProjectIsLoaded(TimePeriod.LONG);
Shell shell = new DefaultShell("Import Maven Projects");
new PushButton("Finish").click();
new WaitWhile(new ShellIsAvailable(shell), TimePeriod.DEFAULT);
new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
} catch (IOException e) {
fail("Unable to find pom " + prjName);
}
// TODO check error log for errors
}
use of org.eclipse.reddeer.swt.api.Shell in project jbosstools-hibernate by jbosstools.
the class CriteriaEditor method runCriteria.
/**
* Executes criteria
*/
public void runCriteria() {
new DefaultToolItem("Run criteria").click();
try {
Shell s = new DefaultShell("Open Session factory");
new YesButton(s).click();
new WaitWhile(new ShellIsAvailable(s));
} catch (RedDeerException e) {
log.warn("Open Session factory question dialog was expected");
} finally {
new WaitWhile(new JobIsRunning());
}
}
use of org.eclipse.reddeer.swt.api.Shell in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method deleteConsoleConfiguration.
/**
* Deletes hibernate console configuration
* @param console hibernate console configuration name
*/
public void deleteConsoleConfiguration(String console) {
new DefaultTreeItem(new DefaultTree(this), console).select();
new ContextMenuItem("Delete Configuration").select();
Shell deleteShell = new DefaultShell("Delete console configuration");
new OkButton(deleteShell).click();
new WaitWhile(new ShellIsAvailable(deleteShell));
new WaitWhile(new JobIsRunning());
}
Aggregations