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/02/13 20:01:30 UTC

(causeway) branch CAUSEWAY-3676 updated: CAUSEWAY-3676: fixes (?) integ test, line endings, doh

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 0ba9fa511e CAUSEWAY-3676: fixes (?) integ test, line endings, doh
0ba9fa511e is described below

commit 0ba9fa511e90e2c89a221454704a6cf110458a23
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Feb 13 20:00:31 2024 +0000

    CAUSEWAY-3676: fixes (?) integ test, line endings, doh
---
 .../java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java | 3 ++-
 .../Staff_IntegTest.create_staff_member_with_department.approved.json  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
index 7b140d9a12..15181e1c19 100644
--- a/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
+++ b/viewers/graphql/model/src/main/java/org/apache/causeway/viewer/graphql/model/domain/GqlvMeta.java
@@ -195,8 +195,9 @@ public class GqlvMeta extends GqlvAbstractCustom {
                         val facet = managedObject.getSpecification().getFacet(GridFacet.class);
                         return facet != null ? facet.getGrid(managedObject) : null;
                     })
-                    .filter(Objects::nonNull)
+                    .filter(obj -> Objects.nonNull(obj))
                     .map(JaxbUtils::toStringUtf8)
+                    .map(x -> x.replaceAll("(\r\n)", "\n"))
                     .orElse(null);
         }
 
diff --git a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
index 0bbcc6c085..5a06846af8 100644
--- a/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
+++ b/viewers/graphql/test/src/test/java/org/apache/causeway/viewer/graphql/viewer/test/e2e/queryandmutations/Staff_IntegTest.create_staff_member_with_department.approved.json
@@ -33,7 +33,7 @@
                 "version" : null,
                 "cssClass" : null,
                 "iconName" : null,
-                "grid" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bs:grid xmlns:bs=\"https://causeway.apache.org/applib/layout/grid/bootstrap3\" xmlns:lnk=\"https://causeway.apache.org/applib/layout/links\" xmlns:cpt=\"https://causeway.apache.org/applib/layout/component\">\r\n    <bs:row>\r\n        <bs:col span=\"12\" unreferencedActions=\"true\">\r\n            <cpt:domainObject bookmarking=\"AS_ROOT\"/>\r\n        </bs:col>\r\n    </bs:row>\r\n    <bs:row>\r\n        <bs:col span=\ [...]
+                "grid" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bs:grid xmlns:bs=\"https://causeway.apache.org/applib/layout/grid/bootstrap3\" xmlns:lnk=\"https://causeway.apache.org/applib/layout/links\" xmlns:cpt=\"https://causeway.apache.org/applib/layout/component\">\n    <bs:row>\n        <bs:col span=\"12\" unreferencedActions=\"true\">\n            <cpt:domainObject bookmarking=\"AS_ROOT\"/>\n        </bs:col>\n    </bs:row>\n    <bs:row>\n        <bs:col span=\"4\">\n        [...]
               }
             }
           }