You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2024/12/10 06:59:17 UTC
(syncope) branch master updated (0d0eef6860 -> ddb618f746)
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
from 0d0eef6860 Bump org.webjars:font-awesome from 6.6.0 to 6.7.1 (#931)
new 8ece6b8e7d [SYNCOPE-1846] Multiple Relationships in the same wizard instance (#930)
new ddb618f746 Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../console/panels/RelationshipViewPanel.java | 5 ++-
.../client/console/wizards/any/Relationships.java | 5 +--
.../apache/syncope/fit/console/UsersITCase.java | 45 ++++++++++++++++------
pom.xml | 4 +-
4 files changed, 39 insertions(+), 20 deletions(-)
(syncope) 02/02: Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2
Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit ddb618f746b7ffcbb7412848bdd9fadd59d1a0c4
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Mon Dec 9 22:37:11 2024 +0000
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.1 to 3.11.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.1...maven-javadoc-plugin-3.11.2)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <su...@github.com>
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7c47aa6a61..fbdd5040c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1482,7 +1482,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.11.1</version>
+ <version>3.11.2</version>
<configuration>
<release>${targetJdk}</release>
<additionalOptions>
@@ -2009,7 +2009,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.11.1</version>
+ <version>3.11.2</version>
<configuration>
<source>${targetJdk}</source>
<destDir>apidocs/4.0</destDir>
(syncope) 01/02: [SYNCOPE-1846] Multiple Relationships in the same wizard instance (#930)
Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 8ece6b8e7daf4526c8cc7a4f14e5a4fa215430c3
Author: Matteo Tatoni <83...@users.noreply.github.com>
AuthorDate: Tue Dec 10 07:56:51 2024 +0100
[SYNCOPE-1846] Multiple Relationships in the same wizard instance (#930)
---
.../console/panels/RelationshipViewPanel.java | 5 ++-
.../client/console/wizards/any/Relationships.java | 5 +--
.../apache/syncope/fit/console/UsersITCase.java | 45 ++++++++++++++++------
3 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipViewPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipViewPanel.java
index cbda4895d9..d979d2f96d 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipViewPanel.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/RelationshipViewPanel.java
@@ -75,6 +75,7 @@ public final class RelationshipViewPanel extends WizardMgtPanel<RelationshipTO>
@Override
public void onClick(final AjaxRequestTarget target, final RelationshipTO modelObject) {
relationships.remove(modelObject);
+ relationshipsList.remove(relationshipItem);
target.add(RelationshipViewPanel.this);
}
}, ActionLink.ActionType.DELETE, AnyEntitlement.UPDATE.getFor(anyTO.getType()), true).hideLabel();
@@ -133,12 +134,12 @@ public final class RelationshipViewPanel extends WizardMgtPanel<RelationshipTO>
row.add(new Label("relationship", relationshipTO.getType()));
Label leftEnd = new Label("left_end", isLeftRelation
- ? String.format("%s %s", anyTO.getType() , anyName)
+ ? String.format("%s %s", anyTO.getType(), anyName)
: String.format("%s %s", relationshipTO.getOtherEndType(), relationshipTO.getOtherEndName()));
Label rightEnd = new Label("right_end", isLeftRelation
? String.format("%s %s", relationshipTO.getOtherEndType(), relationshipTO.getOtherEndName())
- : String.format("%s %s", anyTO.getType() , anyName));
+ : String.format("%s %s", anyTO.getType(), anyName));
if (anyTO.getKey() != null && anyTO.getKey().equals(relationshipTO.getOtherEndKey())) {
setBold(leftEnd, rightEnd);
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
index 385713dd8f..f017a2d857 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
@@ -91,8 +91,6 @@ public class Relationships extends WizardStep implements ICondition {
protected final AnyTO anyTO;
- protected final Specification specification;
-
protected final PageReference pageRef;
public Relationships(final AnyWrapper<?> modelObject, final PageReference pageRef) {
@@ -110,7 +108,6 @@ public class Relationships extends WizardStep implements ICondition {
}
this.anyTO = modelObject.getInnerObject();
- this.specification = new Specification();
this.pageRef = pageRef;
// ------------------------
@@ -148,7 +145,7 @@ public class Relationships extends WizardStep implements ICondition {
public void onClick(final AjaxRequestTarget target, final RelationshipTO ignore) {
Fragment addFragment = new Fragment("relationships", "addFragment", Relationships.this);
addOrReplace(addFragment);
- addFragment.add(specification.setRenderBodyOnly(true));
+ addFragment.add(new Specification().setRenderBodyOnly(true));
target.add(Relationships.this);
}
}, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).hideLabel();
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
index 759c8d8b52..80857705d9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
@@ -156,17 +156,36 @@ public class UsersITCase extends AbstractConsoleITCase {
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);
+ // Add first RELATIONSHIP
+ addRelationship("Canon MF 8030cn");
+ component = TESTER.getComponentFromLastRenderedPage(TAB_PANEL + "outerObjectsRepeater:0:outer"
+ + ":form:content:form:view:relationships:relationships:container:content:relationships:0:right_end");
+ assertNotNull(component);
+ assertEquals("PRINTER Canon MF 8030cn", component.getDefaultModel().getObject());
+
+ // Add second RELATIONSHIP
+ addRelationship("HP LJ 1300n");
+ component = TESTER.getComponentFromLastRenderedPage(TAB_PANEL + "outerObjectsRepeater:0:outer"
+ + ":form:content:form:view:relationships:relationships:container:content:relationships:1:right_end");
+ assertNotNull(component);
+ assertEquals("PRINTER HP LJ 1300n", component.getDefaultModel().getObject());
formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
assertNotNull(formTester);
+ formTester.submit("buttons:cancel");
+ }
- formTester.setValue("view:relationships:specification:type:dropDownChoiceField", "1");
- TESTER.executeAjaxEvent(TAB_PANEL
- + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:"
+ // issue SYNCOPE-1846
+ private void addRelationship(final String printerName) {
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:actions:"
+ + "actionRepeater:0:action:action", Constants.ON_CLICK);
+ FormTester formTester = TESTER.newFormTester(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form");
+ assertNotNull(formTester);
+
+ formTester.setValue("view:relationships:specification:type:dropDownChoiceField", "neighborhood");
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:"
+ "specification:type:dropDownChoiceField", Constants.ON_CHANGE);
+ formTester.setValue("view:relationships:specification:type:dropDownChoiceField", "neighborhood");
// 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",
@@ -175,17 +194,19 @@ public class UsersITCase extends AbstractConsoleITCase {
otherType.setEnabled(true);
formTester.setValue("view:relationships:specification:otherType:dropDownChoiceField", "PRINTER");
- TESTER.executeAjaxEvent(TAB_PANEL
- + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:"
+ TESTER.executeAjaxEvent(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:"
+ "specification:otherType:dropDownChoiceField", Constants.ON_CHANGE);
- component = findComponentByProp("name", TAB_PANEL + "outerObjectsRepeater:"
+ Component 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");
+ + "dataTable:body:rows:1:cells:2:cell", printerName);
assertNotNull(component);
-
- formTester.submit("buttons:cancel");
+ TESTER.executeAjaxEvent(component, Constants.ON_CLICK);
+ TESTER.clickLink(TAB_PANEL + "outerObjectsRepeater:0:outer:form:content:form:view:relationships:specification:"
+ + "searchPanelContainer:searchPanel:searchResultPanel:"
+ + "outerObjectsRepeater:1:outer:container:content:togglePanelContainer:container:"
+ + "actions:actions:actionRepeater:0:action:action");
}
@Test