use of org.jboss.tools.openshift.reddeer.condition.ButtonWithTextIsAvailable in project jbosstools-openshift by jbosstools.
the class ImportApplicationTest method testImportOpenShiftApplicationViaShellMenu.
@Test
public void testImportOpenShiftApplicationViaShellMenu() {
new ShellMenuItem("File", "Import...").select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.IMPORT);
new DefaultTreeItem("OpenShift", "Existing OpenShift Application").select();
new NextButton().click();
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
TestUtils.acceptSSLCertificate();
new NextButton().click();
TestUtils.acceptSSLCertificate();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ButtonWithTextIsAvailable("Refresh"), TimePeriod.VERY_LONG);
new WaitUntil(new TreeHasChildren(new DefaultTree()), TimePeriod.DEFAULT);
new DefaultTreeItem(projectReq.getProjectName() + " " + projectReq.getProjectName()).getItems().get(0).select();
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION), TimePeriod.VERY_LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
assertTrue("There should be imported " + PROJECT_NAME + "project, but there is not", projectExplorer.containsProject(PROJECT_NAME));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Aggregations