Examples of switchToEdit()


Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Create object page
        wep = new WikiEditPage();
        wep.switchToEdit("Test", "EditObjectsTestObject");
        wep.setContent("this is the content: {{velocity}}$doc.display('prop'){{/velocity}}");
        vp = wep.clickSaveAndView();

        // Add object
        ObjectEditPage oep = vp.editObjects();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

    @Test
    public void testChangeListTypeRelationalStorage()
    {
        // Create class page
        WikiEditPage wep = new WikiEditPage();
        wep.switchToEdit("Test", "EditObjectsTestClass");
        wep.setContent("this is the content");
        ViewPage vp = wep.clickSaveAndView();

        // Add class
        ClassEditPage cep = vp.editClass();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Create object page
        wep = new WikiEditPage();
        wep.switchToEdit("Test", "EditObjectsTestObject");
        wep.setContent("this is the content: {{velocity}}$doc.display('prop'){{/velocity}}");
        vp = wep.clickSaveAndView();

        // Add object
        ObjectEditPage oep = vp.editObjects();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        String templateFullName = space + "." + TEMPLATE_NAME;

        // Create a template
        WikiEditPage editTemplatePage = new WikiEditPage();
        editTemplatePage.switchToEdit(space, TEMPLATE_NAME);
        editTemplatePage.setTitle(templateTitle);
        editTemplatePage.setContent(templateContent);
        editTemplatePage.clickSaveAndView();

        // Create the template provider
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

    {
        // prepare the test environment, create a test space and exclude all templates for this space
        String space = this.getClass().getSimpleName();
        // create the webhome of this space to make sure the space exists
        WikiEditPage editTemplatePage = new WikiEditPage();
        editTemplatePage.switchToEdit(space, "WebHome");
        editTemplatePage.setTitle("Welcome to the templates test space");
        editTemplatePage.setContent("You can have fun with templates here");
        editTemplatePage.clickSaveAndView();
        // we'll create all these pages during this test
        getUtil().deletePage(space, "NewUnexistingPage");
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

    @Test
    public void testChangeLanguageInMonolingualModeUsingTheAdministrationPreference()
    {
        WikiEditPage edit = new WikiEditPage();
        edit.switchToEdit("Test", "LanguageTest");
        edit.setContent("{{velocity}}context = ($context.language), doc = ($doc.language), "
            + "default = ($doc.defaultLanguage), tdoc = ($tdoc.language), "
            + "tdocdefault = ($tdoc.defaultLanguage){{/velocity}}");
        ViewPage vp = edit.clickSaveAndView();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        final String page = "POSTTest";
        LoginPage loginPage = this.vp.login();
        loginPage.loginAsAdmin();
        // start editing a page
        WikiEditPage editPage = new WikiEditPage();
        editPage.switchToEdit(space, page);
        editPage.setTitle(test);
        editPage.setContent(test);
        // emulate expired session: delete the cookies
        getDriver().manage().deleteAllCookies();
        // try to save
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        }
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(wantUrl));
        loginPage.loginAsAdmin();
        // we should have been redirected back to view, and the page should have been saved
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(getUtil().getURL(space, page)));
        editPage.switchToEdit(space, page);
        Assert.assertEquals(test, editPage.getTitle());
        Assert.assertEquals(test, editPage.getContent());
    }

    @Test
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.editor.WikiEditPage.switchToEdit()

        // 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 = new WikiEditPage();
        editPage.switchToEdit(spaceName, "WebHome");
        editPage.setContent("Content");
        editPage.clickSaveAndView();

        // Navigate to the Home Page and click on the SpaceIndex.
        HomePage homePage = new HomePage();
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.