use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-openshift by jbosstools.
the class EnvironmentVariableWizardPage method removeEnvironmentVariable.
/**
* Removes environment.
*
* @param envVar environment variable to remove
* @return true if variable was removed successfully, false otherwise
*/
public boolean removeEnvironmentVariable(EnvVar envVar) {
DefaultTable table = new DefaultTable();
table.select(envVar.getName());
new PushButton(OpenShiftLabel.Button.REMOVE_BASIC).click();
new DefaultShell(OpenShiftLabel.Shell.REMOVE_ENV_VAR);
new YesButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_ENV_VAR));
return !(table.containsItem(envVar.getName(), 0) && table.containsItem(envVar.getValue(), 1));
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable 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.condition.ShellIsAvailable in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method addPort.
public void addPort(String containerPort, String hostAddress, String hostPort) {
selectTab(PORTS_TAB_LABEL);
setPublishAllExposedPortsToRandomPorts(false);
new PushButton("Add...").click();
new WaitUntil(new ShellIsAvailable("Exposing a Container Port"));
new LabeledText("Container port:").setText(containerPort);
new LabeledText("Host address:").setText(hostAddress);
new LabeledText("Host port:").setText(hostPort);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method addLink.
// links tab
public void addLink(String containerName, String alias) {
selectTab(LINKS_TAB_LABEL);
new PushButton("Add...").click();
new WaitWhile(new ShellIsAvailable("Container Linking"));
new LabeledText("Container:").setText(containerName);
new LabeledText("Value:").setText(alias);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method deleteRunConfiguration.
public void deleteRunConfiguration(String configuratioName) {
selectConfiguration(configuratioName);
new DefaultToolItem(DELETE_LAUNCH_CONFIGURATION_LABEL).click();
Shell deleteShell = new DefaultShell("Confirm Launch Configuration Deletion");
WidgetIsFound deleteButton = new WidgetIsFound(org.eclipse.swt.widgets.Button.class, deleteShell.getSWTWidget(), new WithMnemonicTextMatcher("Delete"));
Button button;
if (deleteButton.test()) {
// photon changed button text
button = new PushButton(deleteShell, "Delete");
} else {
button = new YesButton(deleteShell);
}
button.click();
new WaitWhile(new ShellIsAvailable(deleteShell));
new WaitUntil(new ShellIsAvailable("Run Configurations"));
}
Aggregations