Search in sources :

Example 1 with GitCloningWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardGitTest method testNotExistingBranch.

@Test(expected = OpenshiftTestInFailureException.class)
public void testNotExistingBranch() {
    Git repo = createRepo();
    setRemote(repo, getOriginURL());
    performCommit(repo);
    renameMaster(repo);
    service.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    ImportApplicationWizard importWizard = new ImportApplicationWizard();
    assertProjectExistsErrorInWizard(importWizard);
    GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
    gitCloningWizardPage.useExistingRepository(true);
    try {
        assertGitRemoteErrorInWizzard(importWizard);
    } catch (AssertionError err) {
        importWizard.cancel();
        throw new OpenshiftTestInFailureException("https://issues.jboss.org/browse/JBIDE-24646", err);
    }
    importWizard.cancel();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OpenshiftTestInFailureException(org.jboss.tools.openshift.ui.bot.test.common.OpenshiftTestInFailureException) Git(org.eclipse.jgit.api.Git) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) GitCloningWizardPage(org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 2 with GitCloningWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardGitTest method testNoRepoRemote.

@Test
public void testNoRepoRemote() {
    createRepo();
    service.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    ImportApplicationWizard importWizard = new ImportApplicationWizard();
    assertProjectExistsErrorInWizard(importWizard);
    GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
    gitCloningWizardPage.useExistingRepository(true);
    assertGitRemoteErrorInWizzard(importWizard);
    importWizard.cancel();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) GitCloningWizardPage(org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 3 with GitCloningWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardGitTest method testNotMatchingRepoRemote.

@Test
public void testNotMatchingRepoRemote() {
    Git repo = createRepo();
    setRemote(repo);
    service.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    ImportApplicationWizard importWizard = new ImportApplicationWizard();
    assertProjectExistsErrorInWizard(importWizard);
    GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
    gitCloningWizardPage.useExistingRepository(true);
    assertGitRemoteErrorInWizzard(importWizard);
    importWizard.cancel();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) Git(org.eclipse.jgit.api.Git) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) GitCloningWizardPage(org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 4 with GitCloningWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardTest method testImportOpenShift3AppViaOpenshiftViewTwice.

@Test
public void testImportOpenShift3AppViaOpenshiftViewTwice() {
    testImportOpenShift3AppViaOpenshiftView();
    ImportApplicationWizard importWizard = OpenShiftUtils.openImportApplicationWizardFromOpenshiftView(project);
    GitCloningWizardPage gitWizardPage = new GitCloningWizardPage();
    assertTrue("There should be an error in the wizard (There already is a project with specified name)", gitWizardPage.projectExists());
    gitWizardPage.useExistingRepository(true);
    importWizard.finishAndOverrideExisting();
    assertProjectExistsInProjectView(OpenShiftResources.NODEJS_GIT_NAME);
}
Also used : GitCloningWizardPage(org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) Test(org.junit.Test)

Aggregations

GitCloningWizardPage (org.jboss.tools.openshift.reddeer.wizard.importapp.GitCloningWizardPage)4 ImportApplicationWizard (org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard)4 Test (org.junit.Test)4 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)3 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)3 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)3 Git (org.eclipse.jgit.api.Git)2 OpenshiftTestInFailureException (org.jboss.tools.openshift.ui.bot.test.common.OpenshiftTestInFailureException)1