Skip to content

Commit

Permalink
TASK: Adjusts TestSuite to be synchronous
Browse files Browse the repository at this point in the history
This change was partially ported from neos/neos-development-collection#4988

Following things have been adjusted:

- Removal of the step: The graph projection is fully up to date
  - remove lastCommandOrEventResult
- Removal of the step: The documenturipath projection is up to date
- Use injected Connection in tests instead of DoctrineDbalClient (this will be fully refactored in #4988)
  • Loading branch information
mhsdesign committed May 17, 2024
1 parent bddc9c3 commit b31b195
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 174 deletions.
1 change: 0 additions & 1 deletion Tests/Behavior/Features/Bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function __construct()
$this->contentRepositoryRegistry = $this->getObject(ContentRepositoryRegistry::class);
$this->persistenceManager = $this->getObject(PersistenceManagerInterface::class);

$this->setupCRTestSuiteTrait();
}

/*
Expand Down
12 changes: 0 additions & 12 deletions Tests/Behavior/Features/Bootstrap/RoutingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,6 @@ public function anAssetExists(string $assetIdentifier, string $fileName, string
$persistenceManager->clearState();
}

/**
* @When The documenturipath projection is up to date
*/
public function theDocumenturipathProjectionIsUpToDate(): void
{
if ($this->lastCommandOrEventResult === null) {
// we just blocked in "The graph projection is up to date"
return;
}
$this->lastCommandOrEventResult->block();
}

/**
* @When I am on URL :url
*/
Expand Down
1 change: 0 additions & 1 deletion Tests/Behavior/Features/ContentCache/Assets.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on asset changes
| Key | Value |
| nodeAggregateId | "root" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| a | root | Neos.Neos:Site | {} | site |
Expand Down
5 changes: 0 additions & 5 deletions Tests/Behavior/Features/ContentCache/ConvertUris.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on DynamicNodeTag
| Key | Value |
| nodeAggregateId | "root" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| a | root | Neos.Neos:Site | {} | a |
Expand Down Expand Up @@ -118,8 +117,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on DynamicNodeTag
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"uriPathSegment": "a1-new"} |
And the graph projection is fully up to date
And The documenturipath projection is up to date

And the Fusion context node is a2
And I execute the following Fusion code:
Expand Down Expand Up @@ -155,8 +152,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on DynamicNodeTag
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"uriPathSegment": "a1-new"} |
And the graph projection is fully up to date
And The documenturipath projection is up to date

And I am in workspace "live" and dimension space point {}
And the Fusion context node is a2
Expand Down
6 changes: 0 additions & 6 deletions Tests/Behavior/Features/ContentCache/Nodes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| Key | Value |
| nodeAggregateId | "root" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| a | root | Neos.Neos:Site | {} | site |
Expand Down Expand Up @@ -133,7 +132,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"title": "Node a1 new"} |
And the graph projection is fully up to date

And the Fusion context node is a1
And I execute the following Fusion code:
Expand Down Expand Up @@ -167,7 +165,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a2" |
| propertyValues | {"title": "Node a2 new"} |
And the graph projection is fully up to date

And the Fusion context node is a1
And I execute the following Fusion code:
Expand Down Expand Up @@ -202,7 +199,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a3" |
| propertyValues | {"title": "Node a3 new"} |
And the graph projection is fully up to date

And the Fusion context node is a1
And I execute the following Fusion code:
Expand Down Expand Up @@ -236,7 +232,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"title": "Node a1 new"} |
And the graph projection is fully up to date

And the Fusion context node is a2
And I execute the following Fusion code:
Expand Down Expand Up @@ -269,7 +264,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1-1" |
| propertyValues | {"title": "Node a1-1 new"} |
And the graph projection is fully up to date

And the Fusion context node is "a1"
And I execute the following Fusion code:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| Key | Value |
| nodeAggregateId | "root" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| a | root | Neos.Neos:Site | {} | site |
Expand Down Expand Up @@ -141,7 +140,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"title": "Node a1 new"} |
And the graph projection is fully up to date

And I am in workspace "live" and dimension space point {}
And the Fusion context node is a1
Expand Down Expand Up @@ -177,7 +175,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a2" |
| propertyValues | {"title": "Node a2 new"} |
And the graph projection is fully up to date

