@Test(dependsOnMethods="createNewTopics") public void getTopics() throws Exception { navigateToSiteDashboard(); myDiscussionsDashlet = siteDashBoard.getDashlet(MY_DISCUSSIONS).render(); drone.findAndWaitWithRefresh(By.xpath(String.format(" List<ShareLink> topicsUsers = myDiscussionsDashlet.getTopics(LinkType.User); Assert.assertNotNull(topicsUsers); Assert.assertEquals(topicsUsers.size(), 3); for (ShareLink topicUser : topicsUsers) { Assert.assertEquals(topicUser.getDescription(), TOPIC_DETAILS_AUTHOR); } List<ShareLink> topicsTitles = myDiscussionsDashlet.getTopics(LinkType.Topic); Assert.assertNotNull(topicsTitles); Assert.assertEquals(topicsTitles.size(), 3); Assert.assertEquals(topicsTitles.get(0).getDescription(), TOPIC_DETAILS_TITLE_THREE); Assert.assertEquals(topicsTitles.get(1).getDescription(), TOPIC_DETAILS_TITLE_TWO); Assert.assertEquals(topicsTitles.get(2).getDescription(), TOPIC_DETAILS_TITLE_ONE); }
public synchronized List<ShareLink> getTopics(LinkType linkType) { if (linkType == null) { throw new UnsupportedOperationException("LinkType is required"); } scrollDownToDashlet(); getFocus(); populateData(); switch (linkType) { case Topic: return topicTitlesLinks; case User: return userLinks; default: throw new IllegalArgumentException("Invalid link type specified"); } }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<ShareLink> getTopics(LinkType linkType) { if (linkType == null) { throw new UnsupportedOperationException("LinkType is required"); } scrollDownToDashlet(); getFocus(); populateData(); switch (linkType) { case Topic: return topicTitlesLinks; case User: return userLinks; default: throw new IllegalArgumentException("Invalid link type specified"); } } }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<ShareLink> getTopics(LinkType linkType) { if (linkType == null) { throw new UnsupportedOperationException("LinkType is required"); } scrollDownToDashlet(); getFocus(); populateData(); switch (linkType) { case Topic: return topicTitlesLinks; case User: return userLinks; default: throw new IllegalArgumentException("Invalid link type specified"); } } protected  MyDiscussionsDashlet(WebDrone drone); }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<ShareLink> getTopics(LinkType linkType) { if (linkType == null) { throw new UnsupportedOperationException("LinkType is required"); } scrollDownToDashlet(); getFocus(); populateData(); switch (linkType) { case Topic: return topicTitlesLinks; case User: return userLinks; default: throw new IllegalArgumentException("Invalid link type specified"); } } protected  MyDiscussionsDashlet(WebDrone drone); @SuppressWarnings("unchecked") MyDiscussionsDashlet render(); @SuppressWarnings("unchecked") @Override MyDiscussionsDashlet render(final long time); @SuppressWarnings("unchecked") MyDiscussionsDashlet render(RenderTime timer); String getEmptyDashletMessage(); boolean isHelpButtonDisplayed(); boolean isNewTopicLinkDisplayed(); void clickHelpButton(); CreateNewTopicPage clickNewTopicButton(); boolean isBalloonDisplayed(); String getHelpBalloonMessage(); MyDiscussionsDashlet closeHelpBallon(); void clickTopicsButtton(); void clickHistoryButtton(); List<MyDiscussionsTopicsFilter> getTopicFilters(); List<MyDiscussionsHistoryFilter> getHistoryFilters(); HtmlPage selectTopicsFilter(MyDiscussionsTopicsFilter filter); MyDiscussionsTopicsFilter getCurrentTopicFilter(); MyDiscussionsHistoryFilter getCurrentHistoryFilter(); HtmlPage selectTopicsHistoryFilter(MyDiscussionsHistoryFilter lastDayTopics); ShareLink selectLink(final String name); ShareLink selectTopicTitle(final String name); ShareLink selectTopicUser(final String name); synchronized List<ShareLink> getTopics(LinkType linkType); synchronized List<TopicStatusDetails> getUpdatedTopics(); boolean isTopicTitleDisplayed(String topicTitle); void resizeDashlet(int x, int y); }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<ShareLink> getTopics(LinkType linkType) { if (linkType == null) { throw new UnsupportedOperationException("LinkType is required"); } scrollDownToDashlet(); getFocus(); populateData(); switch (linkType) { case Topic: return topicTitlesLinks; case User: return userLinks; default: throw new IllegalArgumentException("Invalid link type specified"); } } protected  MyDiscussionsDashlet(WebDrone drone); @SuppressWarnings("unchecked") MyDiscussionsDashlet render(); @SuppressWarnings("unchecked") @Override MyDiscussionsDashlet render(final long time); @SuppressWarnings("unchecked") MyDiscussionsDashlet render(RenderTime timer); String getEmptyDashletMessage(); boolean isHelpButtonDisplayed(); boolean isNewTopicLinkDisplayed(); void clickHelpButton(); CreateNewTopicPage clickNewTopicButton(); boolean isBalloonDisplayed(); String getHelpBalloonMessage(); MyDiscussionsDashlet closeHelpBallon(); void clickTopicsButtton(); void clickHistoryButtton(); List<MyDiscussionsTopicsFilter> getTopicFilters(); List<MyDiscussionsHistoryFilter> getHistoryFilters(); HtmlPage selectTopicsFilter(MyDiscussionsTopicsFilter filter); MyDiscussionsTopicsFilter getCurrentTopicFilter(); MyDiscussionsHistoryFilter getCurrentHistoryFilter(); HtmlPage selectTopicsHistoryFilter(MyDiscussionsHistoryFilter lastDayTopics); ShareLink selectLink(final String name); ShareLink selectTopicTitle(final String name); ShareLink selectTopicUser(final String name); synchronized List<ShareLink> getTopics(LinkType linkType); synchronized List<TopicStatusDetails> getUpdatedTopics(); boolean isTopicTitleDisplayed(String topicTitle); void resizeDashlet(int x, int y);  }