Package org.xwiki.test.ui.framework.elements

Examples of org.xwiki.test.ui.framework.elements.CommentsTab


    }

    @Test
    public void testPostCommentAsGuest()
    {
        CommentsTab commentsTab = this.vp.openCommentsDocExtraPane();

        commentsTab.postCommentAsGuest(COMMENT_CONTENT, COMMENT_AUTHOR, true);
        Assert.assertEquals(COMMENT_CONTENT, commentsTab.getCommentContentByID(0));
        Assert.assertEquals(COMMENT_AUTHOR, commentsTab.getCommentAuthorByID(0));
    }
View Full Code Here


    @Test
    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)));
    }
View Full Code Here

    }

    @Test
    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)));
    }
View Full Code Here

    }

    @Test
    public void testCannotEditCommentAsAnonymous()
    {
        CommentsTab commentsTab = this.vp.openCommentsDocExtraPane();
        commentsTab.postCommentAsGuest(COMMENT_CONTENT, COMMENT_AUTHOR, true);
        Assert.assertFalse(commentsTab.hasEditbuttonForCommentByID(commentsTab.getCommentID(COMMENT_CONTENT)));
    }
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.framework.elements.CommentsTab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.