Class TaskManagerGanttMacro

java.lang.Object
org.xwiki.test.ui.po.BaseElement
org.xwiki.test.ui.po.BasePage
org.xwiki.test.ui.po.ViewPage
org.xwiki.contrib.application.task.test.po.TaskManagerGanttMacro

public class TaskManagerGanttMacro extends org.xwiki.test.ui.po.ViewPage
Can perform common test actions on a div generated by a taskgantt macro.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final List<String>
     

    Fields inherited from class org.xwiki.test.ui.po.BasePage

    logo
  • Constructor Summary

    Constructors
    Constructor
    Description
    TaskManagerGanttMacro(org.openqa.selenium.WebElement ganttElement)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Changes the time scale of the gantt diagram ('Month', 'Day', 'Quarter Day', etc.).
    boolean
    dragProgress(String id, int offset)
    Drag the task progress by the specified amount of pixels.
    void
    dragTask(String id, int offset)
    Drag the task by the specified amount of pixels.
    void
    dragTaskEnd(String id, int offset)
    Drag the task end date by the specified amount of pixels.
    void
    dragTaskStart(String id, int offset)
    Drag the task start date by the specified amount of pixels.
     
    org.openqa.selenium.WebElement
    Get the gantt bar element of the given task.
    Get all task ids of tasks present in the gantt diagram.
    boolean
    Whether the overlay preventing any interaction with the diagram is active.
    void
    Double click a task, which opens the task page in a new tab.

    Methods inherited from class org.xwiki.test.ui.po.ViewPage

    clickBreadcrumbLink, clickWantedLink, clickWantedLink, contentContainsElement, editSection, exists, getBreadcrumb, getBreadcrumbContent, getContent, getLastModifiedText, getPageBackgroundColor, getTitleColor, getTitleFontFamily, getTranslateButton, hasBreadcrumbContent, hasBreadcrumbContent, hasTranslateButton, isInlinePage, openCommentsDocExtraPane, openHistoryDocExtraPane, openInformationDocExtraPane, scrollToTop, useShortcutForDocExtraPane, useShortcutKeyForCommentPane, useShortcutKeyForHistoryPane, useShortcutKeyForInformationPane, waitForDocExtraPaneActive, waitUntilContent

    Methods inherited from class org.xwiki.test.ui.po.BasePage

    canDelete, clickAdminActionsSubMenuEntry, clickEditSubMenuEntry, clickLocale, clickMoreActionsSubMenuEntry, copy, createInlinePage, createPage, delete, deletePage, edit, editClass, editInline, editObjects, editRights, editWiki, editWYSIWYG, getCurrentUser, getDocumentTitle, getDrawerMenu, getEditURL, getErrorContent, getHTMLMetaDataValue, getLocales, getMetaDataValue, getPageTitle, getPageURL, getXWikiMessageContent, hasLeftPanel, hasLoginLink, hasNotificationsMenu, hasRenderingError, isAuthenticated, isForbidden, isNewDocument, isNotificationsMenuOpen, login, logout, register, reloadPage, rename, sendKeys, toggleActionMenu, toggleNotificationsMenu, useShortcutKeyForClassEditing, useShortcutKeyForEditing, useShortcutKeyForInlineEditing, useShortcutKeyForObjectEditing, useShortcutKeyForPageDeletion, useShortcutKeyForPageRenaming, useShortcutKeyForRightsEditing, useShortcutKeyForSourceViewer, useShortcutKeyForWikiEditing, useShortcutKeyForWysiwygEditing, validateWCAG, validateWCAG, validateWCAG, viewChildren, watchDocument, watchSpace, watchWiki

    Methods inherited from class org.xwiki.test.ui.po.BaseElement

    getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • viewModes

      public static final List<String> viewModes
  • Constructor Details

    • TaskManagerGanttMacro

      public TaskManagerGanttMacro(org.openqa.selenium.WebElement ganttElement)
  • Method Details

    • getGanttMacrosOnCurrentPage

      public static List<TaskManagerGanttMacro> getGanttMacrosOnCurrentPage()
    • changeViewMode

      public void changeViewMode(String viewMode)
      Changes the time scale of the gantt diagram ('Month', 'Day', 'Quarter Day', etc.).
      Parameters:
      viewMode - the value of the desired view mode.
    • isOverlayActive

      public boolean isOverlayActive()
      Whether the overlay preventing any interaction with the diagram is active.
      Returns:
      true if the overlay is active.
    • getTaskBar

      public org.openqa.selenium.WebElement getTaskBar(String id) throws org.openqa.selenium.NoSuchElementException
      Get the gantt bar element of the given task.
      Parameters:
      id - the id of the bar task element, given as a full page reference ("xwiki:Space.TaskPage")
      Returns:
      the gantt bar element if it exists.
      Throws:
      org.openqa.selenium.NoSuchElementException
    • getTaskIds

      public List<String> getTaskIds()
      Get all task ids of tasks present in the gantt diagram.
      Returns:
      a list of ids of all tasks in the gantt diagram. The task ids are page references in the 'xwiki:Space.Page' format.
    • openTaskPage

      public void openTaskPage(String id)
      Double click a task, which opens the task page in a new tab.
      Parameters:
      id - the id of the bar task element, given as a full page reference ("xwiki:Space.TaskPage")
    • dragTaskStart

      public void dragTaskStart(String id, int offset)
      Drag the task start date by the specified amount of pixels.
      Parameters:
      id - the task id to drag
      offset - amount of pixels to move. Negative values move to the left, positive to the right. Note that the date will not be changed if the amount to move is less than the snapping interval defined in the gantt's js (also depends on the current view mode).
    • dragTaskEnd

      public void dragTaskEnd(String id, int offset)
      Drag the task end date by the specified amount of pixels.
      Parameters:
      id - the task id to drag
      offset - amount of pixels to move. Negative values move to the left, positive to the right. Note that the date will not be changed if the amount to move is less than the snapping interval defined in the gantt's js (also depends on the current view mode).
    • dragProgress

      public boolean dragProgress(String id, int offset)
      Drag the task progress by the specified amount of pixels.
      Parameters:
      id - the task id to drag
      offset - amount of pixels to move. Negative values move to the left, positive to the right.
      Returns:
      false if the bar doesn't have a progress handle (either 0 or 100 progress), true if the progress was changed.
    • dragTask

      public void dragTask(String id, int offset)
      Drag the task by the specified amount of pixels.
      Parameters:
      id - the task id to drag
      offset - amount of pixels to move. Negative values move to the left, positive to the right. Note that the date will not be changed if the amount to move is less than the snapping interval defined in the gantt's js (also depends on the current view mode).