From d9772d379ed84b9a29c116a1bb16bc0172666ce3 Mon Sep 17 00:00:00 2001 From: Martin Ficzel Date: Sun, 22 Dec 2024 13:58:02 +0100 Subject: [PATCH] TASK: Add site nodeName to testcases to avoid relying on invalid behavior The projection detects site nodes that should have an empty path by verifying that the parent is a root node and they have a nodeName. --- .../Features/FrontendRouting/NodeCreationEdgeCases.feature | 1 + .../Features/FrontendRouting/NodeVariationEdgeCases.feature | 3 +++ .../Behavior/Features/FrontendRouting/PartialPublish.feature | 5 +++-- .../Features/FrontendRouting/UnknownNodeTypes.feature | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeCreationEdgeCases.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeCreationEdgeCases.feature index 747782161d1..85123832651 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeCreationEdgeCases.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeCreationEdgeCases.feature @@ -36,6 +36,7 @@ Feature: Test cases for node creation edge cases | nodeTypeName | "Neos.Neos:Site" | | parentNodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"example":"source"} | + | nodeName | "site" | And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | succeedingSiblingNodeAggregateId | nodeTypeName | initialPropertyValues | # Let's prepare some siblings to check orderings. Also, everything gets better with siblings. diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeVariationEdgeCases.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeVariationEdgeCases.feature index 7e4d76f0ca2..b049cef11b4 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeVariationEdgeCases.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/NodeVariationEdgeCases.feature @@ -36,6 +36,7 @@ Feature: Test cases for node variation edge cases | nodeTypeName | "Neos.Neos:Site" | | parentNodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"example":"source"} | + | nodeName | "site" | And the command CreateNodeVariant is executed with payload: | Key | Value | | nodeAggregateId | "shernode-homes" | @@ -135,6 +136,7 @@ Feature: Test cases for node variation edge cases | nodeTypeName | "Neos.Neos:Site" | | parentNodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"example":"rootGeneral"} | + | nodeName | "site" | And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | originDimensionSpacePoint | nodeName | parentNodeAggregateId | succeedingSiblingNodeAggregateId | nodeTypeName | initialPropertyValues | # Let's create some siblings, both in source and target, to check ordering @@ -225,6 +227,7 @@ Feature: Test cases for node variation edge cases | nodeTypeName | "Neos.Neos:Site" | | parentNodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"example":"source"} | + | nodeName | "site" | And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | succeedingSiblingNodeAggregateId | nodeTypeName | initialPropertyValues | # Let's create our test subject... diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/PartialPublish.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/PartialPublish.feature index 803b0e8b5eb..322a1346e6e 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/PartialPublish.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/PartialPublish.feature @@ -36,6 +36,7 @@ Feature: Test cases for partial publish to live and uri path generation | nodeTypeName | "Neos.Neos:Site" | | parentNodeAggregateId | "lady-eleonode-rootford" | | originDimensionSpacePoint | {"example":"source"} | + | nodeName | "site" | And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "myworkspace" | @@ -49,7 +50,7 @@ Feature: Test cases for partial publish to live and uri path generation | nodeTypeName | "Neos.Neos:Document" | | parentNodeAggregateId | "shernode-homes" | | originDimensionSpacePoint | {"example":"source"} | - | properties | {"uriPathSegment": "just"}| + | initialPropertyValues | {"uriPathSegment": "just"}| | workspaceName | "myworkspace" | And the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | @@ -65,4 +66,4 @@ Feature: Test cases for partial publish to live and uri path generation | "65901ded4f068dac14ad0dce4f459b29" | "" | "lady-eleonode-rootford" | "lady-eleonode-rootford" | null | null | null | "Neos.Neos:Sites" | | "fbe53ddc3305685fbb4dbf529f283a0e" | "" | "lady-eleonode-rootford" | "lady-eleonode-rootford" | null | null | null | "Neos.Neos:Sites" | | "65901ded4f068dac14ad0dce4f459b29" | "" | "lady-eleonode-rootford/shernode-homes" | "shernode-homes" | "lady-eleonode-rootford" | null | null | "Neos.Neos:Site" | - | "65901ded4f068dac14ad0dce4f459b29" | "" | "lady-eleonode-rootford/shernode-homes/justsomepage" | "justsomepage" | "shernode-homes" | null | null | "Neos.Neos:Document" | + | "65901ded4f068dac14ad0dce4f459b29" | "just" | "lady-eleonode-rootford/shernode-homes/justsomepage" | "justsomepage" | "shernode-homes" | null | null | "Neos.Neos:Document" | diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/UnknownNodeTypes.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/UnknownNodeTypes.feature index 904990f72db..040b41d2880 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/UnknownNodeTypes.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/UnknownNodeTypes.feature @@ -39,6 +39,7 @@ Feature: Basic routing functionality (match & resolve nodes with unknown types) | nodeTypeName | "Neos.Neos:Test.Routing.Page" | | parentNodeAggregateId | "lady-eleonode-rootford" | | nodeAggregateClassification | "regular" | + | nodeName | "site" | And the event NodeAggregateWithNodeWasCreated was published with payload: | Key | Value | | workspaceName | "live" |