And I am in workspace "live" and dimension space point {}
And the Fusion context node is a1
Expand Down Expand Up @@ -213,7 +210,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1" |
| propertyValues | {"title": "Node a1 new"} |
And the graph projection is fully up to date

And I am in workspace "live" and dimension space point {}
And the Fusion context node is a2
Expand Down Expand Up @@ -249,7 +245,6 @@ Feature: Tests for the ContentCacheFlusher and cache flushing on node and nodety
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "a1-1" |
| propertyValues | {"title": "Node a1-1 new"} |
And the graph projection is fully up to date

And I am in workspace "live" and dimension space point {}
And the Fusion context node is "a1"
Expand Down
7 changes: 0 additions & 7 deletions Tests/Behavior/Features/FrontendRouting/Basic.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date

# lady-eleonode-rootford
# shernode-homes
Expand Down Expand Up @@ -66,7 +65,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
resolver:
factoryClassName: Neos\Neos\FrontendRouting\DimensionResolution\Resolver\NoopResolverFactory
"""
And The documenturipath projection is up to date

Scenario: Match homepage URL
When I am on URL "/"
Expand Down Expand Up @@ -94,7 +92,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
| nodeAggregateId | "sir-david-nodenborough" |
| originDimensionSpacePoint | {} |
| propertyValues | {"uriPathSegment": "david-nodenborough-updated"} |
And The documenturipath projection is up to date
And I am on URL "/"
Then the node "sir-david-nodenborough" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/david-nodenborough-updated"
And the node "earl-o-documentbourgh" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/david-nodenborough-updated/earl-document"
Expand All @@ -105,13 +102,11 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
| nodeAggregateId | "sir-david-nodenborough" |
| originDimensionSpacePoint | {} |
| propertyValues | {"uriPathSegment": "david-nodenborough-updated-a"} |
And The documenturipath projection is up to date
When the command SetNodeProperties is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| originDimensionSpacePoint | {} |
| propertyValues | {"uriPathSegment": "david-nodenborough-updated-b"} |
And The documenturipath projection is up to date

And I am on URL "/"
Then the node "sir-david-nodenborough" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/david-nodenborough-updated-b"
Expand All @@ -131,7 +126,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
| dimensionSpacePoint | {} |
| newParentNodeAggregateId | "shernode-homes" |
| newSucceedingSiblingNodeAggregateId | null |
And The documenturipath projection is up to date
And I am on URL "/earl-document"
Then the matched node should be "earl-o-documentbourgh" in content stream "cs-identifier" and dimension "{}"
And the node "earl-o-documentbourgh" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/earl-document"
Expand All @@ -143,7 +137,6 @@ Feature: Basic routing functionality (match & resolve document nodes in one dime
| dimensionSpacePoint | {} |
| newParentNodeAggregateId | "earl-o-documentbourgh" |
| newSucceedingSiblingNodeAggregateId | null |
And The documenturipath projection is up to date
And I am on URL "/david-nodenborough/earl-document/nody"
Then the matched node should be "nody-mc-nodeface" in content stream "cs-identifier" and dimension "{}"
And the node "nody-mc-nodeface" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/david-nodenborough/earl-document/nody"
24 changes: 0 additions & 24 deletions Tests/Behavior/Features/FrontendRouting/Dimensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Feature: Routing functionality with multiple content dimensions
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| sir-david-nodenborough | lady-eleonode-rootford | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "ignore-me"} | node1 |
Expand All @@ -59,7 +58,6 @@ Feature: Routing functionality with multiple content dimensions
| nodeAggregateId | "carl-destinode" |
| sourceOrigin | {"market":"DE", "language":"en"} |
| targetOrigin | {"market":"DE", "language":"de"} |
And the graph projection is fully up to date
And the command SetNodeProperties is executed with payload:
| Key | Value |
| nodeAggregateId | "carl-destinode" |
Expand Down Expand Up @@ -94,9 +92,6 @@ Feature: Routing functionality with multiple content dimensions
DE: ''
"""

And the graph projection is fully up to date
And The documenturipath projection is up to date

