@Test
 public void testCustomFieldIsDisplayedAndJavaScriptExecutesWhenChecked() {
   jira.gotoLoginPage().loginAsSysAdmin(DashboardPage.class);
   final CreateIssueDialog createIssueDialog = pageBinder.bind(JiraHeader.class).createIssue();
   createIssueDialog.switchToCustomMode().addFields("customfield_10000");
   assertTrue(finder.find(By.id("customfield_10000")).hasClass("custom-field-js-applied"));
 }
 @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");
 }
 @Test
 public void testManagePlugins() {
   visualComparer.setWaitforJQueryTimeout(1000);
   visualComparer.setRefreshAfterResize(false);
   goTo("/plugins/servlet/upm/manage/action-required");
   Poller.waitUntilFalse(
       finder
           .find(By.className(".loading.filter-box"))
           .withTimeout(TimeoutType.SLOW_PAGE_LOAD)
           .timed()
           .isPresent());
   assertUIMatches("upm-manage");
 }
Пример #4
0
  public List<String> getProjects() {
    openDialog();

    String href = getTriggerElement().getAttribute("href");
    int triggerTargetStart = href.indexOf("#");

    String dialogId = "inline-dialog-" + href.substring(triggerTargetStart + 1);

    PageElement dialog = elementFinder.find(By.id(dialogId));
    assertTrue("The dialog did not appear to open.", dialog.isPresent());

    List<PageElement> elements = dialog.findAll(By.tagName("li"));
    List<String> projects = new ArrayList<String>(elements.size());
    for (PageElement element : elements) {
      projects.add(element.getText());
    }

    closeDialog();

    return projects;
  }
Пример #5
0
 /**
  * Returns the TimedCondition to wait (until true) for, to ensure the page is fully loaded.
  *
  * @param pageElementFinder page element finder
  * @return TimedCondition
  */
 public static TimedCondition getWaitCondition(PageElementFinder pageElementFinder) {
   return pageElementFinder.find(By.name("os_username")).timed().isVisible();
 }
 @Init
 public void getElements() {
   rootMenuElement = elementFinder.find(By.id(menuId));
 }
 TimedCondition isAt() {
   return locator.find(formLocator).timed().isPresent();
 }