Search in sources :

Example 51 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.

the class DisableSecureStorageRequirement method setSecureStorageMasterPasswords.

private void setSecureStorageMasterPasswords(boolean checked) {
    WorkbenchPreferenceDialog preferenceDialog = new WorkbenchPreferenceDialog();
    StoragePreferencePage storagePage = new StoragePreferencePage(preferenceDialog);
    preferenceDialog.open();
    preferenceDialog.select(storagePage);
    try {
        new WaitUntil(new WidgetIsFound(org.eclipse.swt.custom.CLabel.class, new WithMnemonicTextMatcher("Secure Storage")), TimePeriod.DEFAULT);
        log.info("Getting master password providers");
        List<PasswordProvider> items = storagePage.getMasterPasswordProviders();
        for (PasswordProvider item : items) {
            log.info("Uncheking table item: " + item.getDescription());
            item.setEnabled(checked);
        }
        new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
        storagePage.apply();
    } catch (WaitTimeoutExpiredException exc) {
        log.error("Secure Storage preferences page has timed out");
        log.error(exc.getMessage());
    } finally {
        preferenceDialog.ok();
    }
}
Also used : WithMnemonicTextMatcher(org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher) WidgetIsFound(org.eclipse.reddeer.core.condition.WidgetIsFound) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PasswordProvider(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.PasswordProvider) StoragePreferencePage(org.eclipse.reddeer.eclipse.equinox.security.ui.storage.StoragePreferencePage)

Example 52 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.

the class NewCDKServerWizard method cancel.

@Override
public void cancel() {
    try {
        // wait for job to start
        new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM);
        // job has started - try to kill it
        new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
    } catch (WaitTimeoutExpiredException exc) {
    // do nothing because job did not start
    }
    super.cancel();
}
Also used : WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) JobIsKilled(org.eclipse.reddeer.workbench.core.condition.JobIsKilled) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 53 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.

the class CDKServerAdapterAbstractTest method setupCDKServerAbstract.

@Before
public void setupCDKServerAbstract() {
    // $NON-NLS-1$
    log.info("Open Servers view tab");
    setServersView(new CDKServersView());
    getServersView().open();
    // $NON-NLS-1$
    log.info("Getting server object from Servers View with name: " + getServerAdapter());
    setCDKServer(getServersView().getServer(getServerAdapter()));
    new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
}
Also used : CDKServersView(org.jboss.tools.cdk.reddeer.server.ui.CDKServersView) SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Before(org.junit.Before)

Example 54 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.

the class CDK3ServerEditorTest method setServerEditor.

public void setServerEditor() {
    serversView = new CDKServersView();
    serversView.open();
    serversView.getServer(getServerAdapter()).open();
    editor = new CDK3ServerEditor(getServerAdapter());
    editor.activate();
    new WaitUntil(new JobIsRunning(), TimePeriod.getCustom(1), false);
}
Also used : CDK3ServerEditor(org.jboss.tools.cdk.reddeer.server.ui.editor.CDK3ServerEditor) CDKServersView(org.jboss.tools.cdk.reddeer.server.ui.CDKServersView) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 55 with JobIsRunning

use of org.eclipse.reddeer.workbench.core.condition.JobIsRunning in project jbosstools-openshift by jbosstools.

the class OpenNewApplicationWizardWithNoProjectTest method deleteTmpProject.

@After
public void deleteTmpProject() {
    OpenShift3Connection connection = new OpenShiftExplorerView().getOpenShift3Connection(connectionReq.getConnection());
    connection.refresh();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    if (connection.projectExists(projectName)) {
        connection.getProject(projectName).delete();
    }
    // Delete connection too
    new OpenShiftExplorerView().getOpenShift3Connection(connectionReq.getConnection()).remove();
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShift3Connection(org.jboss.tools.openshift.reddeer.view.resources.OpenShift3Connection) After(org.junit.After)

Aggregations

JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)154 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)142 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)62 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)52 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)46 Test (org.junit.Test)36 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)31 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)29 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)28 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)23 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)19 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)18 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)18 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)17 DockerImagesTab (org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab)16 ImageRunSelectionPage (org.eclipse.linuxtools.docker.reddeer.core.ui.wizards.ImageRunSelectionPage)14 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)14 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)13 AbstractImageBotTest (org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)12 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)10