use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class SecurityQuestionsITCase method createSecurityQuestion.
private void createSecurityQuestion(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:securityQuestionDetailsPanel:container:form:content:textField", name);
TESTER.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
TESTER.clickLink("body:configurationLI:configurationUL:securityLI:security");
TESTER.clickLink("body:content:tabbedPanel:tabs-container:tabs:3:link");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class TopologyITCase method editPushTask.
@Test
public void editPushTask() {
Component component = findComponentByProp("key", "body:resources", "resource-ldap");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:push");
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:" + "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:" + "body:rows:1", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:" + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:" + "actions:actions:actionRepeater:1:action:action");
FormTester formTester = TESTER.newFormTester("body:toggle:outerObjectsRepeater:2:outer:form:content:" + "tasks:firstLevelContainer:first:container:content:wizard:form");
formTester.setValue("view:description:textField", "test");
formTester.submit("buttons:next");
TESTER.assertModelValue("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:" + "firstLevelContainer:first:container:content:wizard:form:view:filters:0:filters:tabs:0:body:" + "content:searchFormContainer:search:multiValueContainer:innerForm:content:view:0:panel:container:" + "value:textField", "_NO_ONE_");
formTester = TESTER.newFormTester("body:toggle:outerObjectsRepeater:2:outer:form:content:" + "tasks:firstLevelContainer:first:container:content:wizard:form");
formTester.submit("buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.cleanupFeedbackMessages();
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class TopologyITCase method editProvisioning.
@Test
public void editProvisioning() {
Component component = findComponentByProp("key", "body:resources", "ws-target-resource-1");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:provision");
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:" + "content:group:beans:0:fields:0", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:toggle:container:content:" + "togglePanelContainer:container:actions:actions:actionRepeater:0:action:action");
FormTester formTester = TESTER.newFormTester("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:wizard:form");
formTester.submit("buttons:next");
formTester = TESTER.newFormTester("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:wizard:form");
formTester.submit("buttons:next");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:" + "container:content:wizard:form:view:mapping:mappingContainer:mappings:1", WebMarkupContainer.class);
TESTER.executeAjaxEvent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:" + "content:wizard:form:view:mapping:mappingContainer:mappings:1:itemTransformers:icon", Constants.ON_CLICK);
TESTER.clickLink("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:content:" + "wizard:form:view:mapping:mappingContainer:mappings:0:itemTransformers:alertsLink");
TESTER.assertComponent("body:toggle:outerObjectsRepeater:3:outer:form:content:provision:container:" + "content:wizard:outerObjectsRepeater:0:outer:container:content:togglePanelContainer:" + "form:classes:paletteField", NonI18nPalette.class);
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class UsersITCase method editRelationships.
@Test
public void editRelationships() {
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", "puccini");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:" + "actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField", TextField.class);
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:actions:" + "actionRepeater:0:action:action", Constants.ON_CLICK);
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.setValue("view:relationships:specification:type:dropDownChoiceField", "1");
TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:" + "specification:type:dropDownChoiceField", Constants.ON_CHANGE);
// The ON_CHANGE above should enable this component, but it doesn't; doing it by hand
Component otherType = findComponentById(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:specification", "otherType");
assertNotNull(otherType);
otherType.setEnabled(true);
formTester.setValue("view:relationships:specification:otherType:dropDownChoiceField", "PRINTER");
TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:" + "specification:otherType:dropDownChoiceField", Constants.ON_CHANGE);
component = findComponentByProp("name", TAB_PANEL + "outerObjectsRepeater:" + "0:outer:form:content:form:view:relationships:specification:searchPanelContainer:searchPanel:" + "searchResultPanel:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:" + "dataTable:body:rows:1:cells:2:cell", "Canon MF 8030cn");
assertNotNull(component);
formTester.submit("buttons:cancel");
}
use of org.apache.wicket.util.tester.FormTester in project syncope by apache.
the class UsersITCase method editUser.
@Test
public void editUser() {
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", "puccini");
assertNotNull(component);
TESTER.executeAjaxEvent(component.getPageRelativePath(), Constants.ON_CLICK);
TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:" + "actions:actions:actionRepeater:0:action:action");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:username:textField", TextField.class);
FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
formTester.submit("buttons:finish");
TESTER.assertInfoMessages("Operation executed successfully");
TESTER.assertComponent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:customResultBody:resources:firstLevelContainer:first:" + "container:content:group:beans:0:fields:1:field", Label.class);
TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:action:actionRepeater:0:action:action");
component = findComponentByProp("username", CONTAINER + ":searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "puccini");
assertNotNull(component);
}
Aggregations