Search in sources :

Example 1 with ProjectExists

use of org.eclipse.reddeer.eclipse.condition.ProjectExists in project jbosstools-openshift by jbosstools.

the class CreateApplicationOnBuilderImageTest method setUp.

@Before
public void setUp() {
    OpenShift3NativeProjectUtils.getOrCreateProject(DatastoreOS3.PROJECT1, DatastoreOS3.PROJECT1_DISPLAYED_NAME, StringUtils.EMPTY, connectionReq.getConnection());
    TestUtils.cleanupGitFolder(gitFolder);
    if (new ProjectExists(projectName).test()) {
        new ProjectExplorer().getProject(projectName).delete(true);
    }
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ProjectExists(org.eclipse.reddeer.eclipse.condition.ProjectExists) Before(org.junit.Before)

Example 2 with ProjectExists

use of org.eclipse.reddeer.eclipse.condition.ProjectExists in project jbosstools-openshift by jbosstools.

the class CreateApplicationFromTemplateTest method importApplicationAndVerify.

public static void importApplicationAndVerify(String projectName) {
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
    try {
        new CheckBox(new WithTextMatcher(new StringStartsWith("Do not clone"))).toggle(true);
    } catch (CoreLayerException ex) {
    // git directory is not in use
    } catch (WaitTimeoutExpiredException ex) {
    // swallow, checkbox is disabled
    }
    new FinishButton().click();
    ProjectExplorer projectExplorer = new ProjectExplorer();
    projectExplorer.open();
    OpenShiftUtils.handleCheatSheetCreateServerAdapter();
    new WaitUntil(new ProjectExists(projectName, new ProjectExplorer()), TimePeriod.LONG, false);
    assertTrue("Project Explorer should contain imported project " + projectName, projectExplorer.containsProject(projectName));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) StringStartsWith(org.hamcrest.core.StringStartsWith) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ProjectExists(org.eclipse.reddeer.eclipse.condition.ProjectExists) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WithTextMatcher(org.eclipse.reddeer.core.matcher.WithTextMatcher) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException)

Example 3 with ProjectExists

use of org.eclipse.reddeer.eclipse.condition.ProjectExists in project jbosstools-openshift by jbosstools.

the class CreateApplicationFromTemplateTest method importTestsProject.

@BeforeClass
public static void importTestsProject() {
    new ExternalProjectImportWizardDialog().open();
    new DefaultCombo().setText(TESTS_PROJECT_LOCATION);
    new PushButton("Refresh").click();
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.LONG);
    new FinishButton().click();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ProjectExists(TESTS_PROJECT), TimePeriod.LONG);
}
Also used : DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ProjectExists(org.eclipse.reddeer.eclipse.condition.ProjectExists) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) ExternalProjectImportWizardDialog(org.eclipse.reddeer.eclipse.ui.wizards.datatransfer.ExternalProjectImportWizardDialog) BeforeClass(org.junit.BeforeClass)

Aggregations

ProjectExists (org.eclipse.reddeer.eclipse.condition.ProjectExists)3 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)2 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)2 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)2 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)1 ExternalProjectImportWizardDialog (org.eclipse.reddeer.eclipse.ui.wizards.datatransfer.ExternalProjectImportWizardDialog)1 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)1 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)1 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1 StringStartsWith (org.hamcrest.core.StringStartsWith)1 Before (org.junit.Before)1 BeforeClass (org.junit.BeforeClass)1