Examples of clickSaveAndView()


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

        // 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();
        FormElement objectForm = oep.addObject("Test.EditObjectsTestClass");
        objectForm.setFieldValue(By.id("Test.EditObjectsTestClass_0_prop"), "choice 3");
View Full Code Here

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

    {
        // 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();
        cep.addProperty("prop", "com.xpn.xwiki.objects.classes.StaticListClass");
        StaticListClassEditElement slcee = cep.getStaticListClassEditElement("prop");
View Full Code Here

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

        // 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();
        FormElement objectForm = oep.addObject("Test.EditObjectsTestClass");
        objectForm.setFieldValue(By.id("Test.EditObjectsTestClass_0_prop"), "this|that|other");
View Full Code Here

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

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

        // Create the template provider
        TemplatesAdministrationSectionPage sectionPage = new TemplatesAdministrationSectionPage();
        sectionPage.gotoPage();
        TemplateProviderInlinePage templateProviderInline =
View Full Code Here

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

        // check the parent of the template instance
        Assert.assertEquals(templateProviderFullName, templateInstanceEdit.getParent());

        // Put a wanted link in the template instance
        templateInstanceEdit.setContent("[[NewPage]]");
        ViewPage vp = templateInstanceEdit.clickSaveAndView();

        // Verify that clicking on the wanted link pops up a box to choose the template.
        vp.clickWantedLink(getTestClassName(), "NewPage", true);
        List<WebElement> templates = getDriver().findElements(By.name("templateprovider"));
        // Note: We need to remove 1 to exclude the "Empty Page" template entry
View Full Code Here

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

        // 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");
        getUtil().deletePage(space, "NewPage");
        getUtil().deletePage(space, "NewLinkedPage");
        // go through all the templates and make sure they are disabled on this space
View Full Code Here

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

        WYSIWYGEditPage editNewPageWysiwyg = new WYSIWYGEditPage();
        // sometimes this fails to find the edit button, for a reason for which I don't understand...
        WikiEditPage editNewPageWiki = editNewPageWysiwyg.clickSaveAndView().editWiki();
        // put a link to the new page to create
        editNewPageWiki.setContent("[[NewLinkedPage]]");
        ViewPage newPage = editNewPageWiki.clickSaveAndView();
        // no templates are available, so we don't expect a panel with a list of templates, we just expect it goes
        // directly to edit mode of the new page
        // it would be nice to be able to test here that the create page panel is not displayed, ever. However, we can't
        // since we need to wait for that time, and we don't know how much is never.
        newPage.clickWantedLink(space, "NewLinkedPage", false);
View Full Code Here

Examples of org.xwiki.test.ui.po.InlinePage.clickSaveAndView()

        // Check if the title specified on the request is properly displayed.
        Assert.assertEquals(title, inlinePage.getDocumentTitle());
        // Check if the title specified on the request is displayed in the document hierarchy.
        Assert.assertTrue(inlinePage.getBreadcrumbContent().contains(title));
        // Save the document and check again the displayed title
        ViewPage viewPage = inlinePage.clickSaveAndView();
        Assert.assertEquals(title, viewPage.getDocumentTitle());
    }

    /* See XE-168 */
    @Test
View Full Code Here

Examples of org.xwiki.test.ui.po.editor.ClassEditPage.clickSaveAndView()

        // Create a class with a database list property set to return all documents
        ClassEditPage cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.addProperty("prop", "DBList");
        cep.getDatabaseListClassEditElement("prop").setHibernateQuery(
            "select doc.fullName from XWikiDocument doc where doc.space = 'Test'");
        cep.clickSaveAndView();

        // Create a second page to hold the Object and set its content
        WikiEditPage wep = WikiEditPage.gotoPage("Test", "EditObjectsTestObject");
        wep.setContent("this is the content");
        ViewPage vp = wep.clickSaveAndView();
View Full Code Here

Examples of org.xwiki.test.ui.po.editor.ObjectEditPage.clickSaveAndView()

        ViewPage vp = wep.clickSaveAndView();

        // Add an XWikiGroups object
        ObjectEditPage oep = vp.editObjects();
        oep.addObject("XWiki.XWikiGroups");
        vp = oep.clickSaveAndView();

        oep = vp.editObjects();
        Assert.assertEquals(1, oep.getObjectsOfClass("XWiki.XWikiGroups").size());
    }
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.