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

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


     */
    @Test
    public void testSectionSaveDoesNotOverwriteTheWholeContentWhenSyntax10()
    {
        ViewPage vp = createTestPages("xwiki/1.0");
        vp.editSection(3).editWiki().clickSaveAndView();
        WikiEditPage wep = vp.editWiki();
        Assert.assertEquals("1 Section1 Content1 1 Section2 Content2 1.1 Section3 Content3 1 Section4 Content4",
            wep.getContent());
    }

View Full Code Here


     */
    @Test
    public void testSectionSaveDoesNotOverwriteTheWholeContentWhenSyntax20()
    {
        ViewPage vp = createTestPages("xwiki/2.0");
        vp.editSection(4).editWiki().clickSaveAndView();
        WikiEditPage wep = vp.editWiki();
        Assert.assertEquals("= Section1 = Content1 = Section2 = Content2 == Section3 == Content3 "
            + "{{include document=\"Test.SectionEditingIncluded\"/}} = Section7 = Content7", wep.getContent());
    }
}
View Full Code Here

    public void testSectionEditInEditorWhenSyntax10()
    {
        ViewPage vp = createTestPages("xwiki/1.0");

        // Edit the second section in the wysiwyg editor
        WYSIWYGEditPage wysiwygEditPage = vp.editSection(2);
        Assert.assertEquals("Section2\nContent2\nSection3\nContent3", wysiwygEditPage.getContent());

        // Edit the second section in the wiki editor
        WikiEditPage wikiEditPage = wysiwygEditPage.editWiki();
        Assert.assertEquals("1 Section2 Content2 1.1 Section3 Content3",
View Full Code Here

            wikiEditPage.getContent());
        wikiEditPage.clickCancel();

        // Edit the third section in the wiki editor
        Assert.assertEquals("1.1 Section3 Content3",
            vp.editSection(3).editWiki().getContent());
        wikiEditPage.clickCancel();

        // Edit the fourth section in the wiki editor
        Assert.assertEquals("1 Section4 Content4",
            vp.editSection(4).editWiki().getContent());
View Full Code Here

            vp.editSection(3).editWiki().getContent());
        wikiEditPage.clickCancel();

        // Edit the fourth section in the wiki editor
        Assert.assertEquals("1 Section4 Content4",
            vp.editSection(4).editWiki().getContent());
    }

    /**
     * Verify edit section is working in both wiki and wysiwyg editors (xwiki/2.0 and xwiki/2.1).
     *
 
View Full Code Here

    private void testSectionEditInWikiEditorWhenSyntax2x(String syntaxId)
    {
        ViewPage vp = createTestPages(syntaxId);

        // Edit the second section in the wysiwyg editor
        WYSIWYGEditPage wysiwygEditPage = vp.editSection(2);
        wysiwygEditPage.getContentEditor().waitToLoad();
        Assert.assertEquals("Section2\nContent2\nSection3\nContent3\nSection4\nContent4\nSection5\nContent5\n"
            + "Section6\nContent6", wysiwygEditPage.getContent());

        // Edit the second section in the wiki editor
View Full Code Here

        Assert.assertEquals("= Section2 = Content2 == Section3 == Content3 "
            + "{{include document=\"Test.SectionEditingIncluded\"/}}", wikiEditPage.getContent());
        vp = wikiEditPage.clickCancel();

        // Edit the third section in the wiki editor
        wikiEditPage = vp.editSection(3).editWiki();
        Assert.assertEquals("== Section3 == Content3 {{include document=\"Test.SectionEditingIncluded\"/}}",
            wikiEditPage.getContent());
        vp = wikiEditPage.clickCancel();

        // Edit the fourth section in the wiki editor
View Full Code Here

        vp = wikiEditPage.clickCancel();

        // Edit the fourth section in the wiki editor
        // Note: we prove that included documents don't generate editable sections by checking that the fourth section
        // is "Section7".
        wikiEditPage = vp.editSection(4).editWiki();
        Assert.assertEquals("= Section7 = Content7", wikiEditPage.getContent());
    }

    /**
     * Verify section save does not override the whole document content (xwiki/1.0).
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.