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

Examples of org.xwiki.test.ui.framework.elements.editor.WYSIWYGEditPage


        // Place some HTML in the page content.
        editPage.setContent("{{html}}<hr/>{{/html}}");
        // If we are asked to confirm the editor switch then we choose to remain on the wiki editor.
        editPage.makeConfirmDialogSilent(false);
        // Switch to WYSIWYG editor.
        WYSIWYGEditPage wysiwygEditPage = editPage.editWYSIWYG();
        // Check that we are indeed in WYSIWYG edit mode.
        Assert.assertEquals(Editor.WYSIWYG, wysiwygEditPage.getEditor());
    }
View Full Code Here


        // Since Section Edit links are generated by JS (for XWiki Syntax 2.0) after the page has loaded make sure
        // we wait for them.
        waitUntilElementIsVisible(sectionBy);

        getDriver().findElement(sectionBy).click();
        return new WYSIWYGEditPage();
    }
View Full Code Here

    public WYSIWYGEditPage createPage(String spaceValue, String pageValue)
    {
        setSpace(spaceValue);
        setPage(pageValue);
        clickCreate();
        return new WYSIWYGEditPage();
    }
View Full Code Here

    {
        setSpace(spaceValue);
        setPage(pageValue);
        setTemplate(templateValue);
        clickCreate();
        return new WYSIWYGEditPage();
    }
View Full Code Here

    @Test
    public void testCreateNonAsciiSpace()
    {

        CreateSpacePage createSpacePage = this.homePage.createSpace();
        WYSIWYGEditPage editPage = createSpacePage.createSpace("\u0219");

        // Verify the title field
        Assert.assertEquals("\u0219", editPage.getDocumentTitle());

        // Verify the document space in the metadata
        Assert.assertEquals("\u0219", editPage.getMetaDataValue("space"));

        // Save the space to verify it can be saved with a non-ascii name
        ViewPage savedPage = editPage.save();
        Assert.assertEquals("\u0219", savedPage.getMetaDataValue("space"));
    }
View Full Code Here

     */
    @Test
    public void testCreateNonAsciiPage()
    {
        CreatePagePage createPagePage = this.homePage.createPage();
        WYSIWYGEditPage editPage = createPagePage.createPage("Main", "\u0219");

        // Verify the title field
        Assert.assertEquals("\u0219", editPage.getDocumentTitle());

        // Verify the document name in the metadata
        Assert.assertEquals("\u0219", editPage.getMetaDataValue("page"));

        // Save the page to verify it can be saved with a non-ascii name
        ViewPage savedPage = editPage.save();
        Assert.assertEquals("\u0219", savedPage.getMetaDataValue("page"));
    }
View Full Code Here

    public WYSIWYGEditPage createSpace(String spaceValue)
    {
        this.spaceTextField.sendKeys(spaceValue);
        this.spaceTextField.submit();
        return new WYSIWYGEditPage();
    }
View Full Code Here

    @Test
    public void testCreateSpace()
    {
        HomePage homePage = new HomePage();
        homePage.gotoPage();
        WYSIWYGEditPage editPage = homePage.getSpacesPane().createSpace(getTestClassName());

        // Verify that space creation uses the space name as the space home page's title
        Assert.assertEquals(getTestClassName(), editPage.getDocumentTitle());

        // Verify that the space created is correct by looking at the generate metadata in the HTML header
        // (they contain the space name amongst other data).
        Assert.assertEquals(getTestClassName(), editPage.getMetaDataValue("space"));
    }
View Full Code Here

    {
        this.spaceCreateFormToggleSwitch.click();
        this.spaceNameTextField.clear();
        this.spaceNameTextField.sendKeys(spaceName);
        this.spaceNameTextField.submit();
        return new WYSIWYGEditPage();
    }
View Full Code Here

TOP

Related Classes of org.xwiki.test.ui.framework.elements.editor.WYSIWYGEditPage

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.