Search in sources :

Example 16 with CancelButton

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

the class HandleCustomTemplateTest method assertTemplateIsUsableInApplicationWizard.

private void assertTemplateIsUsableInApplicationWizard() {
    new NewOpenShift3ApplicationWizard(connectionReq.getConnection()).openWizardFromExplorer();
    try {
        new DefaultTreeItem("helloworld-sample (instant-app) - " + DatastoreOS3.PROJECT1);
    } catch (RedDeerException ex) {
        fail("Template is not visible in New OpenShift application wizard although it should be.");
    }
    new CancelButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD));
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) NewOpenShift3ApplicationWizard(org.jboss.tools.openshift.reddeer.wizard.v3.NewOpenShift3ApplicationWizard)

Example 17 with CancelButton

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

the class CDKServerEditorAbstractTest method addCDKServer.

public void addCDKServer() {
    NewCDKServerWizard dialog = CDKTestUtils.openNewServerWizardDialog();
    try {
        setupServerWizardPage(dialog);
        new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM, false);
        dialog.finish(TimePeriod.MEDIUM);
    } catch (RedDeerException coreExc) {
        new CancelButton().click();
        throw new CDKServerException("Exception occured in CDK server wizard, wizard was canceled", coreExc);
    }
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) CDKServerException(org.jboss.tools.cdk.reddeer.server.exception.CDKServerException) NewCDKServerWizard(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 18 with CancelButton

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

the class TemplateParametersTest 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 19 with CancelButton

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

the class CreateApplicationOnBuilderImageTest method validateJBIDE22704.

private void validateJBIDE22704() {
    BuilderImageApplicationWizardHandlingTest.nextToBuildConfigurationWizardPage();
    applicationName = new LabeledText("Name: ").getText();
    assertNotNull(applicationName);
    assertTrue(applicationName.length() > 0);
    String gitUrl = new LabeledText("Git Repository URL:").getText();
    assertNotNull(gitUrl);
    if (gitUrl.length() < 1) {
        new CancelButton().click();
        new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD));
        throw new OpenshiftTestInFailureException("JBIDE-23704 should be fixed now.");
    }
    new WaitUntil(new ControlIsEnabled(new NextButton()));
    /*
		 * switch to the Deployment page
		 */
    new NextButton().click();
    new WaitUntil(new ControlIsEnabled(new BackButton()));
    int numberofEnvironmentVariables = new DefaultTable().rowCount();
    assertTrue(numberofEnvironmentVariables > 0);
    /*
		 * switch to the Routing page
		 */
    new NextButton().click();
    new WaitUntil(new ControlIsEnabled(new BackButton()));
    int numberOfServicePorts = new DefaultTable().rowCount();
    assertTrue(numberOfServicePorts > 0);
    new CancelButton().click();
    new WaitWhile(new JobIsRunning(), TimePeriod.getCustom(120));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OpenshiftTestInFailureException(org.jboss.tools.openshift.ui.bot.test.common.OpenshiftTestInFailureException) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 20 with CancelButton

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

the class CredentialsWizardPage method cancelAddingUser.

public void cancelAddingUser() {
    try {
        Button cancel = new CancelButton();
        cancel.click();
    } catch (CoreLayerException exc) {
        throw new CoreLayerException("Canceling setting the credentials was not successful");
    }
}
Also used : CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) Button(org.eclipse.reddeer.swt.api.Button) CancelButton(org.eclipse.reddeer.swt.impl.button.CancelButton) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException)

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