use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class PoliciesITCase method createUpdateDeletePasswordPolicy.
@Test
public void createUpdateDeletePasswordPolicy() {
final String description = "Password Policy To Be Updated";
createPasswordPolicy(description);
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:1:field:spinner", "2");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
closeCallBack(modal);
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form" + ":content:fields:1:field:spinner", 2);
TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button", Constants.ON_CLICK);
deletePasswordPolicy(description);
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class PoliciesITCase method createUpdateDeleteAccountPolicy.
@Test
public void createUpdateDeleteAccountPolicy() {
final String description = "Account Policy To Be Updated";
createAccountPolicy(description);
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:1:field:spinner", "2");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
closeCallBack(modal);
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form" + ":content:fields:1:field:spinner", 2);
TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button", Constants.ON_CLICK);
deleteAccountPolicy(description);
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class PoliciesITCase method cloneDeletePullPolicy.
@Test
public void cloneDeletePullPolicy() {
final String description = "My Test Pull Policy to be cloned";
createPullPolicy(description);
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
Component modal = TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:0:field:textField", description + "2");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
closeCallBack(modal);
assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description));
deletePullPolicy(description);
assertNotNull(findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2"));
deletePullPolicy(description + "2");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class PoliciesITCase method createUpdateDeletePullPolicy.
@Test
public void createUpdateDeletePullPolicy() {
final String description = "Pull Policy To Be Updated";
createPullPolicy(description);
Component component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description);
Component modal = TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:0:field:textField", description + "2");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
closeCallBack(modal);
component = findComponentByProp("description", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", description + "2");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer", Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form" + ":content:fields:0:field:textField", description + "2");
TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button", Constants.ON_CLICK);
deletePullPolicy(description + "2");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class RealmsITCase method update.
@Test
public void update() {
TESTER.clickLink("body:content:body:container:content:tabbedPanel:panel:actions:actions:actionRepeater:1:action:action");
TESTER.assertComponent("body:content:body:outerObjectsRepeater:0:outer", Modal.class);
FormTester formTester = TESTER.newFormTester("body:content:body:outerObjectsRepeater:0:outer:form:content:form");
formTester.submit("buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
TESTER.executeAjaxEvent("body:content:body:outerObjectsRepeater:0:outer:form:content:action:actionRepeater:" + "0:action:action", Constants.ON_CLICK);
}
Aggregations