use of org.eclipse.reddeer.swt.impl.text.DefaultText in project linuxtools by eclipse.
the class DockerImagesTab method searchImage.
public void searchImage(String searchText) {
this.activate();
new DefaultText().setText(searchText);
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project linuxtools by eclipse.
the class DockerContainersTab method searchContainer.
public void searchContainer(String containerName) {
this.activate();
new DefaultText().setText(containerName);
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class EditResourceLimitsTest method incrementLimits.
private void incrementLimits(int index, String defaultSuffix) {
new ContextMenuItem(OpenShiftLabel.ContextMenu.EDIT_RESOURCE_LIMITS).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_RESOURCE_LIMITS));
new DefaultShell(OpenShiftLabel.Shell.EDIT_RESOURCE_LIMITS).setFocus();
Text text = new DefaultText(index);
String value = text.getText();
long val = 0L;
try {
val = Long.parseLong(value);
} catch (NumberFormatException e) {
}
text.setText(Long.toString(++val));
Combo combo = new DefaultCombo(index);
value = combo.getSelection();
if (StringUtils.isEmpty(value)) {
combo.setSelection(defaultSuffix);
}
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method completeWizardAndVerify.
private void completeWizardAndVerify() {
new WaitUntil(new ControlIsEnabled(new NextButton()), TimePeriod.DEFAULT);
new NextButton().click();
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
String srcRepoRef = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1);
srcRepoURI = new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL).getText(1);
String contextDir = new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1);
applicationName = new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME).getText(1);
new NextButton().click();
new WaitWhile(new ControlIsEnabled(new NextButton()), TimePeriod.LONG);
new FinishButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.APPLICATION_SUMMARY), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_REF + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_REF).getText(1).equals(srcRepoRef));
assertTrue(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.SOURCE_REPOSITORY_URL.split(" ")[0]).getText(1).equals(srcRepoURI));
assertTrue(TemplateParametersTest.CONTEXT_DIR + " is not same as the one shown in New OpenShift" + " Application wizard.", new DefaultTable().getItem(TemplateParametersTest.CONTEXT_DIR).getText(1).equals(contextDir));
assertTrue(TemplateParametersTest.APPLICATION_NAME.split(" ")[0] + " is not same as the one shown in " + "New OpenShift Application wizard.", new DefaultTable().getItem(TemplateParametersTest.APPLICATION_NAME.split(" ")[0]).getText(1).equals(applicationName));
assertFalse(TemplateParametersTest.GENERIC_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GENERIC_SECRET.split(" ")[0]).getText(1).isEmpty());
assertFalse(TemplateParametersTest.GITHUB_SECRET.split(" ")[0] + " should be generated and non-empty.", new DefaultTable().getItem(TemplateParametersTest.GITHUB_SECRET.split(" ")[0]).getText(1).isEmpty());
new DefaultLink("Click here to display the webhooks available to automatically trigger builds.").click();
new DefaultShell(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS);
genericWebhookURL = new DefaultText(0).getText();
githubWebhookURL = new DefaultText(1).getText();
assertFalse("Generic webhook URL should not be empty.", genericWebhookURL.isEmpty());
assertFalse("GitHub webhook URL should not be empty.", githubWebhookURL.isEmpty());
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.WEBHOOK_TRIGGERS));
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_SUMMARY);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.text.DefaultText in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method setTemplateParameters.
private void setTemplateParameters(TemplateParameter[] parameters) {
for (TemplateParameter parameter : parameters) {
new DefaultTable().select(parameter.getName());
new WaitUntil(new ControlIsEnabled(new PushButton(OpenShiftLabel.Button.EDIT)));
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER);
new DefaultText().setText(parameter.getValue());
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER));
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
}
}
Aggregations