use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class ScalingTest method scaleTo.
private void scaleTo(int amountOfPods) {
new ContextMenuItem(OpenShiftLabel.ContextMenu.SCALE_TO).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.SCALE_DEPLOYMENTS));
new DefaultShell(OpenShiftLabel.Shell.SCALE_DEPLOYMENTS).setFocus();
new WaitWhile(new ControlIsEnabled(new OkButton()));
new DefaultSpinner().setValue(amountOfPods);
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.OkButton 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.button.OkButton 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.button.OkButton 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.button.OkButton 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