-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Add test cases for change projection
- Loading branch information
Showing
30 changed files
with
2,747 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...ests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@contentrepository @adapters=DoctrineDBAL | ||
@flowEntities | ||
Feature: Create node generalization variant | ||
|
||
Background: | ||
Given using the following content dimensions: | ||
| Identifier | Values | Generalizations | | ||
| language | de,gsw,fr,en | gsw->de->en, fr | | ||
And using the following node types: | ||
"""yaml | ||
'Neos.ContentRepository.Testing:Node': | ||
properties: | ||
text: | ||
type: string | ||
""" | ||
And using identifier "default", I define a content repository | ||
And I am in content repository "default" | ||
And the command CreateRootWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "live" | | ||
| workspaceTitle | "Live" | | ||
| workspaceDescription | "The live workspace" | | ||
| newContentStreamId | "cs-identifier" | | ||
|
||
And I am in workspace "live" | ||
And I am in dimension space point {"language": "de"} | ||
And I am user identified by "initiating-user-identifier" | ||
And the command CreateRootNodeAggregateWithNode is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeTypeName | "Neos.ContentRepository:Root" | | ||
|
||
And the following CreateNodeAggregateWithNode commands are executed: | ||
| nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | ||
| sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | | ||
| nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | | ||
| sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | | ||
|
||
And the command CreateWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-workspace" | | ||
| baseWorkspaceName | "live" | | ||
| newContentStreamId | "user-cs-id" | | ||
|
||
Scenario: Create node generalization variant of node with | ||
When I am in workspace "user-workspace" and dimension space point {"language":"de"} | ||
And the command CreateNodeVariant is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "sir-david-nodenborough" | | ||
| sourceOrigin | {"language":"de"} | | ||
| targetOrigin | {"language":"en"} | | ||
|
||
Then I expect the ChangeProjection to have no changes in "cs-identifier" | ||
Then I expect the ChangeProjection to have the following changes in "user-cs-id": | ||
| nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | ||
| sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"en"} | | ||
|
||
And the command PublishWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-workspace" | | ||
| newContentStreamId | "new-user-workspace-cs-id" | | ||
|
||
Then I expect the ChangeProjection to have no changes in "cs-identifier" | ||
Then I expect the ChangeProjection to have no changes in "user-cs-id" | ||
Then I expect the ChangeProjection to have no changes in "new-user-workspace-cs-id" |
58 changes: 58 additions & 0 deletions
58
...ests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
@contentrepository @adapters=DoctrineDBAL | ||
@flowEntities | ||
Feature: Create node specialization variant | ||
|
||
Background: | ||
Given using the following content dimensions: | ||
| Identifier | Values | Generalizations | | ||
| language | de,gsw,fr | gsw->de, fr | | ||
And using the following node types: | ||
"""yaml | ||
'Neos.ContentRepository.Testing:Node': | ||
properties: | ||
text: | ||
type: string | ||
""" | ||
And using identifier "default", I define a content repository | ||
And I am in content repository "default" | ||
And the command CreateRootWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "live" | | ||
| workspaceTitle | "Live" | | ||
| workspaceDescription | "The live workspace" | | ||
| newContentStreamId | "cs-identifier" | | ||
|
||
And I am in workspace "live" | ||
And I am in dimension space point {"language": "de"} | ||
And I am user identified by "initiating-user-identifier" | ||
And the command CreateRootNodeAggregateWithNode is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeTypeName | "Neos.ContentRepository:Root" | | ||
|
||
|
||
And the following CreateNodeAggregateWithNode commands are executed: | ||
| nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | ||
| sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | | ||
| nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | | ||
| sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a french text about Sir Nodeward Nodington III"} | | ||
|
||
|
||
And the command CreateWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-workspace" | | ||
| baseWorkspaceName | "live" | | ||
| newContentStreamId | "user-cs-id" | | ||
|
||
Scenario: Create node specialization variant of node | ||
When I am in workspace "user-workspace" and dimension space point {"language":"de"} | ||
And the command CreateNodeVariant is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| sourceOrigin | {"language":"de"} | | ||
| targetOrigin | {"language":"gsw"} | | ||
|
||
Then I expect the ChangeProjection to have the following changes in "user-cs-id": | ||
| nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | ||
| nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | |
81 changes: 81 additions & 0 deletions
81
...ures/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
@contentrepository @adapters=DoctrineDBAL | ||
@flowEntities | ||
Feature: Create node peer variant with internal workspace between live and user workspace | ||
|
||
Background: | ||
Given using the following content dimensions: | ||
| Identifier | Values | Generalizations | | ||
| language | de,gsw,fr | gsw->de, fr | | ||
And using the following node types: | ||
"""yaml | ||
'Neos.ContentRepository.Testing:Node': | ||
properties: | ||
text: | ||
type: string | ||
""" | ||
And using identifier "default", I define a content repository | ||
And I am in content repository "default" | ||
And the command CreateRootWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "live" | | ||
| workspaceTitle | "Live" | | ||
| workspaceDescription | "The live workspace" | | ||
| newContentStreamId | "cs-identifier" | | ||
|
||
And I am in workspace "live" | ||
And I am in dimension space point {"language": "de"} | ||
And I am user identified by "initiating-user-identifier" | ||
And the command CreateRootNodeAggregateWithNode is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeTypeName | "Neos.ContentRepository:Root" | | ||
|
||
|
||
And the following CreateNodeAggregateWithNode commands are executed: | ||
| nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | ||
| sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | | ||
| nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | | ||
| sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | | ||
|
||
And the command CreateWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "internal-workspace" | | ||
| baseWorkspaceName | "live" | | ||
| newContentStreamId | "internal-cs-id" | | ||
|
||
And the command CreateWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-workspace" | | ||
| baseWorkspaceName | "internal-workspace" | | ||
| newContentStreamId | "user-cs-id" | | ||
|
||
Scenario: Create node peer variant of node | ||
|
||
When I am in workspace "internal-workspace" and dimension space point {"language":"de"} | ||
And the command CreateNodeVariant is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| sourceOrigin | {"language":"de"} | | ||
| targetOrigin | {"language":"gsw"} | | ||
|
||
Then I expect the ChangeProjection to have the following changes in "internal-cs-id": | ||
| nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | ||
| nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | | ||
And I expect the ChangeProjection to have no changes in "cs-identifier" | ||
And I expect the ChangeProjection to have no changes in "user-cs-id" | ||
|
||
Scenario: Create node peer variant of node | ||
|
||
When I am in workspace "user-workspace" and dimension space point {"language":"de"} | ||
And the command CreateNodeVariant is executed with payload: | ||
| Key | Value | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| sourceOrigin | {"language":"de"} | | ||
| targetOrigin | {"language":"gsw"} | | ||
|
||
Then I expect the ChangeProjection to have the following changes in "user-cs-id": | ||
| nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | ||
| nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | | ||
And I expect the ChangeProjection to have no changes in "cs-identifier" | ||
And I expect the ChangeProjection to have no changes in "internal-cs-id" |
Oops, something went wrong.