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.ViewPageCan perform common test actions on a div generated by a taskgantt macro.
-
-
Constructor Summary
Constructors Constructor Description TaskManagerGanttMacro(org.openqa.selenium.WebElement ganttElement)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeViewMode(String viewMode)Changes the time scale of the gantt diagram ('Month', 'Day', 'Quarter Day', etc.).booleandragProgress(String id, int offset)Drag the task progress by the specified amount of pixels.voiddragTask(String id, int offset)Drag the task by the specified amount of pixels.voiddragTaskEnd(String id, int offset)Drag the task end date by the specified amount of pixels.voiddragTaskStart(String id, int offset)Drag the task start date by the specified amount of pixels.static List<TaskManagerGanttMacro>getGanttMacrosOnCurrentPage()org.openqa.selenium.WebElementgetTaskBar(String id)Get the gantt bar element of the given task.List<String>getTaskIds()Get all task ids of tasks present in the gantt diagram.booleanisOverlayActive()Whether the overlay preventing any interaction with the diagram is active.voidopenTaskPage(String id)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, 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, getEditURL, getErrorContent, getHTMLMetaDataValue, getLocales, getMetaDataValue, getPageTitle, getPageURL, hasLeftPanel, hasLoginLink, hasNotificationsMenu, hasRenderingError, hideDrawer, isAuthenticated, isDrawerVisible, isForbidden, isNewDocument, isNotificationsMenuOpen, login, logout, register, reloadPage, rename, sendKeys, showDrawer, toggleActionMenu, toggleDrawer, toggleNotificationsMenu, useShortcutKeyForClassEditing, useShortcutKeyForEditing, useShortcutKeyForInlineEditing, useShortcutKeyForObjectEditing, useShortcutKeyForPageDeletion, useShortcutKeyForPageRenaming, useShortcutKeyForRightsEditing, useShortcutKeyForSourceViewer, useShortcutKeyForWikiEditing, useShortcutKeyForWysiwygEditing, viewChildren, watchDocument, watchSpace, watchWiki
-
-
-
-
Method Detail
-
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:
trueif 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 dragoffset- 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 dragoffset- 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 dragoffset- 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 dragoffset- 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).
-
-