Skip to content

Commit

Permalink
Merge pull request #5162 from mhsdesign/bugfix/dont-initialize-curren…
Browse files Browse the repository at this point in the history
…t-content-stream-id-by-default-in-tests

BUGFIX: Dont initialize $currentContentStreamId by default in behat tests
  • Loading branch information
mhsdesign authored Jun 27, 2024
2 parents f7e93b0 + 0f199f3 commit acbacd7
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit acbacd7

Please sign in to comment.