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
The following commit(s) were added to refs/heads/CAUSEWAY-3676 by this push:
new aabba8fc06 CAUSEWAY-3676: adds test for individual param validate
aabba8fc06 is described below
commit aabba8fc06d8d962dda8e4e51b9674ed44db9bc5
Author: danhaywood <[email protected]>
AuthorDate: Fri Jan 26 06:20:53 2024 +0000
CAUSEWAY-3676: adds test for individual param validate
---
..._IntegTest.find_department_and_change_name_invalid._.gql | 11 +++++++++++
...st.find_department_and_change_name_invalid.approved.json | 13 +++++++++++++
.../viewer/graphql/viewer/test/e2e/Domain_IntegTest.java | 8 ++++++++
3 files changed, 32 insertions(+)
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/Domain_IntegTest.find_department_and_change_name_invalid._.gql
new file mode 100644
index 0000000000..903f0a06f9
--- /dev/null
+++
b/incubator/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/Domain_IntegTest.find_department_and_change_name_invalid._.gql
@@ -0,0 +1,11 @@
+{
+ university_dept_Departments {
+ findByName {
+ invoke(name: "Classics") {
+ changeName {
+ validate(newName: "A Funny Thing Happened on the Way to the Forum !")
+ }
+ }
+ }
+ }
+}
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/Domain_IntegTest.find_department_and_change_name_invalid.approved.json
new file mode 100644
index 0000000000..bd86c0d952
--- /dev/null
+++
b/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
@@ -0,0 +1,13 @@
+{
+ "data" : {
+ "university_dept_Departments" : {
+ "findByName" : {
+ "invoke" : {
+ "changeName" : {
+ "validate" : "Name cannot contain '!' character"
+ }
+ }
+ }
+ }
+ }
+}
\ 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 517c51eb6c..1042dd435f 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
@@ -131,6 +131,14 @@ public class Domain_IntegTest extends
CausewayViewerGraphqlTestModuleIntegTestAb
Approvals.verify(submit(), jsonOptions());
}
+ @Test
+ @UseReporter(DiffReporter.class)
+ void find_department_and_change_name_invalid() throws Exception {
+
+ // when, then
+ Approvals.verify(submit(), jsonOptions());
+ }
+
@Test
@UseReporter(DiffReporter.class)
void find_staff_member_by_name_and_edit() throws Exception {