use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project epp.mpc by eclipse.
the class MarketplaceWizardTest method testFavorite.
@Test
public void testFavorite() {
SWTBotButton favorite = bot.buttonWithId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_RATING);
bot.sleep(5000);
favorite.click();
SWTBotShell login = bot.shell("Authorizing with Eclipse.org");
login.bot().button("Cancel").click();
// TODO test something useful - we'd need a proper login on the server to do this...
// better to get started with some server mocking in the ui tests...
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project dsl-devkit by dsldevkit.
the class CheckProjectWizardTest method testNextButtonChangesPage.
/**
* Tests that applying the next button changes the wizard page.
*/
@Test
@BugTest("AIG-479")
public void testNextButtonChangesPage() {
wizard.writeToTextField(Messages.PROJECT_NAME_LABEL, "a.b");
SWTBotShell projectPage = wizard.shell(Messages.PROJECT_WIZARD_WINDOW_TITLE);
wizard.changeToNextPage();
SWTBotShell catalogPage = wizard.shell(Messages.PROJECT_WIZARD_WINDOW_TITLE);
assertNotSame("Next button changed page", projectPage, catalogPage);
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project dsl-devkit by dsldevkit.
the class CoreSwtbotTools method openAvaloqPreferencesSection.
/**
* Open a specific Avaloq Prefrences Page.
*
* @param bot
* to work with, must not be {@code null}
* @param section
* the name of the desired page (e.g. 'Database'), must not be {@code null}
*/
public static void openAvaloqPreferencesSection(final SWTWorkbenchBot bot, final String section) {
Assert.isNotNull(bot, ARGUMENT_BOT);
Assert.isNotNull(section, "section");
bot.menu("Window").menu("Preferences").click();
final SWTBotShell shell = bot.shell("Preferences");
shell.activate();
final SWTBotTreeItem item = bot.tree().getTreeItem("Avaloq");
CoreSwtbotTools.waitForItem(bot, item);
CoreSwtbotTools.expandNode(bot.tree(), "Avaloq").select(section);
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project syncope by apache.
the class SyncopeViewTest method canAddReportTemplate.
private boolean canAddReportTemplate() {
SWTBotTreeItem rTemplateHead = syncopeView.bot().tree().getTreeItem("Report Templates");
rTemplateHead.setFocus();
rTemplateHead.select().contextMenu("Add Template").click();
BOT.sleep(1000);
// Filling Dialog details
SWTBotShell addTemplateShell = BOT.activeShell();
addTemplateShell.activate();
BOT.textWithLabel("Key").setText("newReportTemplate");
BOT.button("Add").click();
// wait for template keys reload
BOT.waitWhile(new ICondition() {
@Override
public boolean test() throws Exception {
String title = BOT.activeShell().getText();
return title.equals("Loading Templates");
}
@Override
public void init(final SWTBot bot) {
}
@Override
public String getFailureMessage() {
return "Unable to Login";
}
});
// recheck available templates
syncopeView = BOT.viewByTitle("Apache Syncope Templates");
rTemplateItem = syncopeView.bot().tree().expandNode("Report Templates");
rtemplateList = rTemplateItem.getItems();
return (rtemplateList.length == 3 && rtemplateList[1].getText().equals("newReportTemplate"));
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project syncope by apache.
the class SyncopeViewTest method canLoginAdmin.
@Test
public void canLoginAdmin() throws Exception {
SWTBotShell loginShell = BOT.activeShell();
loginShell.activate();
BOT.textWithLabel("Deployment Url").setText(ADDRESS);
BOT.textWithLabel("Username").setText(ADMIN_UNAME);
BOT.textWithLabel("Password").setText(ADMIN_PWD);
BOT.button("Login").click();
BOT.waitWhile(new ICondition() {
@Override
public boolean test() throws Exception {
String title = BOT.activeShell().getText();
return title.equals("Loading Templates");
}
@Override
public void init(final SWTBot bot) {
}
@Override
public String getFailureMessage() {
return "Unable to Login";
}
});
}
Aggregations