Search in sources :

Example 1 with TableContainsItem

use of org.eclipse.reddeer.swt.condition.TableContainsItem in project jbosstools-openshift by jbosstools.

the class TemplateParametersTest method testModifyTemplateParameter.

@Test
public void testModifyTemplateParameter() {
    new DefaultTable().getItem(SOURCE_REPOSITORY_URL).select();
    new PushButton(OpenShiftLabel.Button.EDIT).click();
    new DefaultShell(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER);
    new DefaultText().setText(PERSONAL_GIT_REPO_URI);
    new OkButton().click();
    new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER));
    new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
    assertTrue("New value of git repo URI has not been modified successfully.", new DefaultTable().getItem(SOURCE_REPOSITORY_URL).getText(1).equals(PERSONAL_GIT_REPO_URI));
    new PushButton(OpenShiftLabel.Button.RESET).click();
    try {
        new WaitUntil(new TableContainsItem(new DefaultTable(), SOURCE_REPOSITORY_URL_VALUE, 1), TimePeriod.DEFAULT);
    } catch (WaitTimeoutExpiredException ex) {
        fail("Value for git repo URI has not been reset.");
    }
}
Also used : DefaultText(org.eclipse.reddeer.swt.impl.text.DefaultText) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) DefaultTable(org.eclipse.reddeer.swt.impl.table.DefaultTable) TableContainsItem(org.eclipse.reddeer.swt.condition.TableContainsItem) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) Test(org.junit.Test)

Aggregations

WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)1 TableContainsItem (org.eclipse.reddeer.swt.condition.TableContainsItem)1 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)1 DefaultText (org.eclipse.reddeer.swt.impl.text.DefaultText)1 Test (org.junit.Test)1