use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method validateGitReference.
private void validateGitReference(String ref) {
new LabeledText(OpenShiftLabel.TextLabels.GIT_REF).setText(ref);
assertFalse("Next button should be disabled if git reference is invalid", new NextButton().isEnabled());
assertFalse("Finish button should be disabled if git reference is invalid", new FinishButton().isEnabled());
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class ResourceLabelsWizardPage method editLabel.
/**
* Changes resource label to have a new name and value.
* @param name current name of resource label
* @param newName new name of resource label
* @param newValue new value of resource label
* @return true if resource label was successfully modified, false otherwise
*/
public boolean editLabel(String name, String newName, String newValue) {
new DefaultTable().select(name);
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(newName);
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(newValue);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
return new DefaultTable().containsItem(newName, 0) && new DefaultTable().containsItem(newValue, 1);
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project jbosstools-openshift by jbosstools.
the class ResourceLabelsWizardPage method createLabel.
/**
* Creates a new resource label with specified name and value.
*
* @param name name of label
* @param value value of label
* @return true if label was created successfully, false otherwise
*/
public boolean createLabel(String name, String value) {
new PushButton(OpenShiftLabel.Button.ADD).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
new LabeledText(OpenShiftLabel.TextLabels.LABEL).setText(name);
new LabeledText(OpenShiftLabel.TextLabels.VALUE).setText(value);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.RESOURCE_LABEL));
return new DefaultTable().containsItem(name, 0) && new DefaultTable().containsItem(value, 1);
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method editPort.
public void editPort(String oldContainerPort, String newContainerPort, String newHostAddress, String newHostPort) {
selectTab(PORTS_TAB_LABEL);
setPublishAllExposedPortsToRandomPorts(false);
if (selectItemInTable(oldContainerPort)) {
new PushButton("Edit...");
new WaitUntil(new ShellIsAvailable("Exposing a Container Port"));
new LabeledText("Container port:").setText(newContainerPort);
new LabeledText("Host address:").setText(newHostAddress);
new LabeledText("Host port:").setText(newHostPort);
new OkButton().click();
} else {
throw new EclipseLayerException("There is no " + oldContainerPort + " in table on tab " + PORTS_TAB_LABEL);
}
}
use of org.eclipse.reddeer.swt.impl.text.LabeledText in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method addDataVolumeToHost.
public void addDataVolumeToHost(String containerPath, String path, boolean readOnly) {
selectTab(VOLUMES_TAB_LABEL);
new PushButton("Add...").click();
new LabeledText("Container path:").setText(containerPath);
new RadioButton("Mount a host directory or host file").click();
new LabeledText("Path:").setText(path);
new CheckBox("Read-only access").toggle(readOnly);
new OkButton().click();
}
Aggregations