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

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


    })
    public void testChangeMultiselectProperty()
    {
        // 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
View Full Code Here


        wep.setContent("this is the content");
        ViewPage vp = wep.clickSaveAndView();

        // 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
View Full Code Here

        wep.setContent("this is the content");
        ViewPage vp = wep.clickSaveAndView();

        // Add class
        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());
View Full Code Here

        wep.setContent("this is the content");
        ViewPage vp = wep.clickSaveAndView();

        // Add class
        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());
View Full Code Here

    {
        getUtil().deletePage(getTestClassName(), getTestMethodName());

        // Create a class with two properties: a date and a list of users.
        ClassEditPage classEditor = ClassEditPage.gotoPage(getTestClassName(), getTestMethodName());
        classEditor.addProperty("date", "Date");
        classEditor.addProperty("author", "Users");

        // Add an object of this class and set its properties.
        String className = getTestClassName() + "." + getTestMethodName();
        ObjectEditPage objectEditor = ObjectEditPage.gotoPage(getTestClassName(), getTestMethodName());
View Full Code Here

        getUtil().deletePage(getTestClassName(), getTestMethodName());

        // Create a class with two properties: a date and a list of users.
        ClassEditPage classEditor = ClassEditPage.gotoPage(getTestClassName(), getTestMethodName());
        classEditor.addProperty("date", "Date");
        classEditor.addProperty("author", "Users");

        // Add an object of this class and set its properties.
        String className = getTestClassName() + "." + getTestMethodName();
        ObjectEditPage objectEditor = ObjectEditPage.gotoPage(getTestClassName(), getTestMethodName());
        ObjectEditPane object = objectEditor.addObject(className);
View Full Code Here

        // We verify that we can click on Edit Class from View Page (we need to test this at
        // least once to ensure the UI works).
        ClassEditPage cep = getUtil().gotoPage("Test", "EditObjectsTestClass").editClass();

        // Create a class with a string property
        cep.addProperty("prop", "String");
        cep.clickSaveAndView();

        // Create object page
        ViewPage vp = getUtil().createPage("Test", "EditObjectsTestObject",
            "this is the content: {{velocity}}$doc.display('prop'){{/velocity}}", getTestMethodName());
View Full Code Here

        form.fillFieldsByName(assignment);
        objectEditPage.clickSaveAndContinue();

        // Create class.
        ClassEditPage classEditPage = objectEditPage.editClass();
        classEditPage.addProperty("age", "Number");
        classEditPage.addProperty("color", "String");
        classEditPage.getNumberClassEditElement("age").setNumberType("integer");
        classEditPage.clickSaveAndContinue();
        classEditPage.deleteProperty("color");
        testPage = classEditPage.clickSaveAndView();
View Full Code Here

        objectEditPage.clickSaveAndContinue();

        // Create class.
        ClassEditPage classEditPage = objectEditPage.editClass();
        classEditPage.addProperty("age", "Number");
        classEditPage.addProperty("color", "String");
        classEditPage.getNumberClassEditElement("age").setNumberType("integer");
        classEditPage.clickSaveAndContinue();
        classEditPage.deleteProperty("color");
        testPage = classEditPage.clickSaveAndView();
View Full Code Here

        Assert.assertEquals(classTitle, classSheetPage.getDocumentTitle());
        Assert.assertTrue(classSheetPage.hasBreadcrumbContent(dataTypesPageTitle, false));

        // Add a property.
        ClassEditPage classEditor = classSheetPage.clickDefineClassLink();
        classEditor.addProperty("color", "String").setPrettyName("Your favorite color");
        classEditor.clickSaveAndView();

        // Add a new property.
        classEditor = classSheetPage.clickEditClassLink();
        classEditor.addProperty("age", "Number").setPrettyName("Your current age");
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.