You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/01/26 13:27:55 UTC
(causeway) branch CAUSEWAY-3676 updated (42580678d8 -> 923b3e1e14)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git
from 42580678d8 CAUSEWAY-3676: adds support for collection params
new 850db5d5d4 CAUSEWAY-3676: splits out Admin_IntegTest
new 923b3e1e14 CAUSEWAY-3676: splits up tests a little, is all
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:
.../graphql/viewer/test/domain/Calculator.java | 25 ++
.../viewer/test/e2e/Abstract_IntegTest.java | 105 +++++
...min_IntegTest.action_with_disabled_param._.gql} | 0
...gTest.action_with_disabled_param.approved.json} | 0
...Admin_IntegTest.action_with_hidden_param._.gql} | 0
...tegTest.action_with_hidden_param.approved.json} | 0
...on._.gql => Admin_IntegTest.admin_action._.gql} | 0
... => Admin_IntegTest.admin_action.approved.json} | 0
.../graphql/viewer/test/e2e/Admin_IntegTest.java | 98 +++++
...ql => Admin_IntegTest.other_admin_action._.gql} | 0
...min_IntegTest.other_admin_action.approved.json} | 0
.../test/e2e/Calculator_IntegTest.add_int._.gql | 7 +
.../e2e/Calculator_IntegTest.add_int.approved.json | 9 +
...ma_IntegTest.java => Calculator_IntegTest.java} | 38 +-
...> Department_IntegTest.create_department._.gql} | 0
...ment_IntegTest.create_department.approved.json} | 0
...st.create_department_name_param_disabled._.gql} | 0
...e_department_name_param_disabled.approved.json} | 0
...epartment_IntegTest.find_all_departments._.gql} | 0
...t_IntegTest.find_all_departments.approved.json} | 0
...department_and_add_staff_members._.choices.gql} | 0
..._department_and_add_staff_members._.invoke.gql} | 0
...department_and_add_staff_members.approved.json} | 0
..._department_and_change_head_autocomplete._.gql} | 0
...ent_and_change_head_autocomplete.approved.json} | 0
....find_department_and_change_head_default._.gql} | 0
...partment_and_change_head_default.approved.json} | 0
....find_department_and_change_name_invalid._.gql} | 0
...partment_and_change_name_invalid.approved.json} | 0
...nd_department_and_edit_head_autocomplete._.gql} | 0
...tment_and_edit_head_autocomplete.approved.json} | 0
...and_edit_head_autocomplete_none_matching._.gql} | 0
..._head_autocomplete_none_matching.approved.json} | 0
...partment_and_remove_staff_member_choices._.gql} | 0
..._and_remove_staff_member_choices.approved.json} | 0
...rtment_IntegTest.find_department_by_name._.gql} | 0
...ntegTest.find_department_by_name.approved.json} | 0
.../viewer/test/e2e/Department_IntegTest.java | 214 ++++++++++
..._IntegTest.find_depthead_and_change_name._.gql} | 0
...st.find_depthead_and_change_name.approved.json} | 0
...st.find_depthead_and_change_name_invalid._.gql} | 0
...depthead_and_change_name_invalid.approved.json} | 0
..._depthead_and_change_name_invoke_invalid._.gql} | 0
...d_and_change_name_invoke_invalid.approved.json} | 0
...DeptHead_IntegTest.find_depthead_by_name._.gql} | 0
..._IntegTest.find_depthead_by_name.approved.json} | 0
.../viewer/test/e2e/DeptHead_IntegTest.java | 92 +++++
.../graphql/viewer/test/e2e/Domain_IntegTest.java | 434 ---------------------
...Test.create_staff_member_with_department._.gql} | 0
...ate_staff_member_with_department.approved.json} | 0
...gTest.find_staff_member_by_name_and_edit._.gql} | 0
...nd_staff_member_by_name_and_edit.approved.json} | 0
...ff_member_by_name_and_edit_grade_choices._.gql} | 0
...r_by_name_and_edit_grade_choices.approved.json} | 0
.../graphql/viewer/test/e2e/Staff_IntegTest.java | 119 ++++++
...IntegTest.staff_member_name_edit_invalid._.gql} | 0
...t.staff_member_name_edit_invalid.approved.json} | 0
...aff_IntegTest.staff_member_name_validate._.gql} | 0
...gTest.staff_member_name_validate.approved.json} | 0
.../test/{e2e => schema}/Schema_IntegTest.java | 2 +-
.../{e2e => schema}/Schema_IntegTest.schema._.gql | 0
.../Schema_IntegTest.schema.approved.json | 308 +++++++++++++++
.../Schema_IntegTest.schema_types_name._.gql | 0
...chema_IntegTest.schema_types_name.approved.json | 10 +
.../src/test/resources/application-test.properties | 4 +-
.../graphql/test/src/test/resources/schema.gql | 30 ++
66 files changed, 1042 insertions(+), 453 deletions(-)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Calculator.java
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.action_with_disabled_param._.gql => Admin_IntegTest.action_with_disabled_param._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.action_with_disabled_param.approved.json => Admin_IntegTest.action_with_disabled_param.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.action_with_hidden_param._.gql => Admin_IntegTest.action_with_hidden_param._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.action_with_hidden_param.approved.json => Admin_IntegTest.action_with_hidden_param.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.admin_action._.gql => Admin_IntegTest.admin_action._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.admin_action.approved.json => Admin_IntegTest.admin_action.approved.json} (100%)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.java
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.other_admin_action._.gql => Admin_IntegTest.other_admin_action._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.other_admin_action.approved.json => Admin_IntegTest.other_admin_action.approved.json} (100%)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
copy incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Schema_IntegTest.java => Calculator_IntegTest.java} (59%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_department._.gql => Department_IntegTest.create_department._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_department.approved.json => Department_IntegTest.create_department.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_department_name_param_disabled._.gql => Department_IntegTest.create_department_name_param_disabled._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_department_name_param_disabled.approved.json => Department_IntegTest.create_department_name_param_disabled.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_all_departments._.gql => Department_IntegTest.find_all_departments._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_all_departments.approved.json => Department_IntegTest.find_all_departments.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_add_staff_members._.choices.gql => Department_IntegTest.find_department_and_add_staff_members._.choices.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_add_staff_members._.invoke.gql => Department_IntegTest.find_department_and_add_staff_members._.invoke.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_add_staff_members.approved.json => Department_IntegTest.find_department_and_add_staff_members.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_head_autocomplete._.gql => Department_IntegTest.find_department_and_change_head_autocomplete._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_head_autocomplete.approved.json => Department_IntegTest.find_department_and_change_head_autocomplete.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_head_default._.gql => Department_IntegTest.find_department_and_change_head_default._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_head_default.approved.json => Department_IntegTest.find_department_and_change_head_default.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_name_invalid._.gql => Department_IntegTest.find_department_and_change_name_invalid._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_change_name_invalid.approved.json => Department_IntegTest.find_department_and_change_name_invalid.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_edit_head_autocomplete._.gql => Department_IntegTest.find_department_and_edit_head_autocomplete._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_edit_head_autocomplete.approved.json => Department_IntegTest.find_department_and_edit_head_autocomplete.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql => Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json => Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_remove_staff_member_choices._.gql => Department_IntegTest.find_department_and_remove_staff_member_choices._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_and_remove_staff_member_choices.approved.json => Department_IntegTest.find_department_and_remove_staff_member_choices.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_by_name._.gql => Department_IntegTest.find_department_by_name._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_department_by_name.approved.json => Department_IntegTest.find_department_by_name.approved.json} (100%)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.java
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name._.gql => DeptHead_IntegTest.find_depthead_and_change_name._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name.approved.json => DeptHead_IntegTest.find_depthead_and_change_name.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name_invalid._.gql => DeptHead_IntegTest.find_depthead_and_change_name_invalid._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name_invalid.approved.json => DeptHead_IntegTest.find_depthead_and_change_name_invalid.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql => DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json => DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_by_name._.gql => DeptHead_IntegTest.find_depthead_by_name._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_depthead_by_name.approved.json => DeptHead_IntegTest.find_depthead_by_name.approved.json} (100%)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.java
delete mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_staff_member_with_department._.gql => Staff_IntegTest.create_staff_member_with_department._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.create_staff_member_with_department.approved.json => Staff_IntegTest.create_staff_member_with_department.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_staff_member_by_name_and_edit._.gql => Staff_IntegTest.find_staff_member_by_name_and_edit._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_staff_member_by_name_and_edit.approved.json => Staff_IntegTest.find_staff_member_by_name_and_edit.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql => Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json => Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json} (100%)
create mode 100644 incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.java
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.staff_member_name_edit_invalid._.gql => Staff_IntegTest.staff_member_name_edit_invalid._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.staff_member_name_edit_invalid.approved.json => Staff_IntegTest.staff_member_name_edit_invalid.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.staff_member_name_validate._.gql => Staff_IntegTest.staff_member_name_validate._.gql} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/{Domain_IntegTest.staff_member_name_validate.approved.json => Staff_IntegTest.staff_member_name_validate.approved.json} (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/{e2e => schema}/Schema_IntegTest.java (97%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/{e2e => schema}/Schema_IntegTest.schema._.gql (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/{e2e => schema}/Schema_IntegTest.schema.approved.json (98%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/{e2e => schema}/Schema_IntegTest.schema_types_name._.gql (100%)
rename incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/{e2e => schema}/Schema_IntegTest.schema_types_name.approved.json (99%)
(causeway) 01/02: CAUSEWAY-3676: splits out Admin_IntegTest
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 850db5d5d48a85e73493e1ba0c79af8002cb3e15
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 26 13:17:22 2024 +0000
CAUSEWAY-3676: splits out Admin_IntegTest
---
.../graphql/viewer/test/domain/Calculator.java | 25 ++
.../viewer/test/e2e/Abstract_IntegTest.java | 107 +++++++
...min_IntegTest.action_with_disabled_param._.gql} | 0
...gTest.action_with_disabled_param.approved.json} | 0
...Admin_IntegTest.action_with_hidden_param._.gql} | 0
...tegTest.action_with_hidden_param.approved.json} | 0
...on._.gql => Admin_IntegTest.admin_action._.gql} | 0
... => Admin_IntegTest.admin_action.approved.json} | 0
.../graphql/viewer/test/e2e/Admin_IntegTest.java | 98 +++++++
...ql => Admin_IntegTest.other_admin_action._.gql} | 0
...min_IntegTest.other_admin_action.approved.json} | 0
.../e2e/Domain_IntegTest.calculator_add_int._.gql | 7 +
...main_IntegTest.calculator_add_int.approved.json | 9 +
.../graphql/viewer/test/e2e/Domain_IntegTest.java | 127 ++-------
.../test/e2e/Schema_IntegTest.schema.approved.json | 308 +++++++++++++++++++++
...chema_IntegTest.schema_types_name.approved.json | 10 +
.../src/test/resources/application-test.properties | 4 +-
.../graphql/test/src/test/resources/schema.gql | 30 ++
18 files changed, 612 insertions(+), 113 deletions(-)
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Calculator.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Calculator.java
new file mode 100644
index 0000000000..5d0feb968b
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/domain/Calculator.java
@@ -0,0 +1,25 @@
+package org.apache.causeway.viewer.graphql.viewer.test.domain;
+
+import lombok.RequiredArgsConstructor;
+
+import javax.annotation.Priority;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.apache.causeway.applib.annotation.Action;
+import org.apache.causeway.applib.annotation.DomainService;
+import org.apache.causeway.applib.annotation.NatureOfService;
+import org.apache.causeway.applib.annotation.PriorityPrecedence;
+import org.apache.causeway.applib.annotation.SemanticsOf;
+
+@Named("university.calc.Calculator")
+@DomainService(nature= NatureOfService.VIEW)
+@Priority(PriorityPrecedence.EARLY)
+@RequiredArgsConstructor(onConstructor_ = {@Inject})
+public class Calculator {
+
+ @Action(semantics = SemanticsOf.SAFE)
+ public int add(int x, int y) {
+ return x+y;
+ }
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
new file mode 100644
index 0000000000..0c48f77378
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+package org.apache.causeway.viewer.graphql.viewer.test.e2e;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.approvaltests.Approvals;
+import org.approvaltests.reporters.DiffReporter;
+import org.approvaltests.reporters.UseReporter;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
+
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.applib.services.bookmark.BookmarkService;
+import org.apache.causeway.commons.internal.base._Strings;
+import org.apache.causeway.commons.internal.collections._Maps;
+import org.apache.causeway.viewer.graphql.viewer.test.CausewayViewerGraphqlTestModuleIntegTestAbstract;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DepartmentRepository;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHeadRepository;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMemberRepository;
+
+import lombok.val;
+
+
+//NOT USING @Transactional since we are running server within same transaction otherwise
+@ActiveProfiles("test")
+public class Abstract_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
+
+ @Inject DepartmentRepository departmentRepository;
+ @Inject DeptHeadRepository deptHeadRepository;
+ @Inject StaffMemberRepository staffMemberRepository;
+ @Inject BookmarkService bookmarkService;
+
+ @BeforeEach
+ void beforeEach(){
+ transactionService.runTransactional(Propagation.REQUIRED, () -> {
+
+ // departments
+ Department classics = departmentRepository.create("Classics", null);
+ Department physics = departmentRepository.create("Physics", null); // no head.
+ Department textiles = departmentRepository.create("Textiles", null);
+ Department pathology = departmentRepository.create("Pathology", null);
+ Department mathematics = departmentRepository.create("Mathematics", null);
+ Department civilEngineering = departmentRepository.create("Civil Engineering", null);
+
+ // heads
+ deptHeadRepository.create("Dr. Barney Jones", classics);
+ deptHeadRepository.create("Prof. Dicky Horwich", textiles);
+ deptHeadRepository.create("Dr. Susan Hopwood", pathology);
+ deptHeadRepository.create("Dr. Helen Johansen", mathematics);
+ deptHeadRepository.create("Dr. George Harwood", civilEngineering);
+
+ // staff
+ staffMemberRepository.create("Letitia Leadbetter", classics);
+ staffMemberRepository.create("Gerry Jones", classics);
+ staffMemberRepository.create("Mervin Hughes", physics);
+ staffMemberRepository.create("John Gartner", physics);
+ staffMemberRepository.create("Margaret Randall", physics);
+
+ });
+ }
+ @AfterEach
+ void afterEach(){
+ transactionService.runTransactional(Propagation.REQUIRED, () -> {
+ staffMemberRepository.removeAll();
+ deptHeadRepository.findAll().forEach(x -> x.setDepartment(null));
+ departmentRepository.findAll().forEach(x -> x.setDeptHead(null));
+ deptHeadRepository.removeAll();
+ departmentRepository.removeAll();
+ });
+ }
+
+
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_disabled_param._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_disabled_param._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_disabled_param._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_disabled_param._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_disabled_param.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_disabled_param.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_disabled_param.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_disabled_param.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_hidden_param._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_hidden_param._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_hidden_param._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_hidden_param._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_hidden_param.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_hidden_param.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.action_with_hidden_param.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.action_with_hidden_param.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.admin_action._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.admin_action._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.admin_action.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.admin_action.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.admin_action.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.java
new file mode 100644
index 0000000000..86fe16157a
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+package org.apache.causeway.viewer.graphql.viewer.test.e2e;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.approvaltests.Approvals;
+import org.approvaltests.reporters.DiffReporter;
+import org.approvaltests.reporters.UseReporter;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
+
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.commons.internal.base._Strings;
+import org.apache.causeway.commons.internal.collections._Maps;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
+
+import lombok.val;
+
+
+//NOT USING @Transactional since we are running server within same transaction otherwise
+@ActiveProfiles("test")
+public class Admin_IntegTest extends Abstract_IntegTest {
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void admin_action() throws Exception {
+
+ // when
+ val response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void action_with_disabled_param() throws Exception {
+
+ // when
+ val response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void action_with_hidden_param() throws Exception {
+
+ // when
+ val response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void other_admin_action() throws Exception {
+
+ // when
+ val response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+ }
+
+
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.other_admin_action._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.other_admin_action._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.other_admin_action.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.other_admin_action.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Admin_IntegTest.other_admin_action.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int._.gql
new file mode 100644
index 0000000000..8acaeb8670
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int._.gql
@@ -0,0 +1,7 @@
+{
+ university_calc_Calculator {
+ add {
+ invoke(x: 1, y: 2)
+ }
+ }
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int.approved.json
new file mode 100644
index 0000000000..15ff5210a1
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int.approved.json
@@ -0,0 +1,9 @@
+{
+ "data" : {
+ "university_calc_Calculator" : {
+ "add" : {
+ "invoke" : 3
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
index bf73968c5f..905088384e 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
@@ -18,28 +18,17 @@
*/
package org.apache.causeway.viewer.graphql.viewer.test.e2e;
-import lombok.val;
-
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.Optional;
-import javax.inject.Inject;
-
-import org.apache.causeway.applib.services.bookmark.Bookmark;
-import org.apache.causeway.applib.services.bookmark.BookmarkService;
-import org.apache.causeway.commons.internal.base._Strings;
-import org.apache.causeway.commons.internal.collections._Maps;
-import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
-import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMemberRepository;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.approvaltests.Approvals;
import org.approvaltests.reporters.DiffReporter;
import org.approvaltests.reporters.UseReporter;
import org.assertj.core.api.Assertions;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
@@ -47,67 +36,19 @@ import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.transaction.annotation.Propagation;
-import org.apache.causeway.viewer.graphql.viewer.test.CausewayViewerGraphqlTestModuleIntegTestAbstract;
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.commons.internal.base._Strings;
+import org.apache.causeway.commons.internal.collections._Maps;
import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
-import org.apache.causeway.viewer.graphql.viewer.test.domain.DepartmentRepository;
import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
-import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHeadRepository;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
-import static org.apache.causeway.commons.internal.assertions._Assert.assertEquals;
-import static org.apache.causeway.commons.internal.assertions._Assert.assertTrue;
+import lombok.val;
//NOT USING @Transactional since we are running server within same transaction otherwise
@ActiveProfiles("test")
-public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
-
- @Inject DepartmentRepository departmentRepository;
- @Inject DeptHeadRepository deptHeadRepository;
- @Inject StaffMemberRepository staffMemberRepository;
- @Inject BookmarkService bookmarkService;
-
- @BeforeEach
- void beforeEach(){
- transactionService.runTransactional(Propagation.REQUIRED, () -> {
-
- // departments
- Department classics = departmentRepository.create("Classics", null);
- Department physics = departmentRepository.create("Physics", null); // no head.
- Department textiles = departmentRepository.create("Textiles", null);
- Department pathology = departmentRepository.create("Pathology", null);
- Department mathematics = departmentRepository.create("Mathematics", null);
- Department civilEngineering = departmentRepository.create("Civil Engineering", null);
-
- // heads
- deptHeadRepository.create("Dr. Barney Jones", classics);
- deptHeadRepository.create("Prof. Dicky Horwich", textiles);
- deptHeadRepository.create("Dr. Susan Hopwood", pathology);
- deptHeadRepository.create("Dr. Helen Johansen", mathematics);
- deptHeadRepository.create("Dr. George Harwood", civilEngineering);
-
- // staff
- staffMemberRepository.create("Letitia Leadbetter", classics);
- staffMemberRepository.create("Gerry Jones", classics);
- staffMemberRepository.create("Mervin Hughes", physics);
- staffMemberRepository.create("John Gartner", physics);
- staffMemberRepository.create("Margaret Randall", physics);
-
- });
- }
- @AfterEach
- void afterEach(){
- transactionService.runTransactional(Propagation.REQUIRED, () -> {
- staffMemberRepository.removeAll();
- deptHeadRepository.findAll().forEach(x -> x.setDepartment(null));
- departmentRepository.findAll().forEach(x -> x.setDeptHead(null));
- deptHeadRepository.removeAll();
- departmentRepository.removeAll();
- });
- }
-
+public class Domain_IntegTest extends Abstract_IntegTest {
@Test
@UseReporter(DiffReporter.class)
@@ -179,6 +120,14 @@ public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAb
Approvals.verify(submit(), jsonOptions());
}
+ @Test
+ @UseReporter(DiffReporter.class)
+ void calculator_add_int() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
@Test
@UseReporter(DiffReporter.class)
void find_department_and_add_staff_members() throws Exception {
@@ -342,50 +291,6 @@ public class Domain_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAb
Approvals.verify(response, jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void admin_action() throws Exception {
-
- // when
- val response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void action_with_disabled_param() throws Exception {
-
- // when
- val response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void action_with_hidden_param() throws Exception {
-
- // when
- val response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void other_admin_action() throws Exception {
-
- // when
- val response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
- }
-
@Test
@UseReporter(DiffReporter.class)
void find_depthead_and_change_name_invalid() throws Exception {
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json
index ba85c2457f..b2a9b6fcd4 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json
@@ -92,6 +92,17 @@
},
"isDeprecated" : false,
"deprecationReason" : null
+ }, {
+ "name" : "university_calc_Calculator",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
}, {
"name" : "university_dept_Departments",
"description" : null,
@@ -22645,6 +22656,303 @@
"interfaces" : [ ],
"enumValues" : null,
"possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator",
+ "description" : null,
+ "fields" : [ {
+ "name" : "add",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__gqlv_action",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__gqlv_action",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validate",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "invoke",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "NON_NULL",
+ "name" : null,
+ "ofType" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ }
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "params",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__gqlv_action_params",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__gqlv_action_params",
+ "description" : null,
+ "fields" : [ {
+ "name" : "x",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__x__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__y__gqlv_action_parameter",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__x__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
+ }, {
+ "kind" : "OBJECT",
+ "name" : "university_calc_Calculator__add__y__gqlv_action_parameter",
+ "description" : null,
+ "fields" : [ {
+ "name" : "hidden",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Boolean",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "validity",
+ "description" : null,
+ "args" : [ {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ }, {
+ "name" : "disabled",
+ "description" : null,
+ "args" : [ {
+ "name" : "x",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ }, {
+ "name" : "y",
+ "description" : null,
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "Int",
+ "ofType" : null
+ },
+ "defaultValue" : null
+ } ],
+ "type" : {
+ "kind" : "SCALAR",
+ "name" : "String",
+ "ofType" : null
+ },
+ "isDeprecated" : false,
+ "deprecationReason" : null
+ } ],
+ "inputFields" : null,
+ "interfaces" : [ ],
+ "enumValues" : null,
+ "possibleTypes" : null
}, {
"kind" : "OBJECT",
"name" : "university_dept_Department",
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json
index 08c8bc031a..5a9fd75724 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json
@@ -759,6 +759,16 @@
"name" : "university_admin_AdminMenu__adminAction__gqlv_action"
}, {
"name" : "university_admin_AdminMenu__otherAdminAction__gqlv_action"
+ }, {
+ "name" : "university_calc_Calculator"
+ }, {
+ "name" : "university_calc_Calculator__add__gqlv_action"
+ }, {
+ "name" : "university_calc_Calculator__add__gqlv_action_params"
+ }, {
+ "name" : "university_calc_Calculator__add__x__gqlv_action_parameter"
+ }, {
+ "name" : "university_calc_Calculator__add__y__gqlv_action_parameter"
}, {
"name" : "university_dept_Department"
}, {
diff --git a/incubator/viewers/graphql/test/src/test/resources/application-test.properties b/incubator/viewers/graphql/test/src/test/resources/application-test.properties
index 1ed5bab4ab..54fc4d657b 100644
--- a/incubator/viewers/graphql/test/src/test/resources/application-test.properties
+++ b/incubator/viewers/graphql/test/src/test/resources/application-test.properties
@@ -1,3 +1,3 @@
-logging.level.org.springframework=DEBUG
-logging.level.graphql=DEBUG
+#logging.level.org.springframework=DEBUG
+#logging.level.graphql=DEBUG
diff --git a/incubator/viewers/graphql/test/src/test/resources/schema.gql b/incubator/viewers/graphql/test/src/test/resources/schema.gql
index 2b7fa5581b..2bdcc40dd4 100644
--- a/incubator/viewers/graphql/test/src/test/resources/schema.gql
+++ b/incubator/viewers/graphql/test/src/test/resources/schema.gql
@@ -28,6 +28,7 @@ type Query {
causeway_security_LogoutMenu: causeway_security_LogoutMenu
numServices: Int
university_admin_AdminMenu: university_admin_AdminMenu
+ university_calc_Calculator: university_calc_Calculator
university_dept_Departments: university_dept_Departments
university_dept_DeptHeads: university_dept_DeptHeads
university_dept_Staff: university_dept_Staff
@@ -2225,6 +2226,35 @@ type university_admin_AdminMenu__otherAdminAction__gqlv_action {
validate: String
}
+type university_calc_Calculator {
+ add: university_calc_Calculator__add__gqlv_action
+}
+
+type university_calc_Calculator__add__gqlv_action {
+ disabled: String
+ hidden: Boolean
+ invoke(x: Int!, y: Int!): Int
+ params: university_calc_Calculator__add__gqlv_action_params
+ validate(x: Int, y: Int): String
+}
+
+type university_calc_Calculator__add__gqlv_action_params {
+ x: university_calc_Calculator__add__x__gqlv_action_parameter
+ y: university_calc_Calculator__add__y__gqlv_action_parameter
+}
+
+type university_calc_Calculator__add__x__gqlv_action_parameter {
+ disabled(x: Int): String
+ hidden: Boolean
+ validity(x: Int): String
+}
+
+type university_calc_Calculator__add__y__gqlv_action_parameter {
+ disabled(x: Int, y: Int): String
+ hidden(x: Int): Boolean
+ validity(y: Int): String
+}
+
type university_dept_Department {
_gql_meta: university_dept_Department__gqlv_meta
addStaffMember: university_dept_Department__addStaffMember__gqlv_action
(causeway) 02/02: CAUSEWAY-3676: splits up tests a little, is all
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 923b3e1e14e52ce475a72e7aaa5d9c266fd7335c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 26 13:26:23 2024 +0000
CAUSEWAY-3676: splits up tests a little, is all
---
.../viewer/test/e2e/Abstract_IntegTest.java | 4 +-
...nt._.gql => Calculator_IntegTest.add_int._.gql} | 0
... => Calculator_IntegTest.add_int.approved.json} | 0
...ma_IntegTest.java => Calculator_IntegTest.java} | 38 +++---
...> Department_IntegTest.create_department._.gql} | 0
...ment_IntegTest.create_department.approved.json} | 0
...st.create_department_name_param_disabled._.gql} | 0
...e_department_name_param_disabled.approved.json} | 0
...epartment_IntegTest.find_all_departments._.gql} | 0
...t_IntegTest.find_all_departments.approved.json} | 0
...department_and_add_staff_members._.choices.gql} | 0
..._department_and_add_staff_members._.invoke.gql} | 0
...department_and_add_staff_members.approved.json} | 0
..._department_and_change_head_autocomplete._.gql} | 0
...ent_and_change_head_autocomplete.approved.json} | 0
....find_department_and_change_head_default._.gql} | 0
...partment_and_change_head_default.approved.json} | 0
....find_department_and_change_name_invalid._.gql} | 0
...partment_and_change_name_invalid.approved.json} | 0
...nd_department_and_edit_head_autocomplete._.gql} | 0
...tment_and_edit_head_autocomplete.approved.json} | 0
...and_edit_head_autocomplete_none_matching._.gql} | 0
..._head_autocomplete_none_matching.approved.json} | 0
...partment_and_remove_staff_member_choices._.gql} | 0
..._and_remove_staff_member_choices.approved.json} | 0
...rtment_IntegTest.find_department_by_name._.gql} | 0
...ntegTest.find_department_by_name.approved.json} | 0
...in_IntegTest.java => Department_IntegTest.java} | 131 +--------------------
..._IntegTest.find_depthead_and_change_name._.gql} | 0
...st.find_depthead_and_change_name.approved.json} | 0
...st.find_depthead_and_change_name_invalid._.gql} | 0
...depthead_and_change_name_invalid.approved.json} | 0
..._depthead_and_change_name_invoke_invalid._.gql} | 0
...d_and_change_name_invoke_invalid.approved.json} | 0
...DeptHead_IntegTest.find_depthead_by_name._.gql} | 0
..._IntegTest.find_depthead_by_name.approved.json} | 0
.../viewer/test/e2e/DeptHead_IntegTest.java | 92 +++++++++++++++
...Test.create_staff_member_with_department._.gql} | 0
...ate_staff_member_with_department.approved.json} | 0
...gTest.find_staff_member_by_name_and_edit._.gql} | 0
...nd_staff_member_by_name_and_edit.approved.json} | 0
...ff_member_by_name_and_edit_grade_choices._.gql} | 0
...r_by_name_and_edit_grade_choices.approved.json} | 0
.../graphql/viewer/test/e2e/Staff_IntegTest.java | 119 +++++++++++++++++++
...IntegTest.staff_member_name_edit_invalid._.gql} | 0
...t.staff_member_name_edit_invalid.approved.json} | 0
...aff_IntegTest.staff_member_name_validate._.gql} | 0
...gTest.staff_member_name_validate.approved.json} | 0
.../test/{e2e => schema}/Schema_IntegTest.java | 2 +-
.../{e2e => schema}/Schema_IntegTest.schema._.gql | 0
.../Schema_IntegTest.schema.approved.json | 0
.../Schema_IntegTest.schema_types_name._.gql | 0
...chema_IntegTest.schema_types_name.approved.json | 0
53 files changed, 238 insertions(+), 148 deletions(-)
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
index 0c48f77378..42b3c13ca1 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Abstract_IntegTest.java
@@ -55,9 +55,7 @@ import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMemberReposito
import lombok.val;
-//NOT USING @Transactional since we are running server within same transaction otherwise
-@ActiveProfiles("test")
-public class Abstract_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
+public abstract class Abstract_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
@Inject DepartmentRepository departmentRepository;
@Inject DeptHeadRepository deptHeadRepository;
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.calculator_add_int.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.add_int.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
similarity index 59%
copy from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java
copy to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
index 21a402fcb8..d9fde489a6 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Calculator_IntegTest.java
@@ -18,39 +18,45 @@
*/
package org.apache.causeway.viewer.graphql.viewer.test.e2e;
-import org.apache.causeway.viewer.graphql.viewer.test.CausewayViewerGraphqlTestModuleIntegTestAbstract;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.approvaltests.Approvals;
import org.approvaltests.reporters.DiffReporter;
import org.approvaltests.reporters.UseReporter;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
-
-import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
+import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
-import static org.apache.causeway.commons.internal.assertions._Assert.assertEquals;
-import static org.apache.causeway.commons.internal.assertions._Assert.assertNotNull;
-import static org.apache.causeway.commons.internal.assertions._Assert.assertTrue;
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.commons.internal.base._Strings;
+import org.apache.causeway.commons.internal.collections._Maps;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
-import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
+import lombok.val;
+//NOT USING @Transactional since we are running server within same transaction otherwise
@ActiveProfiles("test")
-public class Schema_IntegTest extends CausewayViewerGraphqlTestModuleIntegTestAbstract {
+public class Calculator_IntegTest extends Abstract_IntegTest {
@Test
- // @DisabledIfSystemProperty(named = "isRunningWithSurefire", matches = "true")
@UseReporter(DiffReporter.class)
- void schema() throws Exception {
- Approvals.verify(submit(), jsonOptions());
- }
+ void add_int() throws Exception {
- @Test
- @UseReporter(DiffReporter.class)
- void schema_types_name() throws Exception {
+ // when, then
Approvals.verify(submit(), jsonOptions());
}
+
+
}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department_name_param_disabled._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department_name_param_disabled._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department_name_param_disabled._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department_name_param_disabled._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department_name_param_disabled.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department_name_param_disabled.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_department_name_param_disabled.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.create_department_name_param_disabled.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_all_departments._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_all_departments._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_all_departments.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_all_departments.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_all_departments.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members._.choices.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members._.choices.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members._.choices.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members._.choices.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members._.invoke.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members._.invoke.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members._.invoke.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members._.invoke.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_add_staff_members.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_add_staff_members.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_autocomplete._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_autocomplete._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_autocomplete._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_autocomplete._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_autocomplete.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_autocomplete.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_autocomplete.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_autocomplete.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_default._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_default._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_default._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_default._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_default.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_default.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_head_default.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_head_default.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name_invalid._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_name_invalid._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name_invalid._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_name_invalid._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name_invalid.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_name_invalid.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name_invalid.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_change_name_invalid.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_edit_head_autocomplete_none_matching.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_remove_staff_member_choices._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_remove_staff_member_choices._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_remove_staff_member_choices._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_remove_staff_member_choices._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_remove_staff_member_choices.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_remove_staff_member_choices.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_remove_staff_member_choices.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_and_remove_staff_member_choices.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_by_name._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_by_name._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_by_name._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_by_name._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_by_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_by_name.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_by_name.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.find_department_by_name.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.java
similarity index 62%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.java
index 905088384e..e349c4dc4b 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.java
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Department_IntegTest.java
@@ -48,7 +48,7 @@ import lombok.val;
//NOT USING @Transactional since we are running server within same transaction otherwise
@ActiveProfiles("test")
-public class Domain_IntegTest extends Abstract_IntegTest {
+public class Department_IntegTest extends Abstract_IntegTest {
@Test
@UseReporter(DiffReporter.class)
@@ -112,22 +112,6 @@ public class Domain_IntegTest extends Abstract_IntegTest {
Approvals.verify(submit(), jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void find_staff_member_by_name_and_edit_grade_choices() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void calculator_add_int() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
-
@Test
@UseReporter(DiffReporter.class)
void find_department_and_add_staff_members() throws Exception {
@@ -151,66 +135,12 @@ public class Domain_IntegTest extends Abstract_IntegTest {
Assertions.assertThat(ids).hasSize(3);
val replacements = _Maps.unmodifiable(
- "$staffMemberId1", ids.get(0),
- "$staffMemberId2", ids.get(1));
+ "$staffMemberId1", ids.get(0),
+ "$staffMemberId2", ids.get(1));
Approvals.verify(submit("invoke", replacements), jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void find_staff_member_by_name_and_edit() throws Exception {
-
- // given
- final Optional<Bookmark> bookmarkIfAny =
- transactionService.callTransactional(
- Propagation.REQUIRED,
- () -> {
- StaffMember pojo = staffMemberRepository.findByName("Gerry Jones");
- return bookmarkService.bookmarkFor(pojo);
- }
- ).valueAsNullableElseFail();
-
- assertThat(bookmarkIfAny).isPresent();
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
-
- // and in the database...
- final Optional<StaffMember> staffMemberIfAny =
- transactionService.callTransactional(
- Propagation.REQUIRED,
- () -> bookmarkService.lookup(bookmarkIfAny.get(), StaffMember.class)
- ).valueAsNullableElseFail();
-
- assertThat(staffMemberIfAny).isPresent();
- assertThat(staffMemberIfAny.get()).extracting(StaffMember::getName).isEqualTo("Gerald Johns");
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void staff_member_name_validate() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void staff_member_name_edit_invalid() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void find_depthead_by_name() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
-
@Test
@UseReporter(DiffReporter.class)
void find_department_and_change_head_autocomplete() throws Exception {
@@ -219,26 +149,6 @@ public class Domain_IntegTest extends Abstract_IntegTest {
Approvals.verify(submit(), jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void create_staff_member_with_department() throws Exception {
-
- final Bookmark bookmark =
- transactionService.callTransactional(
- Propagation.REQUIRED,
- () -> {
- Department department = departmentRepository.findByName("Classics");
- return bookmarkService.bookmarkFor(department).orElseThrow();
- }
- ).valueAsNonNullElseFail();
-
- val response = submit(_Maps.unmodifiable("$departmentId", bookmark.getIdentifier()));
-
- // then payload
- Approvals.verify(response, jsonOptions());
-
- }
-
@Test
@UseReporter(DiffReporter.class)
void create_department() throws Exception {
@@ -291,23 +201,6 @@ public class Domain_IntegTest extends Abstract_IntegTest {
Approvals.verify(response, jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void find_depthead_and_change_name_invalid() throws Exception {
-
- String response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
- }
-
- @Test
- @UseReporter(DiffReporter.class)
- void find_depthead_and_change_name_invoke_invalid() throws Exception {
-
- // when, then
- Approvals.verify(submit(), jsonOptions());
- }
@Test
@UseReporter(DiffReporter.class)
@@ -317,23 +210,5 @@ public class Domain_IntegTest extends Abstract_IntegTest {
Approvals.verify(submit(), jsonOptions());
}
- @Test
- @UseReporter(DiffReporter.class)
- void find_depthead_and_change_name() throws Exception {
-
- // when lookup 'Prof. Dicky Horwich' and change it to 'Prof. Richard Horwich'
- String response = submit();
-
- // then payload
- Approvals.verify(response, jsonOptions());
-
- // and also in the database
- DeptHead deptHeadAfter = transactionService.callTransactional(
- Propagation.REQUIRED,
- () -> deptHeadRepository.findByName("Prof. Richard Horwich")
- ).valueAsNullableElseFail();
-
- assertThat(deptHeadAfter).isNotNull();
- }
}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invalid._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invalid._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invalid._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invalid._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invalid.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invalid.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invalid.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invalid.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_and_change_name_invoke_invalid.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_by_name._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_by_name._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_by_name._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_by_name._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_by_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_by_name.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_depthead_by_name.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.find_depthead_by_name.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.java
new file mode 100644
index 0000000000..fae67abef7
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/DeptHead_IntegTest.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+package org.apache.causeway.viewer.graphql.viewer.test.e2e;
+
+import java.util.Optional;
+
+import org.approvaltests.Approvals;
+import org.approvaltests.reporters.DiffReporter;
+import org.approvaltests.reporters.UseReporter;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
+
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.commons.internal.collections._Maps;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
+
+import lombok.val;
+
+
+//NOT USING @Transactional since we are running server within same transaction otherwise
+@ActiveProfiles("test")
+public class DeptHead_IntegTest extends Abstract_IntegTest {
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_depthead_by_name() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_depthead_and_change_name_invalid() throws Exception {
+
+ String response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+ }
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_depthead_and_change_name_invoke_invalid() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_depthead_and_change_name() throws Exception {
+
+ // when lookup 'Prof. Dicky Horwich' and change it to 'Prof. Richard Horwich'
+ String response = submit();
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+
+ // and also in the database
+ DeptHead deptHeadAfter = transactionService.callTransactional(
+ Propagation.REQUIRED,
+ () -> deptHeadRepository.findByName("Prof. Richard Horwich")
+ ).valueAsNullableElseFail();
+
+ assertThat(deptHeadAfter).isNotNull();
+ }
+
+
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_staff_member_with_department._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.create_staff_member_with_department._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_staff_member_with_department._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.create_staff_member_with_department._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_staff_member_with_department.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.create_staff_member_with_department.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.create_staff_member_with_department.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.create_staff_member_with_department.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.find_staff_member_by_name_and_edit_grade_choices.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.java
new file mode 100644
index 0000000000..b6977ddba1
--- /dev/null
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.java
@@ -0,0 +1,119 @@
+/*
+ * 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.
+ */
+package org.apache.causeway.viewer.graphql.viewer.test.e2e;
+
+import java.util.Optional;
+
+import org.approvaltests.Approvals;
+import org.approvaltests.reporters.DiffReporter;
+import org.approvaltests.reporters.UseReporter;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
+
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.transaction.annotation.Propagation;
+
+import org.apache.causeway.applib.services.bookmark.Bookmark;
+import org.apache.causeway.commons.internal.collections._Maps;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.Department;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.DeptHead;
+import org.apache.causeway.viewer.graphql.viewer.test.domain.StaffMember;
+
+import lombok.val;
+
+
+//NOT USING @Transactional since we are running server within same transaction otherwise
+@ActiveProfiles("test")
+public class Staff_IntegTest extends Abstract_IntegTest {
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_staff_member_by_name_and_edit_grade_choices() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_staff_member_by_name_and_edit() throws Exception {
+
+ // given
+ final Optional<Bookmark> bookmarkIfAny =
+ transactionService.callTransactional(
+ Propagation.REQUIRED,
+ () -> {
+ StaffMember pojo = staffMemberRepository.findByName("Gerry Jones");
+ return bookmarkService.bookmarkFor(pojo);
+ }
+ ).valueAsNullableElseFail();
+
+ assertThat(bookmarkIfAny).isPresent();
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+
+ // and in the database...
+ final Optional<StaffMember> staffMemberIfAny =
+ transactionService.callTransactional(
+ Propagation.REQUIRED,
+ () -> bookmarkService.lookup(bookmarkIfAny.get(), StaffMember.class)
+ ).valueAsNullableElseFail();
+
+ assertThat(staffMemberIfAny).isPresent();
+ assertThat(staffMemberIfAny.get()).extracting(StaffMember::getName).isEqualTo("Gerald Johns");
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void staff_member_name_validate() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void staff_member_name_edit_invalid() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
+ @Test
+ @UseReporter(DiffReporter.class)
+ void create_staff_member_with_department() throws Exception {
+
+ final Bookmark bookmark =
+ transactionService.callTransactional(
+ Propagation.REQUIRED,
+ () -> {
+ Department department = departmentRepository.findByName("Classics");
+ return bookmarkService.bookmarkFor(department).orElseThrow();
+ }
+ ).valueAsNonNullElseFail();
+
+ val response = submit(_Maps.unmodifiable("$departmentId", bookmark.getIdentifier()));
+
+ // then payload
+ Approvals.verify(response, jsonOptions());
+
+ }
+}
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_edit_invalid._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_edit_invalid._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_edit_invalid._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_edit_invalid._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_edit_invalid.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_edit_invalid.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_edit_invalid.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_edit_invalid.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_validate._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_validate._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_validate._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_validate._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_validate.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_validate.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.staff_member_name_validate.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Staff_IntegTest.staff_member_name_validate.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
similarity index 97%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
index 21a402fcb8..91cb19afd5 100644
--- a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.java
+++ b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.causeway.viewer.graphql.viewer.test.e2e;
+package org.apache.causeway.viewer.graphql.viewer.test.schema;
import org.apache.causeway.viewer.graphql.viewer.test.CausewayViewerGraphqlTestModuleIntegTestAbstract;
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema.approved.json
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name._.gql b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name._.gql
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name._.gql
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name._.gql
diff --git a/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json
similarity index 100%
rename from incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Schema_IntegTest.schema_types_name.approved.json
rename to incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/schema/Schema_IntegTest.schema_types_name.approved.json