use of org.eclipse.swtbot.swt.finder.widgets.SWTBotLink in project epp.mpc by eclipse.
the class AbstractMarketplaceWizardBotTest method selectToInstall.
protected SWTBotLink selectToInstall(int count) {
if (count == 0) {
return null;
}
bot.button("Install").click();
waitForWizardProgress(3 * PROGRESS_TIMEOUT);
assertSame(getWizard().getPage(FeatureSelectionWizardPage.class.getName()), getWizardDialog().getCurrentPage());
bot.button("< Install More").click();
waitForWizardProgress();
SWTBotLink selectedSolutionsLink = selectedSolutionsLink(1);
for (int i = 2; i <= count; i++) {
bot.button("Install").click();
selectedSolutionsLink = selectedSolutionsLink(i);
}
return selectedSolutionsLink;
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotLink in project epp.mpc by eclipse.
the class MarketplaceWizardTest method testMoreInfoLearnMore.
// TODO conditional on embedded browser availability
// FIXME
@Ignore("Tooltip doesn't stay open")
@Test
public void testMoreInfoLearnMore() {
SWTBotClickableStyledText descriptionLabel = SWTBotClickableStyledText.from(bot.styledTextWithId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, AbstractMarketplaceDiscoveryItem.WIDGET_ID_DESCRIPTION));
StyleRange linkRange = findLink(descriptionLabel, "more\u00a0info");
bot.sleep(5000);
descriptionLabel.click(linkRange);
bot.sleep(5000);
SWTBotShell tooltip = bot.shellWithId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_OVERVIEW);
SWTBotLink moreLink = tooltip.bot().linkWithId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_LEARNMORE);
moreLink.click();
checkMarketplaceBrowser();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotLink in project epp.mpc by eclipse.
the class MarketplaceWizardTest method testShowSelected.
@Test
public void testShowSelected() {
SWTBotLink link = selectToInstall(3);
checkSkipForGtk3();
link.click();
// wait for the action to be processed
bot.waitUntil(new DefaultCondition() {
public boolean test() throws Exception {
List<Widget> items = this.bot.getFinder().findControls(NodeMatcher.any());
return items.size() == 3;
}
public String getFailureMessage() {
return "Not getting expected selection";
}
}, 10000);
}
Aggregations