use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class AnyTypesITCase method create.
@Test
public void create() {
browsingToAnyTypes();
final String anyTypeTest = "anyTypeTest2";
TESTER.clickLink("body:content:tabbedPanel:panel:container:content:add");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
final FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:anyTypeDetailsPanel:container:form:key:textField", anyTypeTest);
formTester.setValue("content:anyTypeDetailsPanel:container:form:classes:paletteField:recorder", "csv");
TESTER.clearFeedbackMessages();
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.clearFeedbackMessages();
TESTER.assertRenderedPage(Types.class);
TESTER.clickLink("body:content:tabbedPanel:tabs-container:tabs:1:link");
TESTER.assertComponent(DATATABLE_PATH, AjaxDataTablePanel.class);
Component component = findComponentByProp(KEY, DATATABLE_PATH, anyTypeTest);
TESTER.assertLabel(component.getPageRelativePath() + ":cells:1:cell", anyTypeTest);
TESTER.assertLabel(component.getPageRelativePath() + ":cells:3:cell", "[csv]");
// issue SYNCOPE-1111
TESTER.clickLink("body:realmsLI:realms");
TESTER.assertRenderedPage(Realms.class);
TESTER.assertLabel("body:content:body:container:content:tabbedPanel:tabs-container:tabs:4:link:title", anyTypeTest);
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class BulkActionITCase method userResourceBulkAction.
@Test
public void userResourceBulkAction() {
TESTER.clickLink("body:realmsLI:realms");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link");
Component component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
// manage resource
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:1" + ":outer:container:content:togglePanelContainer:container:actions:actions:actionRepeater:5:" + "action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:" + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:" + "checkgroup:dataTable", WebMarkupContainer.class);
component = findComponentByProp("resource", TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:" + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:" + "checkgroup:dataTable", "resource-csv");
assertNotNull(component);
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:firstLevelContainer:" + "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 2);
TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:" + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink", Constants.ON_CLICK);
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:2:outer:form:content:status:" + "secondLevelContainer:second:container", WebMarkupContainer.class);
assertNotNull(findComponentByProp("resource", TAB_PANEL + "outerObjectsRepeater:2:outer:" + "form:content:status:secondLevelContainer:second:container", "resource-csv"));
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class BulkActionITCase method executePropagationTask.
@Test
public void executePropagationTask() {
TESTER.clickLink("body:topologyLI:topology");
Component component = findComponentByProp("key", "body:resources", "resource-testdb");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:propagation");
FormTester formTester = TESTER.newFormTester("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:container:" + "content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 0);
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:" + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink", Constants.ON_CLICK);
TESTER.assertComponent("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:secondLevelContainer:" + "second:container:selectedObjects:body:rows:1:cells:1:cell", Label.class);
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class BulkActionITCase method usersBulkAction.
@Test
public void usersBulkAction() {
TESTER.clickLink("body:realmsLI:realms");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:1:link");
Component component = findComponentByProp("username", CONTAINER + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "rossini");
assertNotNull(component);
FormTester formTester = TESTER.newFormTester(CONTAINER + "searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
formTester.select("checkgroup", 2);
TESTER.executeAjaxEvent(CONTAINER + "searchContainer:resultTable:tablePanel:bulkActionLink", Constants.ON_CLICK);
TESTER.assertComponent(CONTAINER + "searchContainer:resultTable:bulkModal:form:content:content:container", WebMarkupContainer.class);
assertNotNull(findComponentByProp("username", CONTAINER + "searchContainer:resultTable:bulkModal:form:content:content:container", "rossini"));
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class DisplayAttributesITCase method readAndSet.
@Test
public void readAndSet() {
TESTER.clickLink("body:content:body:container:content:tabbedPanel:tabs-container:tabs:3:link");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:container:content:" + "searchContainer:tablehandling:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:3:outer", Modal.class);
FormTester formTester = TESTER.newFormTester("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:3:outer:form");
formTester.setValue("content:container:details:paletteField:recorder", "status");
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:searchResult:outerObjectsRepeater:" + "3:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.clearFeedbackMessages();
}
Aggregations