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

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


        // 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

        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

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.