Package org.xwiki.appwithinminutes.test.po

Examples of org.xwiki.appwithinminutes.test.po.StaticListItemsEditor


        StaticListClassFieldEditPane staticListField =
            new StaticListClassFieldEditPane(editor.addField("Static List").getName());

        // Open the configuration panel and edit the list items.
        staticListField.openConfigPanel();
        StaticListItemsEditor itemsEditor = staticListField.getItemsEditor();

        // Remove the second option.
        itemsEditor.remove("value2");

        // Add two new items.
        itemsEditor.add("foo", "bar");
        // Leave the value empty for the second item: it should fall back on the label.
        itemsEditor.add("", "XWiki");

        // Change the label of the last added item.
        itemsEditor.setLabel("XWiki", "XWiki Enterprise");

        // Move the last item before the first.
        itemsEditor.moveBefore("XWiki", "value1");

        Assert.assertEquals(4, itemsEditor.size());

        // Enable multiple selection and change display type to 'select' to check the value of the size property.
        staticListField.getDisplayTypeSelect().selectByVisibleText("select");
        staticListField.getMultipleSelectionCheckBox().click();
        Assert.assertEquals("4", staticListField.getSizeInput().getAttribute("value"));
View Full Code Here

TOP

Related Classes of org.xwiki.appwithinminutes.test.po.StaticListItemsEditor

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.