use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class SchemasITCase method deletePlainSchema.
@Test
public void deletePlainSchema() {
browsingToPlainSchemas();
// create new Plain Schema
final String schemaName = "zStringDelete";
TESTER.clickLink("body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:container:content:add");
TESTER.assertComponent("body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:0:outer", Modal.class);
final FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:" + "accordionPanel:tabs:0:body:content:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:details:form:key:textField", schemaName);
formTester.setValue("content:details:form:type:dropDownChoiceField", "0");
TESTER.clickLink("body:content:tabbedPanel:panel:" + "accordionPanel:tabs:0:body:content:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
;
TESTER.cleanupFeedbackMessages();
// delete plain schema
TESTER.clickLink(PLAIN_DATATABLE_PATH + ":tablePanel:groupForm:checkgroup:dataTable:bottomToolbars:toolbars:3:span:navigator:last");
TESTER.assertComponent(PLAIN_DATATABLE_PATH, AjaxDataTablePanel.class);
Component result = findComponentByProp(KEY, PLAIN_DATATABLE_PATH, schemaName);
assertNotNull(result);
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink("body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:" + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:accordionPanel:tabs:0:body:content:outerObjectsRepeater:1:outer:" + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"), Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
assertNull(findComponentByProp(KEY, PLAIN_DATATABLE_PATH, schemaName));
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class SchemasITCase method createVirtualSchema.
@Test
public void createVirtualSchema() {
browsingToVirtualSchemas();
TESTER.clickLink("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:container:content:add");
TESTER.assertComponent("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:outerObjectsRepeater:0:outer", Modal.class);
final FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:" + "accordionPanel:tabs:2:body:content:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:details:form:resource:dropDownChoiceField", "0");
TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:" + "accordionPanel:tabs:2:body:content:outerObjectsRepeater:0:outer:form:" + "content:details:form:resource:dropDownChoiceField", Constants.ON_CHANGE);
formTester.setValue("content:details:form:key:textField", "mynewvir");
formTester.setValue("content:details:form:resource:dropDownChoiceField", "0");
formTester.setValue("content:details:form:anyType:dropDownChoiceField", "0");
formTester.setValue("content:details:form:extAttrName:textField", "virattr");
TESTER.executeAjaxEvent("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:" + "outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit", Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
TESTER.assertRenderedPage(Types.class);
Component result = findComponentByProp(KEY, VIRTUAL_DATATABLE_PATH, "mynewvir");
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.getRequest().addParameter("confirm", "true");
TESTER.clickLink("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:outerObjectsRepeater:1:outer:" + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action");
TESTER.executeAjaxEvent(TESTER.getComponentFromLastRenderedPage("body:content:tabbedPanel:panel:accordionPanel:tabs:2:body:content:outerObjectsRepeater:1:outer:" + "container:content:togglePanelContainer:container:actions:actions:actionRepeater:1:action:action"), Constants.ON_CLICK);
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
assertNull(findComponentByProp(KEY, VIRTUAL_DATATABLE_PATH, "mynewvir"));
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class RelationshipTypesITCase method update.
@Test
public void update() {
final String name = "relationshipTypeUpdate";
createRelationshipType(name);
browsingToRelationshipType();
Component result = findComponentByProp(KEY, DATATABLE_PATH, name);
assertNotNull(result);
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
final FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:relationshipTypeDetails:container:form:description:textField", "new description");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class RolesITCase method createRole.
private void createRole(final String name) {
TESTER.clickLink("body:content:tabbedPanel:panel:container:content:add");
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:form:view:key:textField", name);
formTester.submit("content:form:buttons:next");
formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:form:view:entitlements:paletteField:recorder", "WORKFLOW_DEF_READ,NOTIFICATION_UPDATE,RELATIONSHIPTYPE_READ,RELATIONSHIPTYPE_LIST");
formTester.submit("content:form:buttons:next");
formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.submit("content:form:buttons:next");
formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.submit("content:form:buttons:next");
formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.submit("content:form:buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
TESTER.clickLink("body:configurationLI:configurationUL:securityLI:security");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class SecurityQuestionsITCase method update.
@Test
public void update() {
createSecurityQuestion("What's your preferred color?");
Component result = findComponentByProp("content", "body:content:tabbedPanel:panel:container:content:" + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "What's your preferred color?");
assertNotNull(result);
TESTER.executeAjaxEvent(result.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:1:outer:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:securityQuestionDetailsPanel:container:form:content:textField", "What's your preferred car?");
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
}
Aggregations