Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: NodeMigration with target workspace #4685

Merged
merged 17 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Feature: Add Dimension Specialization
And the graph projection is fully up to date
And I am in workspace "live"
And the command CreateRootNodeAggregateWithNode is executed with payload:
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.ContentRepository:Root" |
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.ContentRepository:Root" |
And the graph projection is fully up to date
# Node /document
When the command CreateNodeAggregateWithNode is executed with payload:
Expand All @@ -60,7 +60,7 @@ Feature: Add Dimension Specialization
Given I change the content dimensions in content repository "default" to:
| Identifier | Values | Generalizations |
| language | mul, de, ch | ch->de->mul |
When I run the following node migration for workspace "live", creating content streams "migration-cs":
When I run the following node migration for workspace "live", creating target workspace "migration-workspace", without publishing on success:
"""yaml
migration:
-
Expand All @@ -74,7 +74,7 @@ Feature: Add Dimension Specialization
# the original content stream has not been touched
When I am in workspace "live"
And I am in dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node cs-identifier;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
dlubitz marked this conversation as resolved.
Show resolved Hide resolved
And I expect this node to be of type "Neos.ContentRepository.Testing:Document"
And I expect this node to have the following properties:
| Key | Value |
Expand All @@ -84,14 +84,14 @@ Feature: Add Dimension Specialization


# now, we find the node underneath both DimensionSpacePoints
When I am in content stream "migration-cs" and dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"}
When I am in workspace "migration-workspace" and dimension space point {"language": "de"}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "hello" |
When I am in content stream "migration-cs" and dimension space point {"language": "ch"}
When I am in workspace "migration-workspace" and dimension space point {"language": "ch"}
# shine through added
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to be of type "Neos.ContentRepository.Testing:Document"
And I expect this node to have the following properties:
| Key | Value |
Expand All @@ -104,28 +104,28 @@ Feature: Add Dimension Specialization
# finally, we MODIFY the node and ensure that the modification is visible in both DSPs (as otherwise the shine through would not have worked
# as expected)
# migration-cs is the actual name of the temporary workspace
And I am in workspace "migration-cs"
And I am in workspace "migration-workspace"
And the command SetNodeProperties is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| originDimensionSpacePoint | {"language": "de"} |
| propertyValues | {"text": "changed"} |
And the graph projection is fully up to date
When I am in content stream "migration-cs" and dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"}
When I am in workspace "migration-workspace" and dimension space point {"language": "de"}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "changed" |
When I am in content stream "migration-cs" and dimension space point {"language": "ch"}
When I am in workspace "migration-workspace" and dimension space point {"language": "ch"}
# ch shines through to the DE node
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "changed" |

# the original content stream was untouched
When I am in workspace "live" and dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node cs-identifier;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "hello" |
Expand All @@ -148,15 +148,15 @@ Feature: Add Dimension Specialization
When I am in workspace "live" and dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
When VisibilityConstraints are set to "withoutRestrictions"
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node cs-identifier;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
When VisibilityConstraints are set to "frontend"

# we change the dimension configuration
When I change the content dimensions in content repository "default" to:
| Identifier | Values | Generalizations |
| language | mul, de, ch | ch->de->mul |

When I run the following node migration for workspace "live", creating content streams "migration-cs":
When I run the following node migration for workspace "live", creating target workspace "migration-workspace", without publishing on success:
"""yaml
migration:
-
Expand All @@ -169,17 +169,17 @@ Feature: Add Dimension Specialization
"""

# the original content stream has not been touched
When I am in content stream "cs-identifier" and dimension space point {"language": "de"}
When I am in workspace "migration-workspace" and dimension space point {"language": "de"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
When VisibilityConstraints are set to "withoutRestrictions"
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node cs-identifier;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
When VisibilityConstraints are set to "frontend"

# The visibility edges were modified
When I am in content stream "migration-cs" and dimension space point {"language": "ch"}
When I am in workspace "migration-workspace" and dimension space point {"language": "ch"}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
When VisibilityConstraints are set to "withoutRestrictions"
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{"language": "de"}
Then I get the node with id "sir-david-nodenborough"
When VisibilityConstraints are set to "frontend"

When I run integrity violation detection
Expand All @@ -199,7 +199,7 @@ Feature: Add Dimension Specialization
| sourceOrigin | {"language":"de"} |
| targetOrigin | {"language":"en"} |

When I run the following node migration for workspace "live", creating content streams "migration-cs" and exceptions are caught:
When I run the following node migration for workspace "live", creating target workspace "migration-workspace" and exceptions are caught:
"""yaml
migration:
-
Expand All @@ -213,7 +213,7 @@ Feature: Add Dimension Specialization
Then the last command should have thrown an exception of type "DimensionSpacePointAlreadyExists"

Scenario: Error case - the target dimension is not configured
When I run the following node migration for workspace "live", creating content streams "migration-cs" and exceptions are caught:
When I run the following node migration for workspace "live", creating target workspace "migration-workspace" and exceptions are caught:
"""yaml
migration:
-
Expand All @@ -232,7 +232,7 @@ Feature: Add Dimension Specialization
| Identifier | Values | Generalizations |
| language | mul, de, foo | de->mul |

When I run the following node migration for workspace "live", creating content streams "migration-cs" and exceptions are caught:
When I run the following node migration for workspace "live", creating target workspace "migration-workspace" and exceptions are caught:
"""yaml
migration:
-
Expand All @@ -251,7 +251,7 @@ Feature: Add Dimension Specialization
| Identifier | Values | Generalizations |
| language | mul, de, foo | de->mul, foo->mul |

When I run the following node migration for workspace "live", creating content streams "migration-cs" and exceptions are caught:
When I run the following node migration for workspace "live", creating target workspace "migration-workspace" and exceptions are caught:
"""yaml
migration:
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Feature: Add New Property


Scenario: Fixed newValue
When I run the following node migration for workspace "live", creating content streams "migration-cs":
When I run the following node migration for workspace "live", creating target workspace "migration-workspace", without publishing on success:
"""yaml
migration:
-
Expand All @@ -76,17 +76,17 @@ Feature: Add New Property
"""
# the original content stream has not been touched
When I am in workspace "live" and dimension space point {}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node cs-identifier;sir-david-nodenborough;{}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "Original text" |

When I am in content stream "migration-cs" and dimension space point {}
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to node migration-cs;sir-david-nodenborough;{}
When I am in workspace "migration-workspace" and dimension space point {}
Then I get the node with id "sir-david-nodenborough"
And I expect this node to have the following properties:
| Key | Value |
| text | "Original text" |
Then I expect node aggregate identifier "other" to lead to node migration-cs;other;{}
Then I get the node with id "other"
And I expect this node to have the following properties:
| Key | Value |
| text | "fixed value" |
Expand Down
Loading
Loading