Skip to content

Commit

Permalink
reformat test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schmitt committed Mar 13, 2024
1 parent f3614a7 commit 338369c
Showing 1 changed file with 38 additions and 38 deletions.
Expand Up @@ -21,68 +21,68 @@ Feature: Constraint checks on node aggregate disabling
And I am in content repository "default"
And I am user identified by "initiating-user-identifier"
And the command CreateRootWorkspace is executed with payload:
| Key | Value |
| workspaceName | "live" |
| workspaceTitle | "Live" |
| workspaceDescription | "The live workspace" |
| newContentStreamId | "cs-identifier" |
| Key | Value |
| workspaceName | "live" |
| workspaceTitle | "Live" |
| workspaceDescription | "The live workspace" |
| newContentStreamId | "cs-identifier" |
And the graph projection is fully up to date
And I am in the active content stream of workspace "live" and dimension space point {"language":"de"}
And the command CreateRootNodeAggregateWithNode is executed with payload:
| Key | Value |
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.ContentRepository:Root" |
| nodeTypeName | "Neos.ContentRepository:Root" |
And the graph projection is fully up to date
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | tetheredDescendantNodeAggregateIds |
| sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | {"tethered": "nodewyn-tetherton"} |
| nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName | tetheredDescendantNodeAggregateIds |
| sir-david-nodenborough | Neos.ContentRepository.Testing:Document | lady-eleonode-rootford | document | {"tethered": "nodewyn-tetherton"} |

Scenario: Try to disable a node aggregate in a non-existing content stream
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| workspaceName | "i-do-not-exist" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| workspaceName | "i-do-not-exist" |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "ContentStreamDoesNotExistYet"

Scenario: Try to disable a node aggregate in a workspace whose content stream is closed
When the command CloseContentStream is executed with payload:
| Key | Value |
| contentStreamId | "cs-identifier" |
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "ContentStreamIsClosed"

Scenario: Try to disable a non-existing node aggregate
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| nodeAggregateId | "i-do-not-exist" |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "i-do-not-exist" |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "NodeAggregateCurrentlyDoesNotExist"

Scenario: Try to disable a tethered node aggregate
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| nodeAggregateId | "nodewyn-tetherton" |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "nodewyn-tetherton" |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "NodeAggregateIsTethered"

Scenario: Try to disable an already disabled node aggregate
Given the command DisableNodeAggregate is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "de"} |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "de"} |
| nodeVariantSelectionStrategy | "allVariants" |
And the graph projection is fully up to date

# Note: The behavior has been changed with https://github.com/neos/neos-development-collection/pull/4284 and the test was adjusted accordingly
When the command DisableNodeAggregate is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "de"} |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "de"} |
| nodeVariantSelectionStrategy | "allVariants" |
Then I expect exactly 5 events to be published on stream with prefix "ContentStream:cs-identifier"
And event at index 4 is of type "NodeAggregateWasDisabled" with payload:
| Key | Expected |
Expand All @@ -92,16 +92,16 @@ Feature: Constraint checks on node aggregate disabling

Scenario: Try to disable a node aggregate in a non-existing dimension space point
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"undeclared": "undefined"} |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"undeclared": "undefined"} |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "DimensionSpacePointNotFound"

Scenario: Try to disable a node aggregate in a dimension space point it does not cover
When the command DisableNodeAggregate is executed with payload and exceptions are caught:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "en"} |
| nodeVariantSelectionStrategy | "allVariants" |
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| coveredDimensionSpacePoint | {"language": "en"} |
| nodeVariantSelectionStrategy | "allVariants" |
Then the last command should have thrown an exception of type "NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint"

0 comments on commit 338369c

Please sign in to comment.