Search in sources :

Example 16 with ContextMenuItem

use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.

the class OpenShiftUtils method openImportApplicationWizardFromOpenshiftView.

public static ImportApplicationWizard openImportApplicationWizardFromOpenshiftView(OpenShiftProject openshiftProject) {
    openshiftProject.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    return new ImportApplicationWizard();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 17 with ContextMenuItem

use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.

the class OpenShiftUtils method openServerSettingsWizardFromOpenshiftView.

public static ServerSettingsWizard openServerSettingsWizardFromOpenshiftView(Service openshiftService) {
    openshiftService.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS), TimePeriod.LONG);
    return new ServerSettingsWizard();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ServerSettingsWizard(org.jboss.tools.openshift.reddeer.wizard.server.ServerSettingsWizard) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 18 with ContextMenuItem

use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.

the class OpenShiftUtils method updateMavenProject.

public static void updateMavenProject(String projectName) {
    new ProjectExplorer().getProject(projectName);
    new ContextMenuItem("Maven", "Update Project...").select();
    new DefaultShell("Update Maven Project");
    new PushButton("Select All").click();
    new PushButton("OK").click();
    new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 19 with ContextMenuItem

use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.

the class ImportApplicationWizardGitTest method testNotGitRepo.

@Test
public void testNotGitRepo() {
    assertTrue("Failed to create test project non git folder!", projectFolder.mkdir());
    service.select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
    new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
    ImportApplicationWizard importWizard = new ImportApplicationWizard();
    assertProjectExistsErrorInWizard(importWizard);
    CheckBox useExistingRepositoryCheckBox = new CheckBox(new DefaultGroup("Clone destination"), "Do not clone - use existing repository");
    assertFalse("Empty non git folder should not be able to choose!", useExistingRepositoryCheckBox.isEnabled());
    importWizard.cancel();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) DefaultGroup(org.eclipse.reddeer.swt.impl.group.DefaultGroup) ImportApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Example 20 with ContextMenuItem

use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem 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)

Aggregations

ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)73 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)36 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)36 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)33 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)29 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)29 Test (org.junit.Test)26 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)19 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)17 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)15 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)11 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)11 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)9 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)8 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)8 KnownConfigurationsView (org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView)7 OpenShift3Connection (org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection)7 ImportApplicationWizard (org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard)6 CheckBox (org.eclipse.reddeer.swt.impl.button.CheckBox)5 EditConfigurationShell (org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell)5