Esempio n. 1
0
 @Step
 public void fillPollSpecificFields(Poll poll) {
   if (poll != null) {
     info("Filling poll title: " + poll.getTitle());
     getTopicsPollTitleField().clear();
     getTopicsPollTitleField().sendKeys(poll.getTitle());
     fillPollOptions(poll.getOptions());
     fillPollEndDate(poll.getEndDateAsString());
     setCheckboxState(getTopicsPollMultipleChecker(), poll.isMultipleAnswers());
   }
 }
Esempio n. 2
0
 private void markTopicAsAnnouncement(boolean isAnnouncement) throws PermissionsDeniedException {
   if (isAnnouncement) {
     info("Marking topic as announcement");
   } else {
     info("Leaving topic as not an announcement");
   }
   if (DriverMethodHelp.isElementDisplayedImmediately(driver, topicAnnouncement)) {
     setCheckboxState(topicAnnouncement, isAnnouncement);
   } else {
     info(
         "Announcement checkbox is not on the page since user doesn't have permissions, so nothing to change");
   }
 }
Esempio n. 3
0
 private void markTopicAsSticked(boolean isTopicSticked) throws PermissionsDeniedException {
   if (isTopicSticked) {
     info("Marking topic as sticked");
   } else {
     info("Marking topic as non-sticked");
   }
   if (DriverMethodHelp.isElementDisplayedImmediately(driver, getTopicStickedCheckbox())) {
     setCheckboxState(getTopicStickedCheckbox(), isTopicSticked);
   } else {
     info(
         "Sticked checkbox is not on the page since user doesn't have permissions, so nothing to change");
   }
 }