From ea28204af56d75a696fe5b53c8531c65bc297a11 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:24:56 +0200 Subject: [PATCH 1/3] BUGFIX: Dont initialize $currentContentStreamId by default in behat tests --- .../Features/Bootstrap/CRTestSuiteRuntimeVariables.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/CRTestSuiteRuntimeVariables.php b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/CRTestSuiteRuntimeVariables.php index 656e45666cc..f5c2204d01d 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/CRTestSuiteRuntimeVariables.php +++ b/Neos.ContentRepository.TestSuite/Classes/Behavior/Features/Bootstrap/CRTestSuiteRuntimeVariables.php @@ -100,12 +100,8 @@ public function iAmInContentStream(string $contentStreamId): void */ public function iAmInWorkspace(string $workspaceName): void { - $workspace = $this->currentContentRepository->getWorkspaceFinder()->findOneByName(WorkspaceName::fromString($workspaceName)); - if ($workspace === null) { - throw new \Exception(sprintf('Workspace "%s" does not exist, projection not yet up to date?', $workspaceName), 1548149355); - } $this->currentWorkspaceName = WorkspaceName::fromString($workspaceName); - $this->currentContentStreamId = $workspace->currentContentStreamId; + $this->currentContentStreamId = null; } /** From 39c80b06f60afa8258f5dacc8e09616672f56364 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:27:09 +0200 Subject: [PATCH 2/3] TASK: Remove duplicated `And I am in workspace` declarations --- Neos.Neos/Tests/Behavior/Features/FrontendRouting/Basic.feature | 1 - .../Features/FrontendRouting/Lowlevel_ProjectionTests.feature | 2 -- .../Tests/Behavior/Features/FrontendRouting/RouteCache.feature | 1 - 3 files changed, 4 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Basic.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Basic.feature index 7fd0f907f16..640ac7e62bf 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Basic.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Basic.feature @@ -44,7 +44,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime # earl-o-documentbourgh # nody-mc-nodeface # - And I am in workspace "live" and dimension space point {} And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName | | shernode-homes | lady-eleonode-rootford | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "ignore-me"} | node1 | diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Lowlevel_ProjectionTests.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Lowlevel_ProjectionTests.feature index 5cc594dfe6c..66ea98e35e8 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Lowlevel_ProjectionTests.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/Lowlevel_ProjectionTests.feature @@ -222,7 +222,6 @@ Feature: Low level tests covering the inner behavior of the routing projection | "c" | "lady-eleonode-rootford/shernode-homes/c" | "c" | "shernode-homes" | "b" | null | "Neos.Neos:Test.Routing.Page" | Scenario: ab(> b1, b2 > b2a)c => a(> b2 > b2a)b(> b1)c (moving b1 below a) - And I am in workspace "live" and dimension space point {} And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName | | b1 | b | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "b1"} | b1 | @@ -246,7 +245,6 @@ Feature: Low level tests covering the inner behavior of the routing projection | "c" | "lady-eleonode-rootford/shernode-homes/c" | "c" | "shernode-homes" | "b" | null | "Neos.Neos:Test.Routing.Page" | Scenario: ab(> b1, b2 > b2a)c => b(> b1, a, b2 > b2a)c (moving a below b) - And I am in workspace "live" and dimension space point {} And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName | | b1 | b | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "b1"} | b1 | diff --git a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/RouteCache.feature b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/RouteCache.feature index 8b3cc7b67ba..50e79bdb170 100644 --- a/Neos.Neos/Tests/Behavior/Features/FrontendRouting/RouteCache.feature +++ b/Neos.Neos/Tests/Behavior/Features/FrontendRouting/RouteCache.feature @@ -43,7 +43,6 @@ Feature: Route cache invalidation # earl-o-documentbourgh # nody-mc-nodeface # - And I am in workspace "live" and dimension space point {} And the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName | | shernode-homes | lady-eleonode-rootford | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "ignore-me"} | node1 | From 0f199f363ff4a438d60d932e628640572384bcd5 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 24 Jun 2024 08:53:51 +0200 Subject: [PATCH 3/3] TASK: Cleanup for #5163 remove now obsolete step --- .../Features/ContentCache/NodesInUserWorkspace.feature | 3 --- 1 file changed, 3 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature b/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature index 887ed3f1135..fd8a7da3e11 100644 --- a/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature +++ b/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature @@ -128,9 +128,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing when applied in us When the command DiscardWorkspace is executed with payload: | Key | Value | | workspaceName | "user-editor" | - # FIXME we have to reevaluated the step as we cache the $currentContentStreamId and it will be outdated after the discard - # see https://github.com/neos/neos-development-collection/pull/5162 - And I am in workspace "user-editor" and dimension space point {} Then I expect node aggregate identifier "text-node-middle" to lead to no node When I execute the following Fusion code: