Search in sources :

Example 26 with CancelButton

use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.

the class CreateNewConnectionTest method shouldExtractTokenInBrowserWindow.

// Skip Test for now, not stable
// @Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void shouldExtractTokenInBrowserWindow() {
    openConnectionWizardAndSetDefaultServerOAuth();
    String token = new AuthenticationTokenRetrival(DatastoreOS3.USERNAME, DatastoreOS3.PASSWORD).retrieveToken();
    String tokenText = new LabeledText(OpenShiftLabel.TextLabels.TOKEN).getText();
    assertEquals(token, tokenText);
    new CancelButton().click();
}
Also used : AuthenticationTokenRetrival(org.jboss.tools.openshift.reddeer.utils.AuthenticationTokenRetrival) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) RunIf(org.eclipse.reddeer.junit.execution.annotation.RunIf)

Example 27 with CancelButton

use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.

the class OpenNewConnectionWizardTest method verifyNewConnectionWizardIsOpened.

private void verifyNewConnectionWizardIsOpened() {
    Shell connectionShell = new DefaultShell(OpenShiftLabel.Shell.NEW_CONNECTION);
    new DefaultCombo(OpenShiftLabel.TextLabels.NEW_CONNECTION);
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(connectionShell));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultCombo(org.eclipse.reddeer.swt.impl.combo.DefaultCombo) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton)

Example 28 with CancelButton

use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.

the class DeployDockerImageTest method closeWizard.

/**
 * Closes Deploy Image to OpenShift wizard.
 */
private void closeWizard() {
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DEPLOY_IMAGE_TO_OPENSHIFT));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton)

Example 29 with CancelButton

use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-hibernate by jbosstools.

the class SelectConnectionProfileDialog method cancel.

public void cancel() {
    new CancelButton(this).click();
    new WaitWhile(new ShellIsAvailable(this));
    new DefaultShell("");
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton)

Aggregations

CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)29 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)19 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)18 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)13 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)11 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)10 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)8 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)6 After (org.junit.After)6 Test (org.junit.Test)6 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)5 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)3 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)3 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)3 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)3 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)3 DockerExplorerView (org.eclipse.linuxtools.docker.reddeer.ui.DockerExplorerView)2 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 RunIf (org.eclipse.reddeer.junit.execution.annotation.RunIf)2 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)2