Scenario: Resolve homepage URL in multiple dimensions
When I am on URL "/"
Then the node "sir-david-nodenborough" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"en"}' should resolve to URL "/"
Expand Down Expand Up @@ -207,8 +202,6 @@ Feature: Routing functionality with multiple content dimensions
When the command PublishWorkspace is executed with payload:
| Key | Value |
| workspaceName | "migration-cs" |
And the graph projection is fully up to date
And The documenturipath projection is up to date

When I am on URL "/"
Then the node "carl-destinode" in content stream "cs-identifier" and dimension '{"market":"CH", "language":"en"}' should resolve to URL "/nody/carl"
Expand Down Expand Up @@ -278,8 +271,6 @@ Feature: Routing functionality with multiple content dimensions
When the command PublishWorkspace is executed with payload:
| Key | Value |
| workspaceName | "migration-cs" |
And the graph projection is fully up to date
And The documenturipath projection is up to date

When I am on URL "/"
And the node "carl-destinode" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"de"}' should resolve to URL "/de/nody/karl-de"
Expand All @@ -292,7 +283,6 @@ Feature: Routing functionality with multiple content dimensions
| nodeAggregateId | "carl-destinode" |
| originDimensionSpacePoint | {"market":"DE", "language":"de"} |
| propertyValues | {"uriPathSegment": "karl-aktualisiert"} |
And The documenturipath projection is up to date
When I am on URL "/"
And the node "carl-destinode" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"de"}' should resolve to URL "/de/nody/karl-aktualisiert"
# testcase for #4256
Expand Down Expand Up @@ -333,29 +323,23 @@ Feature: Routing functionality with multiple content dimensions
And the command UpdateRootNodeAggregateDimensions is executed with payload:
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
And the graph projection is fully up to date
# create variant for fr and sites node
When the command CreateNodeVariant is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| sourceOrigin | {"market":"DE", "language":"en"} |
| targetOrigin | {"market":"DE", "language":"fr"} |
And the graph projection is fully up to date
When the command CreateNodeVariant is executed with payload:
| Key | Value |
| nodeAggregateId | "nody-mc-nodeface" |
| sourceOrigin | {"market":"DE", "language":"en"} |
| targetOrigin | {"market":"DE", "language":"fr"} |

And the graph projection is fully up to date
And the command SetNodeProperties is executed with payload:
| Key | Value |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {"market":"DE", "language":"fr"} |
| propertyValues | {"uriPathSegment": "nody-fr"} |

And the graph projection is fully up to date

When I am on URL "/"
Then the node "sir-david-nodenborough" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"fr"}' should resolve to URL "/fr/"
Then the node "nody-mc-nodeface" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"fr"}' should resolve to URL "/fr/nody-fr"
Expand Down Expand Up @@ -395,28 +379,23 @@ Feature: Routing functionality with multiple content dimensions
And the command UpdateRootNodeAggregateDimensions is executed with payload:
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
And the graph projection is fully up to date
# create variant for fr and sites node
When the command CreateNodeVariant is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| sourceOrigin | {"market":"DE", "language":"en"} |
| targetOrigin | {"market":"DE", "language":"fr"} |
And the graph projection is fully up to date
When the command CreateNodeVariant is executed with payload:
| Key | Value |
| nodeAggregateId | "nody-mc-nodeface" |
| sourceOrigin | {"market":"DE", "language":"en"} |
| targetOrigin | {"market":"DE", "language":"fr"} |

And the graph projection is fully up to date

And the command SetNodeProperties is executed with payload:
| Key | Value |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {"market":"DE", "language":"fr"} |
| propertyValues | {"uriPathSegment": "nody-fr"} |
And the graph projection is fully up to date

When the command MoveNodeAggregate is executed with payload:
| Key | Value |
Expand All @@ -425,9 +404,6 @@ Feature: Routing functionality with multiple content dimensions
| newParentNodeAggregateId | "lady-eleonode-rootford" |
| newSucceedingSiblingNodeAggregateId | null |
| relationDistributionStrategy | "scatter" |
And The documenturipath projection is up to date

And the graph projection is fully up to date

When I am on URL "/"
Then the node "sir-david-nodenborough" in content stream "cs-identifier" and dimension '{"market":"DE", "language":"en"}' should resolve to URL "/"
Expand Down
Loading

0 comments on commit b31b195

Please sign in to comment.