Search in sources :

Example 1 with JPAProjectWizardFirstPage

use of org.jboss.tools.hibernate.reddeer.wizard.JPAProjectWizardFirstPage in project jbosstools-hibernate by jbosstools.

the class JPAProjectFactory method createProject.

/**
 * Creates JPA Project
 * @param prj projec name
 * @param version JPA version
 * @param platform JPA platform
 */
public static void createProject(String prj, String version, String platform) {
    log.step("Open JPA Project Wizard");
    JPAProjectWizard wizard = new JPAProjectWizard();
    wizard.open();
    JPAProjectWizardFirstPage firstPage = new JPAProjectWizardFirstPage(wizard);
    firstPage.setProjectName(prj);
    firstPage.setJPAVersion(version);
    wizard.next();
    wizard.next();
    log.step("Disable hibernate configuration");
    JpaFacetInstallPage facetPage = new JpaFacetInstallPage(wizard);
    facetPage.setPlatform(platform);
    facetPage.setJpaImplementation("Disable Library Configuration");
    log.step("Click finish");
    wizard.finish();
    new WaitWhile(new JobIsRunning());
    ProblemsView problemsView = new ProblemsView();
    problemsView.open();
    List<Problem> allErrors = problemsView.getProblems(ProblemType.ERROR);
    problemsView.open();
    assertTrue("No problems are expected (JBIDE-17855)", allErrors.size() == 0);
}
Also used : JPAProjectWizard(org.jboss.tools.hibernate.reddeer.wizard.JPAProjectWizard) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JPAProjectWizardFirstPage(org.jboss.tools.hibernate.reddeer.wizard.JPAProjectWizardFirstPage) JpaFacetInstallPage(org.jboss.tools.hibernate.reddeer.wizard.JpaFacetInstallPage) Problem(org.eclipse.reddeer.eclipse.ui.problems.Problem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) ProblemsView(org.eclipse.reddeer.eclipse.ui.views.markers.ProblemsView)

Aggregations

WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 Problem (org.eclipse.reddeer.eclipse.ui.problems.Problem)1 ProblemsView (org.eclipse.reddeer.eclipse.ui.views.markers.ProblemsView)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1 JPAProjectWizard (org.jboss.tools.hibernate.reddeer.wizard.JPAProjectWizard)1 JPAProjectWizardFirstPage (org.jboss.tools.hibernate.reddeer.wizard.JPAProjectWizardFirstPage)1 JpaFacetInstallPage (org.jboss.tools.hibernate.reddeer.wizard.JpaFacetInstallPage)1