Package org.xwiki.test.ui.po.editor

Examples of org.xwiki.test.ui.po.editor.WikiEditPage


    @Test
    @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason="See http://jira.xwiki.org/browse/XE-1146")
    public void testChangeLanguageInMonolingualModeUsingTheAdministrationPreference()
    {
        WikiEditPage edit = WikiEditPage.gotoPage("Test", "LanguageTest");
        edit.setContent("{{velocity}}context = ($xcontext.language), doc = ($doc.language), "
            + "default = ($doc.defaultLanguage), tdoc = ($tdoc.language), "
            + "tdocdefault = ($tdoc.defaultLanguage){{/velocity}}");
        ViewPage vp = edit.clickSaveAndView();

        // Current language must be "en"
        Assert.assertEquals("Invalid content", vp.getContent(),
            "context = (en), doc = (), default = (en), tdoc = (), tdocdefault = (en)");

View Full Code Here


     * @see "XWIKI-2490: Preview doesn't work when the document content has script requiring programming rights"
     */
    @Test
    public void previewWithProgrammingRights()
    {
        WikiEditPage wikiEditPage = WikiEditPage.gotoPage(getTestClassName(), getTestMethodName());
        wikiEditPage.setContent("{{velocity}}$xwiki.hasAccessLevel('programming')"
            + " $tdoc.author $tdoc.contentAuthor $tdoc.creator{{/velocity}}");
        PreviewEditPage previewPage = wikiEditPage.clickPreview();
        assertEquals("true XWiki.Admin XWiki.Admin XWiki.Admin", previewPage.getContent());
    }
View Full Code Here

        String spaceName = getTestClassName() + "&";
        // Make sure the space WebHome page doesn't exist.
        getUtil().deletePage(spaceName, "WebHome");

        // Create Space with a URL-reserved character in the Space name.
        WikiEditPage editPage = WikiEditPage.gotoPage(spaceName, "WebHome");
        editPage.setContent("Content");
        editPage.clickSaveAndView();

        // Navigate to the Home Page and click on the SpaceIndex.
        HomePage homePage = HomePage.gotoPage();
        homePage.getSpacesPane().clickSpaceIndex(spaceName);
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.po.editor.WikiEditPage

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.