use of org.eclipse.epp.mpc.tests.ui.wizard.widgets.SWTBotClickableStyledText in project epp.mpc by eclipse.
the class MarketplaceWizardTest method testNoninstallableLearnMore.
@Test
public void testNoninstallableLearnMore() {
SWTBot assumeLearnMoreBot = assume(bot);
SWTBotClickableStyledText learnMoreLabel = SWTBotClickableStyledText.from(assumeLearnMoreBot.styledTextWithId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_LEARNMORE));
StyleRange linkRange = findLink(learnMoreLabel);
learnMoreLabel.click(linkRange);
checkMarketplaceBrowser();
}
use of org.eclipse.epp.mpc.tests.ui.wizard.widgets.SWTBotClickableStyledText in project epp.mpc by eclipse.
the class MarketplaceWizardTest method testSearchTag.
@Test
public void testSearchTag() {
Matcher<StyledText> widgetOfType = widgetOfType(StyledText.class);
Matcher<StyledText> withId = withId(AbstractMarketplaceDiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_TAGS);
Matcher<StyledText> emptyText = withText("");
@SuppressWarnings("unchecked") Matcher<StyledText> nonEmptyTagMatcher = allOf(widgetOfType, withId, not(emptyText));
SWTBotClickableStyledText tagsLabel = SWTBotClickableStyledText.from(new SWTBotStyledText(bot.widget(nonEmptyTagMatcher, 0), nonEmptyTagMatcher));
StyleRange linkRange = findLink(tagsLabel);
String tag = getText(linkRange, tagsLabel);
tagsLabel.click(linkRange);
waitForWizardProgress();
String searchTerm = searchField().getText();
assertEquals(MarketplaceViewer.QUERY_TAG_KEYWORD + tag, searchTerm);
}
use of org.eclipse.epp.mpc.tests.ui.wizard.widgets.SWTBotClickableStyledText 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();
}
Aggregations