Package org.xwiki.test.ui.po

Examples of org.xwiki.test.ui.po.HistoryPane


        // Check the page title and content.
        assertEquals("A story", page.getDocumentTitle());
        assertEquals("Once upon a time..", page.getContent());

        // Check document version/history.
        HistoryPane historyPane = page.openHistoryDocExtraPane();
        assertEquals("3.1", historyPane.getCurrentVersion());
        assertEquals("Restored from recycle bin", historyPane.getCurrentVersionComment());

        // Check the attachment.
        AttachmentsPane attachmentsPane = page.openAttachmentsDocExtraPane();
        assertEquals(1, attachmentsPane.getNumberOfAttachments());
        assertEquals("1.1", attachmentsPane.getLatestVersionOfAttachment("SmallAttachment.txt"));
View Full Code Here


        // TODO: Remove when XWIKI-6688 (Possible race condition when clicking on a tab at the bottom of a page in
        // view mode) is fixed.
        vp.waitForDocExtraPaneActive("comments");

        // Verify that we can rollback to the first version
        HistoryPane historyTab = vp.openHistoryDocExtraPane();
        vp = historyTab.rollbackToVersion("1.1");

        // Rollback doesn't wait...
        // Wait for the comment tab to be selected since we're currently on the history tab and rolling
        // back is going to load a new page and make the focus active on the comments tab.
        vp.waitForDocExtraPaneActive("comments");

        Assert.assertEquals("First version of Content", vp.getContent());

        historyTab = vp.openHistoryDocExtraPane();
        Assert.assertEquals("Rollback to version 1.1", historyTab.getCurrentVersionComment());
        Assert.assertEquals("Administrator", historyTab.getCurrentAuthor());
    }
View Full Code Here

        // TODO: Remove when XWIKI-6688 (Possible race condition when clicking on a tab at the bottom of a page in
        // view mode) is fixed.
        vp.waitForDocExtraPaneActive("comments");

        // Verify and delete the latest version.
        HistoryPane historyTab = vp.openHistoryDocExtraPane();
        Assert.assertEquals("2.1", historyTab.getCurrentVersion());
        historyTab = historyTab.deleteVersion("2.1");

        // Verify that the current version is now the previous one.
        Assert.assertEquals("1.1", historyTab.getCurrentVersion());
        Assert.assertEquals("Administrator", historyTab.getCurrentAuthor());
    }
View Full Code Here

     * Tests that all changes are displayed.
     */
    @Test
    public void testAllChanges()
    {
        HistoryPane historyTab = testPage.openHistoryDocExtraPane().showMinorEdits();
        String currentVersion = historyTab.getCurrentVersion();

        // TODO: If the document has many versions, like in this case, the versions are paginated and currently there's
        // no way to compare two versions from two different pagination pages using the UI. Thus we have to build the
        // URL and load the compare page manually. Update the code when we remove this UI limitation.
        // ChangesPane changesPane = historyTab.compare("1.1", currentVersion).getChangesPane();
View Full Code Here

     * Tests that a message is displayed when there are no changes.
     */
    @Test
    public void testNoChanges()
    {
        HistoryPane historyTab = testPage.openHistoryDocExtraPane();
        String currentVersion = historyTab.getCurrentVersion();
        Assert.assertTrue(historyTab.compare(currentVersion, currentVersion).getChangesPane().hasNoChanges());
    }
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.po.HistoryPane

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.