@Test(dependsOnMethods="selectHistoryFilter") public void getUpdatedTopics() throws Exception { navigateToSiteDashboard(); myDiscussionsDashlet = siteDashBoard.getDashlet(MY_DISCUSSIONS).render(); drone.findAndWaitWithRefresh(By.xpath(String.format(" topicDetailsPage = myDiscussionsDashlet.selectTopicTitle(TOPIC_DETAILS_TITLE_THREE).click().render(); Assert.assertNotNull(topicDetailsPage); Assert.assertEquals(topicDetailsPage.getTopicTitle(), TOPIC_DETAILS_TITLE_THREE); Assert.assertEquals(topicDetailsPage.getTopicCreatedBy(), TOPIC_DETAILS_CREATED_ON); createNewTopicPage = topicDetailsPage.clickOnEditLink().render(); Assert.assertEquals(createNewTopicPage.getPageTitle(), EDIT_TOPIC_TITLE); createNewTopicPage.enterTopicTitle(TOPIC_DETAILS_TITLE_THREE + " Updated"); topicDetailsPage = createNewTopicPage.saveTopic().render(); topicDetailsPage.clickOnReplyLink().render(); topicDetailsPage.clickOnCreateReply().render(); navigateToSiteDashboard(); myDiscussionsDashlet = siteDashBoard.getDashlet(MY_DISCUSSIONS).render(); drone.findAndWaitWithRefresh(By.xpath(String.format(" topicDetailsPage = myDiscussionsDashlet.selectTopicTitle(TOPIC_DETAILS_TITLE_TWO).click().render(); Assert.assertNotNull(topicDetailsPage); Assert.assertEquals(topicDetailsPage.getTopicTitle(), TOPIC_DETAILS_TITLE_TWO); Assert.assertEquals(topicDetailsPage.getTopicCreatedBy(), TOPIC_DETAILS_CREATED_ON); createNewTopicPage = topicDetailsPage.clickOnEditLink().render(); Assert.assertEquals(createNewTopicPage.getPageTitle(), EDIT_TOPIC_TITLE); createNewTopicPage.enterTopicTitle(TOPIC_DETAILS_TITLE_TWO + " Updated"); topicDetailsPage = createNewTopicPage.saveTopic().render(); topicDetailsPage.clickOnReplyLink().render(); topicDetailsPage.clickOnCreateReply().render(); navigateToSiteDashboard(); myDiscussionsDashlet = siteDashBoard.getDashlet(MY_DISCUSSIONS).render(); drone.findAndWaitWithRefresh(By.xpath(String.format(" topicDetailsPage = myDiscussionsDashlet.selectTopicTitle(TOPIC_DETAILS_TITLE_ONE).click().render(); Assert.assertNotNull(topicDetailsPage); Assert.assertEquals(topicDetailsPage.getTopicTitle(), TOPIC_DETAILS_TITLE_ONE); Assert.assertEquals(topicDetailsPage.getTopicCreatedBy(), TOPIC_DETAILS_CREATED_ON); createNewTopicPage = topicDetailsPage.clickOnEditLink().render(); Assert.assertEquals(createNewTopicPage.getPageTitle(), EDIT_TOPIC_TITLE); createNewTopicPage.enterTopicTitle(TOPIC_DETAILS_TITLE_ONE + " Updated"); topicDetailsPage = createNewTopicPage.saveTopic().render(); topicDetailsPage.clickOnReplyLink().render(); topicDetailsPage.clickOnCreateReply().render(); navigateToSiteDashboard(); myDiscussionsDashlet = siteDashBoard.getDashlet(MY_DISCUSSIONS).render(); drone.findAndWaitWithRefresh(By.xpath(String.format(" List<ShareLink> topicsTitles = myDiscussionsDashlet.getTopics(LinkType.Topic); Assert.assertNotNull(topicsTitles); Assert.assertEquals(topicsTitles.size(), 3); Assert.assertEquals(topicsTitles.get(0).getDescription(), TOPIC_DETAILS_TITLE_ONE + " Updated"); Assert.assertEquals(topicsTitles.get(1).getDescription(), TOPIC_DETAILS_TITLE_TWO + " Updated"); Assert.assertEquals(topicsTitles.get(2).getDescription(), TOPIC_DETAILS_TITLE_THREE + " Updated"); List<TopicStatusDetails> topicStatusDetails = myDiscussionsDashlet.getUpdatedTopics(); for (TopicStatusDetails topicStatusDetail : topicStatusDetails) { Assert.assertEquals(topicStatusDetail.getCreationTime(), CREATED_BY_JUST_NOW); Assert.assertEquals(topicStatusDetail.getUpdateTime(), UPDATED_JUST_NOW); Assert.assertEquals(topicStatusDetail.getNumberOfReplies(), NUMBER_OF_REPLIES); Assert.assertEquals(topicStatusDetail.getReplyDetails(), REPLY_DETAILS); } }
public synchronized List<TopicStatusDetails> getUpdatedTopics() { populateUpdatedTopicStatusDetails(); return topicStatusDetails; }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<TopicStatusDetails> getUpdatedTopics() { populateUpdatedTopicStatusDetails(); return topicStatusDetails; } }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<TopicStatusDetails> getUpdatedTopics() { populateUpdatedTopicStatusDetails(); return topicStatusDetails; } protected  MyDiscussionsDashlet(WebDrone drone); }
MyDiscussionsDashlet extends AbstractDashlet implements Dashlet { public synchronized List<TopicStatusDetails> getUpdatedTopics() { populateUpdatedTopicStatusDetails(); return topicStatusDetails; } 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<TopicStatusDetails> getUpdatedTopics() { populateUpdatedTopicStatusDetails(); return topicStatusDetails; } 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);  }