public Workflow(List<PageElement> columns, WorkflowStatus status) {
      if (columns == null || columns.size() < 5) {
        throw new IllegalArgumentException("Not valid workflow row");
      }
      final PageElement nameElement = columns.get(0);
      name = nameElement.find(By.tagName("strong")).getText();
      description = nameElement.find(By.className("secondary-text")).getText();
      boolean isDraft = nameElement.find(By.tagName("img")).isPresent();
      numberOfSteps = Integer.parseInt(columns.get(3).getText());
      this.status = isDraft ? WorkflowStatus.DRAFT : status;

      final PageElement operationsElements = columns.get(4);
      copyElement = operationsElements.find(By.id(String.format("copy_%s", name)));
    }
 @Init
 public void init() {
   formElement = locator.find(formLocator);
   nameElement = formElement.find(By.name("name"));
   descriptionElement = formElement.find(By.name("description"));
   addButton = formElement.find(By.name("Add"));
   issueTypeRadio = formElement.find(By.cssSelector("input.radio[value='']"));
   subtaskRadio = formElement.find(By.cssSelector("input.radio[value='jira_subtask']"));
   cancelLink = formElement.find(By.cssSelector("a.cancel"));
   iconPicker = pageBinder.bind(IconPicker.class, "issue-type-icon-picker");
 }
 private void toggleModule(PageElement element) {
   element.find(By.tagName("h3")).click();
 }
 /**
  * Clicks the specified operation in the drop down.
  *
  * @param operation the link text to click
  */
 public void click(final String operation) {
   rootMenuElement.find(By.linkText(operation)).click();
 }
 public DeleteOperation clickDelete() {
   rootMenuElement.find(By.className("project-config-operations-delete")).click();
   return binder.bind(DeleteOperation.class, id);
 }
 /**
  * Checks if the drop down has the specified operation
  *
  * @param operation the link text used to check for operation existence, e.g. "Edit Details"
  * @return true, if a link with the specified link text exists
  */
 public boolean hasOperation(final String operation) {
   PageElement menuItem = rootMenuElement.find(By.linkText(operation));
   return menuItem.isPresent() && menuItem.isVisible();
 }
 @Override
 public TimedCondition isAt() {
   return Conditions.and(
       advancedPropertiesTable.timed().isPresent(),
       advancedPropertiesTable.find(By.cssSelector(".aui-restfultable-row")).timed().isPresent());
 }
Beispiel #8
0
 private PageElement getTriggerElement() {
   return container.find(By.cssSelector(".shared-item-trigger"));
 }