Package org.xwiki.test.ui.po
Class CommentsTab
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.CommentsTab
-
public class CommentsTab extends BaseElement
Page Object for Comments Tab (or pane).- Since:
- 3.2M3
- Version:
- $Id: 4b8fec81d6c4b4077a13eb714565574caadc35ac $
-
-
Constructor Summary
Constructors Constructor Description CommentsTab()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelCommentForm()Cancel the currently open comment form (new comment, edit or reply) by clicking on the cancel button.voidclickOnAnnotationQuote(int id)Click on the annotation of a given id.voidclickOnReplyToCommentByID(int id)Click on the reply button of a comment.voiddeleteCommentByID(int id)Deletes a comment.CommentFormeditCommentByID(int id)Clicks on the edit icon near the specified comment.voideditCommentByID(int id, String content)Edits a comment with the specified content.CommentFormgetAddCommentForm()StringgetCommentAuthorByID(int id)StringgetCommentContentByID(int id)intgetCommentID(String content)StringgetCurrentAuthor()booleanhasDeleteButtonForCommentByID(int id)booleanhasEditButtonForCommentByID(int id)booleanisCommentFormShown()booleanisOpened()voidopenCommentForm()Opens the comment form by clicking on the comment button.intpostComment(String content, boolean wait)intpostCommentAsGuest(String content, String author, boolean wait)CommentFormreplyToCommentByID(int id)Clicks on the reply icon near the specified comment.voidreplyToCommentByID(int id, String replyContent)Replies to a comment with the specified content.voidsetAnonymousCommentAuthor(String author)-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
isOpened
public boolean isOpened()
-
getCurrentAuthor
public String getCurrentAuthor()
-
isCommentFormShown
public boolean isCommentFormShown()
-
openCommentForm
public void openCommentForm()
Opens the comment form by clicking on the comment button. If the comment button has already been clicked, does nothing.
-
setAnonymousCommentAuthor
public void setAnonymousCommentAuthor(String author)
-
getCommentID
public int getCommentID(String content)
-
getAddCommentForm
public CommentForm getAddCommentForm()
- Returns:
- the form used to add a new comment
-
postComment
public int postComment(String content, boolean wait)
-
deleteCommentByID
public void deleteCommentByID(int id)
Deletes a comment.- Parameters:
id- the comment id
-
replyToCommentByID
public CommentForm replyToCommentByID(int id)
Clicks on the reply icon near the specified comment.- Parameters:
id- identifies the comment to reply to- Returns:
- the form used to reply
-
replyToCommentByID
public void replyToCommentByID(int id, String replyContent)Replies to a comment with the specified content.- Parameters:
id- the comment idreplyContent- the comment content of the reply
-
editCommentByID
public CommentForm editCommentByID(int id)
Clicks on the edit icon near the specified comment.- Parameters:
id- identifies the comment to be edited- Returns:
- the form used to edit the comment
-
editCommentByID
public void editCommentByID(int id, String content)Edits a comment with the specified content.- Parameters:
id- the comment idcontent- the new comment content
-
getCommentAuthorByID
public String getCommentAuthorByID(int id)
- Parameters:
id- the comment id- Returns:
- the comment author
-
getCommentContentByID
public String getCommentContentByID(int id)
- Parameters:
id- the comment id- Returns:
- the comment content
-
hasEditButtonForCommentByID
public boolean hasEditButtonForCommentByID(int id)
- Parameters:
id- the comment id- Returns:
- true if the comment has the edit button
- Since:
- 3.2M3
-
hasDeleteButtonForCommentByID
public boolean hasDeleteButtonForCommentByID(int id)
- Parameters:
id- the comment id- Returns:
- true if the comment has the delete button
- Since:
- 10.6RC1, 9.11.9
-
cancelCommentForm
public void cancelCommentForm()
Cancel the currently open comment form (new comment, edit or reply) by clicking on the cancel button.- Since:
- 14.1RC1, 13.10.3
-
clickOnReplyToCommentByID
public void clickOnReplyToCommentByID(int id)
Click on the reply button of a comment. The comment to reply to is found by its id.- Parameters:
id- the id of the comment to reply to- Since:
- 14.1RC1, 13.10.3
-
clickOnAnnotationQuote
public void clickOnAnnotationQuote(int id)
Click on the annotation of a given id.- Parameters:
id- the id of the comment- Since:
- 16.2.0RC1, 15.10.7
-
-