@Test(dependsOnMethods = "isNoTopicsDisplayed") public void createTopic() { assertTrue(discussionsPage.isNewTopicEnabled()); topicViewPage = discussionsPage.createTopic(text).render(); assertNotNull(topicViewPage.render()); assertEquals(verifyCreatedTopic(), text); }
public TopicViewPage createTopic(String titleField, String textLines) { try { DiscussionsPage discussionsPage = new DiscussionsPage(drone); NewTopicForm newTopicForm = discussionsPage.clickNewTopic(); newTopicForm.setTitleField(titleField); try { checkNotNull(textLines); } catch (NullPointerException e) { throw new ShareException("The lines are null!"); } newTopicForm.insertText(textLines); newTopicForm.clickSave(); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } catch (NoSuchElementException nse) { logger.debug("Unable to find the elements"); } return new TopicViewPage(drone).render(); }
DiscussionsPage extends TopicsListPage { public TopicViewPage createTopic(String titleField, String textLines) { try { DiscussionsPage discussionsPage = new DiscussionsPage(drone); NewTopicForm newTopicForm = discussionsPage.clickNewTopic(); newTopicForm.setTitleField(titleField); try { checkNotNull(textLines); } catch (NullPointerException e) { throw new ShareException("The lines are null!"); } newTopicForm.insertText(textLines); newTopicForm.clickSave(); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } catch (NoSuchElementException nse) { logger.debug("Unable to find the elements"); } return new TopicViewPage(drone).render(); } }
DiscussionsPage extends TopicsListPage { public TopicViewPage createTopic(String titleField, String textLines) { try { DiscussionsPage discussionsPage = new DiscussionsPage(drone); NewTopicForm newTopicForm = discussionsPage.clickNewTopic(); newTopicForm.setTitleField(titleField); try { checkNotNull(textLines); } catch (NullPointerException e) { throw new ShareException("The lines are null!"); } newTopicForm.insertText(textLines); newTopicForm.clickSave(); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } catch (NoSuchElementException nse) { logger.debug("Unable to find the elements"); } return new TopicViewPage(drone).render(); } DiscussionsPage(WebDrone drone); }
DiscussionsPage extends TopicsListPage { public TopicViewPage createTopic(String titleField, String textLines) { try { DiscussionsPage discussionsPage = new DiscussionsPage(drone); NewTopicForm newTopicForm = discussionsPage.clickNewTopic(); newTopicForm.setTitleField(titleField); try { checkNotNull(textLines); } catch (NullPointerException e) { throw new ShareException("The lines are null!"); } newTopicForm.insertText(textLines); newTopicForm.clickSave(); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } catch (NoSuchElementException nse) { logger.debug("Unable to find the elements"); } return new TopicViewPage(drone).render(); } DiscussionsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override DiscussionsPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override DiscussionsPage render(); @SuppressWarnings("unchecked") @Override DiscussionsPage render(long time); TopicViewPage createTopic(String titleField, String textLines); TopicViewPage createTopic(String titleField); TopicViewPage createTopic(String titleField, String textLines, String tag); TopicDirectoryInfo getTopicDirectoryInfo(final String title); boolean isNewTopicEnabled(); TopicViewPage viewTopic(String title); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines, String tagName); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines, String tagName,  boolean removeTag); DiscussionsPage deleteTopicWithConfirm(String title); int getTopicsCount(); boolean isEditTopicDisplayed(String title); boolean isDeleteTopicDisplayed(String title); TopicsListFilter getTopicsListFilter(); List<String> getTopicTitles(); boolean isTopicPresented(String title); boolean checkTags(String title, String tag); boolean isNoTopicsDisplayed(); }
DiscussionsPage extends TopicsListPage { public TopicViewPage createTopic(String titleField, String textLines) { try { DiscussionsPage discussionsPage = new DiscussionsPage(drone); NewTopicForm newTopicForm = discussionsPage.clickNewTopic(); newTopicForm.setTitleField(titleField); try { checkNotNull(textLines); } catch (NullPointerException e) { throw new ShareException("The lines are null!"); } newTopicForm.insertText(textLines); newTopicForm.clickSave(); } catch (TimeoutException te) { logger.debug("The operation has timed out"); } catch (NoSuchElementException nse) { logger.debug("Unable to find the elements"); } return new TopicViewPage(drone).render(); } DiscussionsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override DiscussionsPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override DiscussionsPage render(); @SuppressWarnings("unchecked") @Override DiscussionsPage render(long time); TopicViewPage createTopic(String titleField, String textLines); TopicViewPage createTopic(String titleField); TopicViewPage createTopic(String titleField, String textLines, String tag); TopicDirectoryInfo getTopicDirectoryInfo(final String title); boolean isNewTopicEnabled(); TopicViewPage viewTopic(String title); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines, String tagName); TopicViewPage editTopic(String oldTitle, String newTitle, String txtLines, String tagName,  boolean removeTag); DiscussionsPage deleteTopicWithConfirm(String title); int getTopicsCount(); boolean isEditTopicDisplayed(String title); boolean isDeleteTopicDisplayed(String title); TopicsListFilter getTopicsListFilter(); List<String> getTopicTitles(); boolean isTopicPresented(String title); boolean checkTags(String title, String tag); boolean isNoTopicsDisplayed();  }