Search in sources :

Example 1 with AjaxPalettePanel

use of org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel in project syncope by apache.

the class AjaxPalettePanelITCase method isRendered.

@Test
public void isRendered() {
    TestPage<String, AjaxPalettePanel<String>> testPage = new TestPage.Builder<String, AjaxPalettePanel<String>>().build(new AjaxPalettePanel.Builder<String>().setAllowOrder(true).build(TestPage.FIELD, SELECTED, ALL));
    TESTER.startPage(testPage);
    FormTester formTester = TESTER.newFormTester(testPage.getForm().getId());
    formTester.submit();
    Collection<String> list = testPage.getFieldPanel().getModelCollection();
    assertEquals(2, list.size());
    Iterator<String> iterator = list.iterator();
    assertEquals("A", iterator.next());
    assertEquals("D", iterator.next());
}
Also used : AjaxPalettePanel(org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel) FormTester(org.apache.wicket.util.tester.FormTester) Test(org.junit.jupiter.api.Test)

Aggregations

AjaxPalettePanel (org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel)1 FormTester (org.apache.wicket.util.tester.FormTester)1 Test (org.junit.jupiter.api.Test)1