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

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


        oep.clickSaveAndView();

        // Set multiselect to true
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getDatabaseListClassEditElement("prop").setMultiSelect(true);
        cep.clickSaveAndView();

        // Select a second document in the DB list select field.
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
            By.id("Test.EditObjectsTestClass_0_prop"), "Test.EditObjectsTestObject");
View Full Code Here

        // Add class
        ClassEditPage cep = vp.editClass();
        cep.addProperty("prop", "Number");
        cep.getNumberClassEditElement("prop").setNumberType("integer");
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Create object page
        wep = WikiEditPage.gotoPage("Test", "EditObjectsTestObject");
        wep.setContent("this is the content: {{velocity}}$doc.display('prop'){{/velocity}}");
View Full Code Here

        Assert.assertEquals("this is the content: 3", vp.getContent());

        // Change number to double type
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getNumberClassEditElement("prop").setNumberType("double");
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Verify conversion
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
View Full Code Here

        Assert.assertEquals("this is the content: 2.5", vp.getContent());

        // Change number to long type
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getNumberClassEditElement("prop").setNumberType("long");
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Verify conversion
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        vp = oep.clickSaveAndView();
View Full Code Here

        ClassEditPage cep = vp.editClass();
        cep.addProperty("prop", "StaticList");
        StaticListClassEditElement slcee = cep.getStaticListClassEditElement("prop");
        slcee.setMultiSelect(false);
        slcee.setValues("choice 1|choice 2|choice 3|choice 4|choice 5");
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Create object page
        wep = WikiEditPage.gotoPage("Test", "EditObjectsTestObject");
        wep.setContent("this is the content: {{velocity}}$doc.display('prop'){{/velocity}}");
View Full Code Here

        Assert.assertEquals("this is the content: choice 3", vp.getContent());

        // Change list to a multiple select.
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getStaticListClassEditElement("prop").setMultiSelect(true);
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Verify conversion
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
View Full Code Here

        ClassEditPage cep = vp.editClass();
        cep.addProperty("prop", "StaticList");
        StaticListClassEditElement slcee = cep.getStaticListClassEditElement("prop");
        slcee.setMultiSelect(true);
        slcee.setDisplayType(StaticListClassEditElement.DisplayType.INPUT);
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Create object page
        wep = WikiEditPage.gotoPage("Test", "EditObjectsTestObject");
        wep.setContent("this is the content: {{velocity}}$doc.display('prop'){{/velocity}}");
View Full Code Here

        Assert.assertEquals("this is the content: this that other", vp.getContent());

        // Change list to relational storage.
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getStaticListClassEditElement("prop").setRelationalStorage(true);
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Make sure we can still edit the object.
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
View Full Code Here

        Assert.assertEquals("this is the content: this other", vp.getContent());

        // Change list to non-relational storage.
        cep = ClassEditPage.gotoPage("Test", "EditObjectsTestClass");
        cep.getStaticListClassEditElement("prop").setRelationalStorage(false);
        vp = cep.clickSaveAndView();
        Assert.assertEquals("this is the content", vp.getContent());

        // Make sure we can still edit the object.
        oep = ObjectEditPage.gotoPage("Test", "EditObjectsTestObject");
        oep.getObjectsOfClass("Test.EditObjectsTestClass").get(0).setFieldValue(
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.