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: f3a445bae04cd2ecd535731594be9e98665e6eae $
-
-
Constructor Summary
Constructors Constructor Description CommentsTab()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelCommentForm()
Cancel the currently open comment form (new comment, edit or reply) by clicking on the cancel button.void
clickOnReplyToCommentByID(int id)
Click on the reply button of a comment.void
deleteCommentByID(int id)
Deletes a comment.CommentForm
editCommentByID(int id)
Clicks on the edit icon near the specified comment.void
editCommentByID(int id, String content)
Edits a comment with the specified content.CommentForm
getAddCommentForm()
String
getCommentAuthorByID(int id)
String
getCommentContentByID(int id)
int
getCommentID(String content)
String
getCurrentAuthor()
boolean
hasDeleteButtonForCommentByID(int id)
boolean
hasEditButtonForCommentByID(int id)
boolean
isCommentFormShown()
boolean
isOpened()
void
openCommentForm()
Opens the comment form by clicking on the comment button.int
postComment(String content, boolean wait)
int
postCommentAsGuest(String content, String author, boolean wait)
CommentForm
replyToCommentByID(int id)
Clicks on the reply icon near the specified comment.void
replyToCommentByID(int id, String replyContent)
Replies to a comment with the specified content.void
setAnonymousCommentAuthor(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
-
-