You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2016/05/13 15:55:57 UTC
syncope git commit: [SYNCOPE-844] fixes general task execution
details view
Repository: syncope
Updated Branches:
refs/heads/master af21e8010 -> ecc062ca5
[SYNCOPE-844] fixes general task execution details view
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ecc062ca
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ecc062ca
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ecc062ca
Branch: refs/heads/master
Commit: ecc062ca56d9875b2869f35a9917f52295f65ea5
Parents: af21e80
Author: fmartelli <fa...@gmail.com>
Authored: Fri May 13 17:55:40 2016 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri May 13 17:55:40 2016 +0200
----------------------------------------------------------------------
.../notifications/NotificationTasks.java | 3 +-
.../client/console/panels/DirectoryPanel.java | 7 ++
.../tasks/NotificationTaskDirectoryPanel.java | 1 +
.../client/console/tasks/PropagationTasks.java | 3 +-
.../NotificationTaskDirectoryPanel.properties | 17 +++++
...NotificationTaskDirectoryPanel_it.properties | 17 +++++
...ificationTaskDirectoryPanel_pt_BR.properties | 17 +++++
...NotificationTaskDirectoryPanel_ru.properties | 17 +++++
.../PropagationTaskDirectoryPanel.properties | 1 +
.../PropagationTaskDirectoryPanel_it.properties | 1 +
...opagationTaskDirectoryPanel_pt_BR.properties | 1 +
.../PropagationTaskDirectoryPanel_ru.properties | 9 ++-
.../fit/console/AbstractConsoleITCase.java | 7 +-
.../syncope/fit/console/BulkActionITCase.java | 8 +-
.../fit/console/NotificationsITCase.java | 54 ++++++++++++-
.../syncope/fit/console/TopologyITCase.java | 80 +++++++++++++++++++-
16 files changed, 225 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationTasks.java
index 68d2553..7a5894c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationTasks.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationTasks.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.notifications;
+import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.tasks.NotificationTaskDirectoryPanel;
@@ -67,7 +68,7 @@ public class NotificationTasks extends Panel implements ModalPanel {
@Override
protected void viewTask(final NotificationTaskTO taskTO, final AjaxRequestTarget target) {
mlp.next(
- new StringResourceModel("task.view", this, new Model<>(taskTO)).getObject(),
+ new StringResourceModel("task.view", this, new Model<>(Pair.of(null, taskTO))).getObject(),
new TaskExecutionDetails<>(null, taskTO, pageReference), target);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
index 863fb44..1ce1f19 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
@@ -219,6 +219,13 @@ public abstract class DirectoryPanel<
target.add(container);
}
+ public void updateResultTable(final AjaxRequestTarget target) {
+ updateResultTable(false);
+ if (DirectoryPanel.this.container.isVisibleInHierarchy()) {
+ target.add(DirectoryPanel.this.container);
+ }
+ }
+
private void updateResultTable(final boolean create) {
updateResultTable(create, rows);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
index 6d8d6c7..2268bc5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java
@@ -142,6 +142,7 @@ public abstract class NotificationTaskDirectoryPanel
public void onClick(final AjaxRequestTarget target, final NotificationTaskTO modelObject) {
try {
restClient.delete(taskTO.getKey(), NotificationTaskTO.class);
+ updateResultTable(target);
info(getString(Constants.OPERATION_SUCCEEDED));
target.add(container);
} catch (SyncopeClientException e) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
index 8e2b78b..c4f3aeb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.tasks;
+import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -46,7 +47,7 @@ public class PropagationTasks extends AbstractPropagationTasks {
@Override
protected void viewTask(final PropagationTaskTO taskTO, final AjaxRequestTarget target) {
tasks.next(
- new StringResourceModel("task.view", this, new Model<>(taskTO)).getObject(),
+ new StringResourceModel("task.view", this, new Model<>(Pair.of(null, taskTO))).getObject(),
new TaskExecutionDetails<>(baseModal, taskTO, pageReference),
target);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.properties
new file mode 100644
index 0000000..3fa8a2c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+task.view=Notifications with subject '${right.subject}'
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_it.properties
new file mode 100644
index 0000000..03249fb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+task.view=Notifica con oggetto '${right.subject}'
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_pt_BR.properties
new file mode 100644
index 0000000..3fa8a2c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+task.view=Notifications with subject '${right.subject}'
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_ru.properties
new file mode 100644
index 0000000..3fa8a2c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel_ru.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+task.view=Notifications with subject '${right.subject}'
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.properties
index e73d518..a3a9981 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.properties
@@ -18,3 +18,4 @@ operation=Operation
anyTypeKind=Object Type
anyKey=Local Key
connObjectKey=Remote Key
+task.view=${right.operation} task about ${right.anyTypeKind}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_it.properties
index a55ca31..28dc870 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_it.properties
@@ -18,3 +18,4 @@ operation=Operazione
anyTypeKind=Tipo Oggetto
anyKey=Key Locale
connObjectKey=Key Remota
+task.view=${right.operation} task per ${right.anyTypeKind}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_pt_BR.properties
index e73d518..a3a9981 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_pt_BR.properties
@@ -18,3 +18,4 @@ operation=Operation
anyTypeKind=Object Type
anyKey=Local Key
connObjectKey=Remote Key
+task.view=${right.operation} task about ${right.anyTypeKind}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_ru.properties
index bd95a2c..87af326 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_ru.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel_ru.properties
@@ -15,11 +15,12 @@
# specific language governing permissions and limitations
# under the License.
#
-# operation=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
+# operation=\u00d0\u0094\u00d0\u00b5\u00d0\u00b9\u00d1\u0081\u00d1\u0082\u00d0\u00b2\u00d0\u00b8\u00d0\u00b5
operation=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435
-# anyTypeKind=\u041e\u0431\u044a\u0435\u043a\u0442
+# anyTypeKind=\u00d0\u009e\u00d0\u00b1\u00d1\u008a\u00d0\u00b5\u00d0\u00ba\u00d1\u0082
anyTypeKind=\u041e\u0431\u044a\u0435\u043a\u0442
-# anyKey=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440
+# anyKey=\u00d0\u009b\u00d0\u00be\u00d0\u00ba\u00d0\u00b0\u00d0\u00bb\u00d1\u008c\u00d0\u00bd\u00d1\u008b\u00d0\u00b9 \u00d0\u00b8\u00d0\u00b4\u00d0\u00b5\u00d0\u00bd\u00d1\u0082\u00d0\u00b8\u00d1\u0084\u00d0\u00b8\u00d0\u00ba\u00d0\u00b0\u00d1\u0082\u00d0\u00be\u00d1\u0080
anyKey=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440
-# connObjectKey=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0435
+# connObjectKey=\u00d0\u0098\u00d0\u00b4\u00d0\u00b5\u00d0\u00bd\u00d1\u0082\u00d0\u00b8\u00d1\u0084\u00d0\u00b8\u00d0\u00ba\u00d0\u00b0\u00d1\u0082\u00d0\u00be\u00d1\u0080 \u00d0\u00b2 \u00d1\u0080\u00d0\u00b5\u00d1\u0081\u00d1\u0083\u00d1\u0080\u00d1\u0081\u00d0\u00b5
connObjectKey=\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0435
+task.view=${right.operation} task about ${right.anyTypeKind}
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
index f6e1a24..6182453 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/AbstractConsoleITCase.java
@@ -28,6 +28,7 @@ import org.apache.syncope.client.console.init.MIMETypesLoader;
import org.apache.syncope.client.console.pages.Login;
import org.apache.syncope.fit.AbstractITCase;
import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
import org.apache.wicket.core.util.lang.PropertyResolver;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.util.tester.FormTester;
@@ -81,8 +82,10 @@ public abstract class AbstractConsoleITCase extends AbstractITCase {
protected <V extends Serializable> Component findComponentByProp(
final String property, final String searchPath, final V key) {
- return wicketTester.getComponentFromLastRenderedPage(searchPath).getPage().
- visitChildren(ListItem.class, new IVisitor<ListItem<?>, Component>() {
+ final Component component = wicketTester.getComponentFromLastRenderedPage(searchPath);
+
+ return (component instanceof MarkupContainer ? MarkupContainer.class.cast(component) : component.getPage())
+ .visitChildren(ListItem.class, new IVisitor<ListItem<?>, Component>() {
@Override
public void component(final ListItem<?> object, final IVisit<Component> visit) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
index 1c33d76..2407a15 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/BulkActionITCase.java
@@ -55,7 +55,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
- formTester.select("checkgroup", 1);
+ formTester.select("checkgroup", 2);
wicketTester.executeAjaxEvent(searchResultContainer + "searchContainer:resultTable:tablePanel:bulkActionLink",
Constants.ON_CLICK);
@@ -64,7 +64,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ "searchContainer:resultTable:bulkModal:form:content:content:container", WebMarkupContainer.class);
assertNotNull(findComponentByProp("username", searchResultContainer
- + "searchContainer:resultTable:bulkModal:form:content:content:container:selectedObjects", "rossini"));
+ + "searchContainer:resultTable:bulkModal:form:content:content:container", "rossini"));
}
@Test
@@ -94,7 +94,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm");
assertNotNull(formTester);
- formTester.select("checkgroup", 1);
+ formTester.select("checkgroup", 2);
wicketTester.executeAjaxEvent(tabPanel + "outerObjectsRepeater:1:outer:form:content:status:"
+ "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:bulkActionLink",
@@ -104,7 +104,7 @@ public class BulkActionITCase extends AbstractConsoleITCase {
+ "secondLevelContainer:second:container", WebMarkupContainer.class);
assertNotNull(findComponentByProp("resourceName", tabPanel + "outerObjectsRepeater:1:outer:"
- + "form:content:status:secondLevelContainer:second:container:selectedObjects", "resource-csv"));
+ + "form:content:status:secondLevelContainer:second:container", "resource-csv"));
}
@Test
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
index 72ed660..b841e16 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/NotificationsITCase.java
@@ -18,12 +18,14 @@
*/
package org.apache.syncope.fit.console;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.Notifications;
import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Before;
import org.junit.FixMethodOrder;
@@ -132,8 +134,7 @@ public class NotificationsITCase extends AbstractConsoleITCase {
Component result = findComponentByProp("Subject", "body:content:tabbedPanel:panel:container:content:"
+ "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "createToUpdate");
- wicketTester.clickLink(
- result.getPageRelativePath() + ":cells:7:cell:panelEdit:editLink");
+ wicketTester.clickLink(result.getPageRelativePath() + ":cells:7:cell:panelEdit:editLink");
FormTester formTester = wicketTester.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
@@ -144,6 +145,55 @@ public class NotificationsITCase extends AbstractConsoleITCase {
}
@Test
+ public void execute() {
+ wicketTester.clickLink("body:configurationLI:configurationUL:notificationsLI:notifications");
+
+ Component result = findComponentByProp("subject",
+ "body:content:tabbedPanel:panel:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ + "checkgroup:dataTable", "Password Reset request");
+
+ wicketTester.clickLink(
+ result.getPageRelativePath() + ":cells:7:cell:panelNotificationTasks:notificationTasksLink");
+
+ wicketTester.assertComponent("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ + "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ + "groupForm:checkgroup:dataTable", WebMarkupContainer.class);
+
+ result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ + "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ + "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81");
+
+ wicketTester.clickLink(result.getPageRelativePath() + ":cells:8:cell:panelExecute:executeLink");
+
+ wicketTester.assertInfoMessages("Operation executed successfully");
+ wicketTester.cleanupFeedbackMessages();
+
+ wicketTester.clickLink("body:configurationLI:configurationUL:notificationsLI:notifications");
+
+ result = findComponentByProp("subject", "body:content:tabbedPanel:panel:container:content:"
+ + "searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable", "Password Reset request");
+
+ wicketTester.clickLink(
+ result.getPageRelativePath() + ":cells:7:cell:panelNotificationTasks:notificationTasksLink");
+
+ result = findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ + "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ + "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81");
+
+ wicketTester.clickLink(result.getPageRelativePath() + ":cells:8:cell:panelView:viewLink");
+
+ wicketTester.assertLabel("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:tasks:"
+ + "secondLevelContainer:title", "Notifications with subject 'Notification for SYNCOPE-81'");
+
+ wicketTester.clickLink("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:tasks:"
+ + "secondLevelContainer:back");
+
+ assertNotNull(findComponentByProp("subject", "body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:"
+ + "content:tasks:firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:"
+ + "groupForm:checkgroup:dataTable", "Notification for SYNCOPE-81"));
+ }
+
+ @Test
public void delete() {
createNotification("delete@syncope.org", "createToDelete");
Component result = findComponentByProp("Subject", "body:content:tabbedPanel:panel:container:content:"
http://git-wip-us.apache.org/repos/asf/syncope/blob/ecc062ca/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
index c5b5c09..c698ea6 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
@@ -27,9 +27,11 @@ import java.util.UUID;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.TogglePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.NonI18nPalette;
+import org.apache.syncope.common.lib.types.ResourceOperation;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.util.tester.FormTester;
import org.junit.Before;
@@ -243,13 +245,83 @@ public class TopologyITCase extends AbstractConsoleITCase {
assertNotNull(component);
wicketTester.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
wicketTester.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:pull");
- wicketTester.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:"
- + "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
- + "body:rows:1:cells:10:cell:panelExecute:executeLink");
+
+ component = findComponentByProp("name", "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ + "checkgroup:dataTable", "TestDB Task");
+
+ wicketTester.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelExecute:executeLink");
wicketTester.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:startAt:container:content:togglePanelContainer:startAtForm:startAt");
wicketTester.assertInfoMessages("Operation executed successfully");
+
+ try {
+ // requires a short delay
+ Thread.sleep(5000);
+ } catch (Exception ignore) {
+ }
+
+ component = findComponentByProp("name", "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ + "checkgroup:dataTable", "TestDB Task");
+
+ wicketTester.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelView:viewLink");
+
+ wicketTester.assertLabel(
+ "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:title",
+ "Executions of task 'TestDB Task'");
+
+ wicketTester.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
+ + "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
+ + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink");
+
+ wicketTester.assertComponent("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ + "secondLevelContainer:second:executions:secondLevelContainer:title", Label.class);
+ }
+
+ @Test
+ public void readPropagationTaskExecutions() {
+ wicketTester.clickLink("body:topologyLI:topology");
+
+ Component component = findComponentByProp("key", "body:resources", "resource-testdb");
+ assertNotNull(component);
+ wicketTester.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
+ wicketTester.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:propagation");
+
+ wicketTester.assertComponent("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:"
+ + "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable",
+ WebMarkupContainer.class);
+
+ component = findComponentByProp("operation", "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:"
+ + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ + "checkgroup:dataTable", ResourceOperation.CREATE);
+
+ wicketTester.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelExecute:executeLink");
+
+ wicketTester.clickLink("body:topologyLI:topology");
+
+ component = findComponentByProp("key", "body:resources", "resource-testdb");
+ assertNotNull(component);
+ wicketTester.executeAjaxEvent(component.getPageRelativePath() + ":res", Constants.ON_CLICK);
+ wicketTester.clickLink("body:toggle:container:content:togglePanelContainer:container:actions:propagation");
+
+ component = findComponentByProp("operation", "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:"
+ + "firstLevelContainer:first:container:content:searchContainer:resultTable:tablePanel:groupForm:"
+ + "checkgroup:dataTable", ResourceOperation.CREATE);
+
+ wicketTester.clickLink(component.getPageRelativePath() + ":cells:10:cell:panelView:viewLink");
+
+ wicketTester.assertLabel(
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:secondLevelContainer:title",
+ "CREATE task about USER");
+
+ wicketTester.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:secondLevelContainer:"
+ + "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
+ + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink");
+
+ wicketTester.assertComponent("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:"
+ + "secondLevelContainer:second:executions:secondLevelContainer:title", Label.class);
}
@Test
@@ -359,7 +431,7 @@ public class TopologyITCase extends AbstractConsoleITCase {
wicketTester.assertModelValue("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ "firstLevelContainer:first:container:content:wizard:form:view:name:textField",
"'k' + name");
-
+
formTester = wicketTester.newFormTester("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:"
+ "firstLevelContainer:first:container:content:wizard:form");
formTester.setValue("view:name:textField", "");