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
FieldsFields inherited from class org.xwiki.test.ui.po.BasePage
logo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeViewMode(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.voidDrag 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>org.openqa.selenium.WebElementgetTaskBar(String id) Get the gantt bar element of the given task.Get all task ids of tasks present in the gantt diagram.booleanWhether 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, getLastModifiedText, getPageBackgroundColor, getTitleColor, getTitleFontFamily, getTranslateButton, hasBreadcrumbContent, hasBreadcrumbContent, hasTranslateButton, isInlinePage, openCommentsDocExtraPane, openHistoryDocExtraPane, openInformationDocExtraPane, scrollToTop, useShortcutForDocExtraPane, useShortcutKeyForCommentPane, useShortcutKeyForHistoryPane, useShortcutKeyForInformationPane, waitForDocExtraPaneActive, waitUntilContentMethods 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, watchWikiMethods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
Field Details
-
viewModes
-
-
Constructor Details
-
TaskManagerGanttMacro
public TaskManagerGanttMacro(org.openqa.selenium.WebElement ganttElement)
-
-
Method Details
-
getGanttMacrosOnCurrentPage
-
changeViewMode
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
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
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
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
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
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
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).
-