Examples of openAttachmentsDocExtraPane()


Examples of org.xwiki.test.ui.framework.elements.ViewPage.openAttachmentsDocExtraPane()

    public void testUploadDownloadTwoAttachments()
    {
        ViewPage vp = getUtil().createPage(getTestClassName(), getTestMethodName(), null,
            getTestClassName() + "#" + getTestMethodName());

        AttachmentsPane ap = vp.openAttachmentsDocExtraPane();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment).getPath());
        ap.addAnotherFile();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment2).getPath());
        ap.clickAttachFiles();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.ViewPage.openAttachmentsDocExtraPane()

        // image is not actually resized).
        ViewPage viewPage = getUtil().createPage(getClass().getSimpleName(), getTestMethodName(),
            String.format("[[image:image.gif||width=%s]]", (20 + RandomUtils.nextInt(200))), getTestClassName());

        // Attach the GIF image.
        AttachmentsPane attachmentsPane = viewPage.openAttachmentsDocExtraPane();
        attachmentsPane.setFileToUpload(getClass().getResource("/image.gif").getPath());
        attachmentsPane.clickAttachFiles();
        // clickAttachFiles should wait for the page to load but it doesn't..
        viewPage.waitUntilPageIsLoaded();
        // XWIKI-5896 shows that the file name becomes image.png
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.ViewPage.openAttachmentsDocExtraPane()

        attachmentsPane.setFileToUpload(getClass().getResource("/image.gif").getPath());
        attachmentsPane.clickAttachFiles();
        // clickAttachFiles should wait for the page to load but it doesn't..
        viewPage.waitUntilPageIsLoaded();
        // XWIKI-5896 shows that the file name becomes image.png
        attachmentsPane = viewPage.openAttachmentsDocExtraPane();
        Assert.assertTrue(attachmentsPane.attachmentExistsByFileName("image.gif"));
    }
}
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

        // Create a new page.
        ViewPage page = getUtil().createPage(getTestClassName(), getTestMethodName(), "Once upon a time..", "A story");

        // Add an attachment.
        page.openAttachmentsDocExtraPane().setFileToUpload(getClass().getResource("/SmallAttachment.txt").getPath());

        // Delete the page.
        page.delete().clickYes();

        // Restore the page.
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

        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"));

        // Check the attachment content.
        attachmentsPane.getAttachmentLink("SmallAttachment.txt").click();
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

        // 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");

        AttachmentsPane ap = vp.openAttachmentsDocExtraPane();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment).getPath());
        ap.addAnotherFile();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment2).getPath());
        ap.clickAttachFiles();
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

        // 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");

        AttachmentsPane ap = vp.openAttachmentsDocExtraPane();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment).getPath());
        ap.waitForUploadToFinish(this.testAttachment);
        ap.clickHideProgress();
        ap.setFileToUpload(this.getClass().getResource("/" + this.testAttachment2).getPath());
        ap.waitForUploadToFinish(this.testAttachment2);
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

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

        // Attach the GIF image.
        AttachmentsPane attachmentsPane = viewPage.openAttachmentsDocExtraPane();
        attachmentsPane.setFileToUpload(getClass().getResource("/image.gif").getPath());
        attachmentsPane.waitForUploadToFinish("image.gif");
        Assert.assertTrue(attachmentsPane.attachmentExistsByFileName("image.gif"));
    }
}
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

            getUtil().createPage(sourceSpaceName, sourcePageName, PAGE_CONTENT, sourcePageName);

        // Add an attachment to verify that it's version is not incremented in the target document (XWIKI-8157).
        // FIXME: Remove the following wait when XWIKI-6688 is fixed.
        viewPage.waitForDocExtraPaneActive("comments");
        AttachmentsPane attachmentsPane = viewPage.openAttachmentsDocExtraPane();
        attachmentsPane.setFileToUpload(getClass().getResource("/image.gif").getPath());
        attachmentsPane.waitForUploadToFinish("image.gif");
        Assert.assertEquals("1.1", attachmentsPane.getLatestVersionOfAttachment("image.gif"));

        // Click on Copy from the Page top menu.
View Full Code Here

Examples of org.xwiki.test.ui.po.ViewPage.openAttachmentsDocExtraPane()

        Assert.assertEquals(PAGE_CONTENT, viewPage.getContent());

        // Verify the attachment version is the same (XWIKI-8157).
        // FIXME: Remove the following wait when XWIKI-6688 is fixed.
        viewPage.waitForDocExtraPaneActive("comments");
        attachmentsPane = viewPage.openAttachmentsDocExtraPane();
        Assert.assertEquals("1.1", attachmentsPane.getLatestVersionOfAttachment("image.gif"));
    }

    @Test
    @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason = "See http://jira.xwiki.org/browse/XE-1146")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.