Search in sources :

Example 61 with JobIsRunning

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

the class OpenNewApplicationWizardWithNoProjectTest method closeWizard.

private void closeWizard() {
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 62 with JobIsRunning

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

the class LabelsTest method closeNewApplicationWizard.

@After
public void closeNewApplicationWizard() {
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning());
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) After(org.junit.After)

Example 63 with JobIsRunning

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

the class OpenNewApplicationWizardTest method closeWizard.

private void closeWizard() {
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning());
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 64 with JobIsRunning

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

the class DeployDockerImageTest method proceedThroughDeployImageToOpenShiftWizard.

/**
 * Proceeds through the image if the first wizard page has correct details -
 * connection, project and image name.
 */
private void proceedThroughDeployImageToOpenShiftWizard() {
    new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT, false);
    assertTrue("Next button should be enabled if all details are set correctly", new NextButton().isEnabled());
    new NextButton().click();
    new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
    new NextButton().click();
    if (!new CheckBox("Add Route").isChecked()) {
        new CheckBox("Add Route").click();
    }
    new FinishButton().click();
    new ShellWithButton("Deploy Image to OpenShift", "OK");
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable("Deploy Image to OpenShift"), TimePeriod.LONG);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) ShellWithButton(org.jboss.tools.openshift.reddeer.widget.ShellWithButton) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) CheckBox(org.eclipse.reddeer.swt.impl.button.CheckBox) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 65 with JobIsRunning

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

the class GetOpenShiftIOTokenTest method testGetToken.

@Test
public void testGetToken() {
    new DefaultToolItem(new WorkbenchShell(), "Connect to OpenShift.io").click();
    DefaultShell browser = new DefaultShell();
    InternalBrowser internalBrowser = new InternalBrowser(browser);
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new BrowserContainsText("OpenShift.io Developer Preview"), TimePeriod.LONG);
    internalBrowser.execute(String.format("document.getElementById(\"username\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_USERNAME));
    internalBrowser.execute(String.format("document.getElementById(\"password\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_PASSWORD));
    internalBrowser.execute("document.getElementById(\"password\").parentElement.parentElement.parentElement.submit()");
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    try {
        new DefaultShell("OpenShift.io");
    } catch (CoreLayerException ex) {
        // Secure storage has been triggered
        SecureStorage.handleSecureStoragePasswordAndHint(SystemProperties.SECURE_STORAGE_PASSWORD);
        new DefaultShell("OpenShift.io");
    }
    new OkButton().click();
    checkAccountInProperties();
    checkPluginInSecureStorage();
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) InternalBrowser(org.eclipse.reddeer.swt.impl.browser.InternalBrowser) DefaultToolItem(org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem) BrowserContainsText(org.jboss.tools.openshift.reddeer.condition.BrowserContainsText) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException) AbstractTest(org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest) Test(org.junit.Test)

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