use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project linuxtools by eclipse.
the class DockerConnection method enableConnection.
public void enableConnection() {
select();
new DefaultToolItem("Enable Connection").click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project jbosstools-hibernate by jbosstools.
the class HQLEditor method runHQLQuery.
/**
* Executes HQL query
*/
public void runHQLQuery() {
new DefaultToolItem("Run HQL").click();
try {
Shell s = new DefaultShell("Open Session factory");
new YesButton(s).click();
new WaitWhile(new ShellIsAvailable(s));
} catch (WaitTimeoutExpiredException e) {
log.warn("Open Session factory question dialog was expected");
}
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project jbosstools-openshift by jbosstools.
the class OpenNewConnectionWizardTest method shouldOpenConnectionWizardViaToolItemTest.
@Test
public void shouldOpenConnectionWizardViaToolItemTest() {
// given
explorer.open();
// when
new DefaultToolItem(OpenShiftLabel.Others.CONNECT_TOOL_ITEM).click();
// then
verifyNewConnectionWizardIsOpened();
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project jbosstools-openshift by jbosstools.
the class OpenNewApplicationWizardWithNoProjectTest method testOpenNewApplicationWizardFromCentralWithNoProjects.
@Test
public void testOpenNewApplicationWizardFromCentralWithNoProjects() {
new DefaultToolItem(new WorkbenchShell(), OpenShiftLabel.Others.RED_HAT_CENTRAL).click();
new InternalBrowser().execute(OpenShiftLabel.Others.OPENSHIFT_CENTRAL_SCRIPT);
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.NEW_APP_WIZARD), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
for (String comboItem : new DefaultCombo(0).getItems()) {
if (comboItem.contains(connectionReq.getUsername()) && comboItem.contains(connectionReq.getHost())) {
new DefaultCombo(0).setSelection(comboItem);
break;
}
}
new NextButton().click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(new BackButton()), TimePeriod.LONG);
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("Created project was not preselected for a new OpenShift application", new LabeledCombo(OpenShiftLabel.TextLabels.PROJECT).getText().equals(projectName));
closeWizard();
}
use of org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem in project jbosstools-openshift by jbosstools.
the class GetOpenShiftIOTokenTest method testGetToken.
@Test
public void testGetToken() {
new DefaultToolItem(new WorkbenchShell(), "Connect to OpenShift.io").click();
DefaultShell browser = new DefaultShell();
InternalBrowser internalBrowser = new InternalBrowser(browser);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new BrowserContainsText("OpenShift.io Developer Preview"), TimePeriod.LONG);
internalBrowser.execute(String.format("document.getElementById(\"username\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_USERNAME));
internalBrowser.execute(String.format("document.getElementById(\"password\").value=\"%s\"", DatastoreOS3.OPENSHIFT_IO_PASSWORD));
internalBrowser.execute("document.getElementById(\"password\").parentElement.parentElement.parentElement.submit()");
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
try {
new DefaultShell("OpenShift.io");
} catch (CoreLayerException ex) {
// Secure storage has been triggered
SecureStorage.handleSecureStoragePasswordAndHint(SystemProperties.SECURE_STORAGE_PASSWORD);
new DefaultShell("OpenShift.io");
}
new OkButton().click();
checkAccountInProperties();
checkPluginInSecureStorage();
}
Aggregations