/** * Imports archetype project from JBoss Central from section "Start from scratch" * * @param project */ public void importArchetypeProject(ArchetypeProject project) { log.step("Import project start"); JBossCentralProjectWizard dialog = new JBossCentralProjectWizard(project); dialog.open(); NewProjectExamplesStacksRequirementsPage firstPage = new NewProjectExamplesStacksRequirementsPage(); firstPage.setTargetRuntime(1); log.step("Import project first page"); new DefaultLink(); if (project.isBlank()) { firstPage.toggleBlank(project.isBlank()); } checkRequirements(firstPage.getRequirements()); dialog.next(); ArchetypeExamplesWizardFirstPage secondPage = new ArchetypeExamplesWizardFirstPage(); assertFalse("Project Name cannot be empty", secondPage.getProjectName().equals("")); dialog.next(); ArchetypeExamplesWizardPage thirdPage = new ArchetypeExamplesWizardPage(); assertFalse("Group ID cannot be empty", thirdPage.getGroupID().equals("")); NewProjectExamplesReadyPage projectReadyPage = dialog.finishAndWait(); checkProjectReadyPage(projectReadyPage, project); projectReadyPage.finish(); checkForErrors(); }
private void checkProjectReadyPage(NewProjectExamplesReadyPage page, ArchetypeProject project) { assertFalse(page.isQuickFixEnabled()); if (!project.isBlank()) { assertTrue(page.isShowReadmeEnabled()); } }