use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class OpenShiftProject method delete.
/**
* Deletes OpenShift project.
*/
public void delete() {
item.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_OS_PROJECT).select();
new DefaultShell(OpenShiftLabel.Shell.DELETE_OS_PROJECT);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class OpenShiftResource method delete.
/**
* Deletes resource via properties view.
*/
public void delete() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_RESOURCE).select();
new DefaultShell(OpenShiftLabel.Shell.DELETE_RESOURCE);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_RESOURCE), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class SecureStorage method provideSecureStoragePassword.
private static boolean provideSecureStoragePassword(String password) {
try {
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE_PASSWORD);
} catch (CoreLayerException ex) {
LOGGER.info(String.format("Shell with label \"%s\" was not found. Trying \"%s\"", OpenShiftLabel.Shell.SECURE_STORAGE_PASSWORD, OpenShiftLabel.Shell.SECURE_STORAGE));
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE);
}
new DefaultText(0).setText(password);
boolean firstStorage = true;
try {
new DefaultText(1).setText(password);
} catch (RedDeerException ex) {
firstStorage = false;
}
new WaitUntil(new ControlIsEnabled(new OkButton()));
new OkButton().click();
return firstStorage;
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class AbstractOpenShiftConnection method remove.
/**
* Removes connection from OpenShift explorer view.
*/
public void remove() {
item.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE_CONNECTION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION));
new DefaultShell(OpenShiftLabel.Shell.REMOVE_CONNECTION);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.REMOVE_CONNECTION));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-openshift by jbosstools.
the class PortForwardingTest method testPortForwardingButtonsAccessibility.
@Test
public void testPortForwardingButtonsAccessibility() {
openPortForwardingDialog();
PushButton startAllButton = new PushButton(OpenShiftLabel.Button.START_ALL);
PushButton stopAllButton = new PushButton(OpenShiftLabel.Button.STOP_ALL);
OkButton okButton = new OkButton();
assertTrue("Button Start All should be enabled at this point.", startAllButton.isEnabled());
assertFalse("Button Stop All should be disabled at this point.", stopAllButton.isEnabled());
startAllButton.click();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(okButton));
try {
new WaitWhile(new ControlIsEnabled(startAllButton), TimePeriod.getCustom(5));
} catch (WaitTimeoutExpiredException ex) {
fail("Button Start All should be disabled at this point.");
}
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitWhile(new ControlIsEnabled(okButton), false);
stopAllButton = new PushButton(OpenShiftLabel.Button.STOP_ALL);
assertTrue("Button Stop All should be enabled at this point.", stopAllButton.isEnabled());
stopAllButton.click();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.APPLICATION_PORT_FORWARDING);
new WaitUntil(new ControlIsEnabled(okButton));
try {
new WaitUntil(new ControlIsEnabled(startAllButton), TimePeriod.getCustom(5));
} catch (WaitTimeoutExpiredException ex) {
fail("Button Start All should be enabled at this point.");
}
assertFalse("Button Stop All should be disabled at this point.", stopAllButton.isEnabled());
}
Aggregations