コード例 #1
0
  @Test
  @IgnoreBrowser(
      value = "internet.*",
      version = "8\\.*",
      reason = "See http://jira.xwiki.org/browse/XE-1146")
  public void testReplyCommentAsAnonymous() {
    CommentsTab commentsTab = this.vp.openCommentsDocExtraPane();

    commentsTab.postCommentAsGuest(COMMENT_CONTENT, COMMENT_AUTHOR, true);
    commentsTab.replyToCommentByID(commentsTab.getCommentID(COMMENT_CONTENT), COMMENT_REPLY);
    Assert.assertEquals(
        COMMENT_REPLY, commentsTab.getCommentContentByID(commentsTab.getCommentID(COMMENT_REPLY)));
    Assert.assertEquals(
        COMMENT_AUTHOR, commentsTab.getCommentAuthorByID(commentsTab.getCommentID(COMMENT_REPLY)));
  }
コード例 #2
0
  @Test
  @IgnoreBrowser(
      value = "internet.*",
      version = "8\\.*",
      reason = "See http://jira.xwiki.org/browse/XE-1146")
  public void testPostCommentAsGuestNoJs() {
    getUtil().gotoPage(SPACE_NAME, DOC_NAME, "view", "xpage=xpart&vm=commentsinline.vm");
    CommentsTab commentsTab = new CommentsTab();

    commentsTab.postComment(COMMENT_CONTENT, false);
    // This opens with ?viewer=comments, don't explicitly load the comments tab
    new ViewPage().waitUntilPageIsLoaded();
    Assert.assertEquals(
        COMMENT_CONTENT,
        commentsTab.getCommentContentByID(commentsTab.getCommentID(COMMENT_CONTENT)));
    Assert.assertEquals(
        COMMENT_AUTHOR,
        commentsTab.getCommentAuthorByID(commentsTab.getCommentID(COMMENT_CONTENT)));
  }
コード例 #3
0
 @Test
 @IgnoreBrowser(
     value = "internet.*",
     version = "8\\.*",
     reason = "See http://jira.xwiki.org/browse/XE-1146")
 public void testCannotEditCommentAsAnonymous() {
   CommentsTab commentsTab = this.vp.openCommentsDocExtraPane();
   commentsTab.postCommentAsGuest(COMMENT_CONTENT, COMMENT_AUTHOR, true);
   Assert.assertFalse(
       commentsTab.hasEditbuttonForCommentByID(commentsTab.getCommentID(COMMENT_CONTENT)));
 }