Search in sources :

Example 16 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class EditResourceLimitsTest method testViaContextMenuOfService.

public void testViaContextMenuOfService(int index, String defaultSuffix) {
    Service service = project.getService(OpenShiftResources.NODEJS_SERVICE);
    assertNotNull(service);
    OpenShiftResource deploymentConfig = project.getOpenShiftResource(Resource.DEPLOYMENT_CONFIG, OpenShiftResources.NODEJS_APP_DEPLOYMENT_CONFIG);
    assertNotNull(deploymentConfig);
    String version = deploymentConfig.getPropertyValue("Basic", "Resource Version");
    service.select();
    incrementLimits(index, defaultSuffix);
    new WaitUntil(new ResourceIsUpdated(project.getName(), Resource.DEPLOYMENT_CONFIG, OpenShiftResources.NODEJS_APP_DEPLOYMENT_CONFIG, new String[] { "Basic", "Resource Version" }, not(version), requiredConnection.getConnection()), TimePeriod.getCustom(800));
}
Also used : ResourceIsUpdated(org.jboss.tools.openshift.reddeer.condition.ResourceIsUpdated) RequiredService(org.jboss.tools.openshift.reddeer.requirement.OpenShiftServiceRequirement.RequiredService) Service(org.jboss.tools.openshift.reddeer.view.resources.Service) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) OpenShiftResource(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftResource)

Example 17 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class PublishChangesTest method verifyChangesTookEffect.

private void verifyChangesTookEffect() {
    new ServerAdapter(Version.OPENSHIFT3, "eap-app", "Service").select();
    new ContextMenuItem(OpenShiftLabel.ContextMenu.SHOW_IN_WEB_BROWSER).select();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    try {
        new WaitUntil(new BrowserContainsText("Hello"), TimePeriod.VERY_LONG);
    } catch (WaitTimeoutExpiredException ex) {
        fail("Application was not deployed successfully because it is not shown in web browser properly.");
    }
}
Also used : ServerAdapter(org.jboss.tools.openshift.reddeer.view.resources.ServerAdapter) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) BrowserContainsText(org.jboss.tools.openshift.reddeer.condition.BrowserContainsText) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 18 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class PublishChangesTest method waitForRunningApplication.

@BeforeClass
public static void waitForRunningApplication() {
    new ProjectExplorer().deleteAllProjects(true);
    new WaitUntil(new OpenShiftResourceExists(Resource.BUILD, "eap-app-1", ResourceState.COMPLETE, projectReq.getProjectName(), connectionReq.getConnection()), TimePeriod.getCustom(1000));
    OpenShiftExplorerView openShiftExplorerView = new OpenShiftExplorerView();
    OpenShiftProject project = openShiftExplorerView.getOpenShift3Connection(connectionReq.getConnection()).getProject(projectReq.getProjectName());
    new WaitUntil(new ApplicationPodIsRunning(project), TimePeriod.LONG);
    cloneGitRepoAndImportProject();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ApplicationPodIsRunning(org.jboss.tools.openshift.reddeer.condition.ApplicationPodIsRunning) OpenShiftProject(org.jboss.tools.openshift.reddeer.view.resources.OpenShiftProject) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) OpenShiftExplorerView(org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView) OpenShiftResourceExists(org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists) BeforeClass(org.junit.BeforeClass)

Example 19 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class PublishChangesTest method changeProjectAndVerifyAutoPublish.

private void changeProjectAndVerifyAutoPublish() {
    ProjectExplorer projectExplorer = new ProjectExplorer();
    projectExplorer.open();
    projectExplorer.getProject(PROJECT_NAME).select();
    ProjectItem projectItem = projectExplorer.getProject(PROJECT_NAME).getProjectItem("Java Resources", "src/main/java", "org.jboss.as.quickstarts.helloworld", "HelloService.java");
    projectItem.select();
    projectItem.open();
    TextEditor textEditor = new TextEditor("HelloService.java");
    textEditor.setText(PUBLISHED_CODE);
    textEditor.close(true);
    new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
    new WaitUntil(new ConsoleHasNoChange(), TimePeriod.VERY_LONG);
    assertTrue("Local changes performed to project have not been autopublished, or at least rsync " + "output in console view does not contain information about sending incremental list of changes," + "specifically with changed class " + changedClass, new ConsoleView().getConsoleText().contains(changedClass));
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ProjectItem(org.eclipse.reddeer.eclipse.core.resources.ProjectItem) TextEditor(org.eclipse.reddeer.workbench.impl.editor.TextEditor) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ConsoleView(org.eclipse.reddeer.eclipse.ui.console.ConsoleView) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) ConsoleHasNoChange(org.eclipse.reddeer.eclipse.condition.ConsoleHasNoChange)

Example 20 with WaitUntil

use of org.eclipse.reddeer.common.wait.WaitUntil in project jbosstools-openshift by jbosstools.

the class ServerAdapterWizardHandlingTest method next.

private void next() {
    new NextButton().click();
    TestUtils.acceptSSLCertificate();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
    new WaitUntil(new ControlIsEnabled(new BackButton()));
}
Also used : NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) BackButton(org.eclipse.reddeer.swt.impl.button.BackButton) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)178 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)74 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)73 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)63 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)59 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)54 Test (org.junit.Test)44 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)40 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)36 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)36 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)34 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)30 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)25 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)22 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)20 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)18 OpenShiftResourceExists (org.jboss.tools.openshift.reddeer.condition.OpenShiftResourceExists)18 BackButton (org.eclipse.reddeer.swt.impl.button.BackButton)15 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)13 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)12