use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class TemplatesCreator method executeImport.
private void executeImport(boolean importProject) {
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
if (!importProject) {
new CancelButton().click();
} else {
new FinishButton().click();
try {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.CHEATSHEET);
new CheckBox(0).click();
new NoButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CHEATSHEET));
} catch (WaitTimeoutExpiredException ex) {
// do nothing if cheat sheet is not provided
}
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class BuilderImageApplicationWizardHandlingTest method closeNewApplicationWizard.
@After
public void closeNewApplicationWizard() {
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class CreateResourcesTest method assertResourceShellIsAvailable.
private void assertResourceShellIsAvailable() {
try {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_RESOURCE));
} catch (WaitTimeoutExpiredException ex) {
fail("New OpenShift resource shell has not been opened");
}
new DefaultShell(OpenShiftLabel.Shell.NEW_RESOURCE);
new WaitUntil(new ControlIsEnabled(new CancelButton()), TimePeriod.LONG);
new CancelButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_RESOURCE));
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method secureStorageDisabledJBIDE19604Test.
@Test
public void secureStorageDisabledJBIDE19604Test() {
deleteSecureStorage();
invokeNewAppWizardFromCentral();
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(true);
new NextButton().click();
// Cancel secure storage shell
try {
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE_PASSWORD);
} catch (CoreLayerException ex) {
new DefaultShell(OpenShiftLabel.Shell.SECURE_STORAGE);
}
new CancelButton().click();
// Cancel warning shell
new DefaultShell("Warning");
new OkButton().click();
new CheckBox(OpenShiftLabel.TextLabels.STORE_PASSWORD).toggle(false);
// Next button should work
new NextButton().click();
AbstractWaitCondition backButtonIsEnabled = new AbstractWaitCondition() {
@Override
public boolean test() {
return new BackButton().isEnabled();
}
};
new WaitUntil(backButtonIsEnabled);
new CancelButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.CancelButton in project jbosstools-openshift by jbosstools.
the class CreateNewConnectionTest method invalidRegistryURLShouldReportErrorMessage.
@Test
@RunIf(conditionClass = ConnectionCredentialsExists.class)
public void invalidRegistryURLShouldReportErrorMessage() {
openConnectionWizardAndSetDefaultServer();
new LabeledCombo(OpenShiftLabel.TextLabels.PROTOCOL).setSelection(AuthenticationMethod.BASIC.toString());
new LabeledText(OpenShiftLabel.TextLabels.USERNAME).setText(DatastoreOS3.USERNAME);
new LabeledText(OpenShiftLabel.TextLabels.PASSWORD).setText(DatastoreOS3.PASSWORD);
new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
new LabeledText(OpenShiftLabel.TextLabels.IMAGE_REGISTRY_URL).setText("invalidURL");
new WaitUntil(new ControlIsEnabled(new CancelButton()), TimePeriod.DEFAULT);
new WaitUntil(new ControlIsEnabled(new DefaultText(" Please provide a valid image registry (HTTP/S) URL.")), TimePeriod.DEFAULT);
new CancelButton().click();
}
Aggregations