From 1fbc49179eb8dcdfe8c56a5b4b84aa84b8516ef4 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Nov 2024 17:50:51 +0100 Subject: [PATCH 1/6] BUGFIX: Fix typos --- .../01-DiscardWorkspace_WithoutDimensions.feature | 2 +- ...iscardIndividualNodesFromWorkspace_WithoutDimensions.feature | 2 +- ...4-DiscardIndividualNodesFromWorkspace_WithDimensions.feature | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature index 63909ce8de8..fd633631147 100644 --- a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature @@ -1,6 +1,6 @@ @contentrepository @adapters=DoctrineDBAL @flowEntities -Feature: Discard workspace without dimensions +Feature: Discard workspace without dimensions Background: Given using no content dimensions diff --git a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature index 059182db7bb..1f9927aeb50 100644 --- a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -1,6 +1,6 @@ @contentrepository @adapters=DoctrineDBAL @flowEntities -Feature: Publish nodes partially without dimensions +Feature: Discard nodes partially without dimensions Background: Given using no content dimensions diff --git a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature index e6b4bbb2628..e34fcaa0303 100644 --- a/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/AssetUsage/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature @@ -1,6 +1,6 @@ @contentrepository @adapters=DoctrineDBAL @flowEntities -Feature: Publish nodes partially with dimensions +Feature: Discard nodes partially with dimensions Background: Given using the following content dimensions: From 62b5bf1c315fd6ea1b9c16c87d13aea8580517f9 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Nov 2024 17:51:16 +0100 Subject: [PATCH 2/6] FEATURE: Add test cases for change projection --- .../Bootstrap/ChangeProjectionTrait.php | 82 ++++++++ .../Features/Bootstrap/FeatureContext.php | 1 + ...ggregateWithNode_WithoutDimensions.feature | 68 +++++++ ...deAggregateWithNode_WithDimensions.feature | 94 +++++++++ ...PublishWorkspace_WithoutDimensions.feature | 106 ++++++++++ ...02-PublishWorkspace_WithDimensions.feature | 172 ++++++++++++++++ ...desFromWorkspace_WithoutDimensions.feature | 115 +++++++++++ ...lNodesFromWorkspace_WithDimensions.feature | 189 ++++++++++++++++++ 8 files changed, 827 insertions(+) create mode 100644 Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php new file mode 100644 index 00000000000..1e03be7f3b7 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php @@ -0,0 +1,82 @@ + $className + * + * @return T + */ + abstract private function getObject(string $className): object; + + /** + * @Then I expect the ChangeProjection to have the following changes in :contentStreamId: + */ + public function iExpectTheChangeProjectionToHaveTheFollowingChangesInContentStream(TableNode $table, string $contentStreamId) + { + $changeFinder = $this->currentContentRepository->projectionState(ChangeFinder::class); + $changes = $changeFinder->findByContentStreamId(ContentStreamId::fromString($contentStreamId)); + + $tableRows = $table->getHash(); + foreach ($changes as $change) { + foreach ($tableRows as $tableRowIndex => $tableRow) { + if (!$change->nodeAggregateId->equals(NodeAggregateId::fromString($tableRow['nodeAggregateId'])) + || $change->created !== (bool)$tableRow['created'] + || $change->deleted !== (bool)$tableRow['deleted'] + || $change->changed !== (bool)$tableRow['changed'] + || $change->moved !== (bool)$tableRow['moved'] + || !$change->originDimensionSpacePoint->equals(DimensionSpacePoint::fromJsonString($tableRow['originDimensionSpacePoint'])) + ) { + continue; + } + unset($tableRows[$tableRowIndex]); + continue 2; + } + } + + if (count($tableRows) !== 0) { + $tableHeader = array_combine(array_values($table->getRow(0)), array_values($table->getRow(0))); + $tableRemain = $tableRows; + array_unshift($tableRemain, $tableHeader); + + Assert::assertEmpty($tableRows, "Not all given changes where found." . PHP_EOL . (new TableNode($tableRemain))->getTableAsString()); + } + Assert::assertSame(count($table->getHash()), $changes->count(), "More changes found as given."); + } + + /** + * @Then I expect the ChangeProjection to have no changes in :contentStreamId + */ + public function iExpectTheChangeProjectionToHaveNoChangesInContentStream(string $contentStreamId) + { + $changeFinder = $this->currentContentRepository->projectionState(ChangeFinder::class); + $changes = $changeFinder->findByContentStreamId(ContentStreamId::fromString($contentStreamId)); + + Assert::assertSame(0, $changes->count(), "No changes expected."); + } +} \ No newline at end of file diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php index 8ec72284b4d..77d5fba6108 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -45,6 +45,7 @@ class FeatureContext implements BehatContext use ContentCacheTrait; use AssetUsageTrait; use AssetTrait; + use ChangeProjectionTrait; use WorkspaceServiceTrait; use ContentRepositorySecurityTrait; diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature new file mode 100644 index 00000000000..af4fb812a91 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature @@ -0,0 +1,68 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Create node aggregate with node without dimensions + + Background: + Given using no content dimensions + 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 {} + 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" | + + When the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Scenario: Nodes on live workspace have been created + Given I am in workspace "live" + + 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"} | + + Then I expect the ChangeProjection to have no changes in "cs-identifier" + + + Scenario: Nodes on user workspace have been created + Given I am in workspace "user-workspace" + + 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"} | + + 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 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + And I expect the ChangeProjection to have no changes in "live" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature new file mode 100644 index 00000000000..e4509d85c96 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature @@ -0,0 +1,94 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Create node aggregate with node with dimensions + + 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" | + + When the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {"language": "de"} + + Scenario: Nodes on live workspace have been created + Given I am in workspace "live" + + 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"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a french text about Sir Nodeward Nodington III"} | + + Then I expect the ChangeProjection to have the following changes in "live": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + + + Scenario: Nodes on user workspace have been created + Given I am in workspace "user-workspace" + + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + + +# When the command PublishIndividualNodesFromWorkspace is executed with payload: +# | Key | Value | +# | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language":"de"}, "nodeAggregateId": "sir-david-nodenborough"}] | +# | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | +# +# And I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": +# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | +# | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | +# | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | +# | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | +# +# Then I expect the ChangeProjection to have no changes in "user-cs-id" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature new file mode 100644 index 00000000000..a6654433069 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature @@ -0,0 +1,106 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Publish nodes without dimensions + + Background: + Given using no content dimensions + 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 {} + 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" | + + Scenario: Publish nodes from user workspace to live + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Then 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"} | + + 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 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + And the command PublishWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + 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-cs-id" + + + Scenario: Publish nodes from user workspace to a non live workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-workspace-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + And I am in dimension space point {} + Then 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"} | + + 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 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + And the command PublishWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + 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-cs-id" \ No newline at end of file diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature new file mode 100644 index 00000000000..d9f15aefb73 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature @@ -0,0 +1,172 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Publish nodes with dimensions + + 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" | + + Scenario: Publish nodes from user workspace to live + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + And the command PublishWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + 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-cs-id" + + Scenario: Publish nodes from user workspace to a non live workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-workspace-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + Then I am in dimension space point {"language": "de"} + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "gsw"} + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + And the command SetNodeProperties is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | originDimensionSpacePoint | {"language":"gsw"} | + | propertyValues | {"text": "Some other text"} | + + And I am in dimension space point {"language": "fr"} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + And the command PublishWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + 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-cs-id" + + + Scenario: Publish nodes from user workspace to live with new generalization + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + 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 the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | 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-cs-id" | + + 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-cs-id" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature new file mode 100644 index 00000000000..701932b3a7f --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -0,0 +1,115 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Publish nodes partially without dimensions + + Background: + Given using no content dimensions + 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 {} + 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" | + + When an asset exists with id "asset-1" + And an asset exists with id "asset-2" + And an asset exists with id "asset-3" + + Scenario: Publish nodes partially from user workspace to live + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Then 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"} | + + 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 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + When the command PublishIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + + Scenario: Publish nodes partially from user workspace to a non live workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-workspace-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + And I am in dimension space point {} + Then 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"} | + + 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 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + When the command PublishIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" \ No newline at end of file diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature new file mode 100644 index 00000000000..ad72fe16031 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature @@ -0,0 +1,189 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Publish nodes partially with dimensions + + 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" | + + When an asset exists with id "asset-1" + And an asset exists with id "asset-2" + And an asset exists with id "asset-3" + + Scenario: Publish nodes partially from user workspace to live + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + When the command PublishIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"}] | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + + Scenario: Publish nodes partially from user workspace to a non live workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-workspace-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + Then I am in dimension space point {"language": "de"} + 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "gsw"} + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + And the command SetNodeProperties is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | originDimensionSpacePoint | {"language":"gsw"} | + | propertyValues | {"text": "Other text"} | + + And I am in dimension space point {"language": "fr"} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + When the command PublishIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"}] | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + + Scenario: Publish nodes partially from user workspace to live with new generalization + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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 CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"en"} | + + 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":"de"} | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"en"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"de"} | + + When the command PublishIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"},{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "en"}, "nodeAggregateId": "sir-david-nodenborough"}] | + | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "user-cs-id" From 46cb06a5e54baf014f5f9b8c5dc10fe48d90c03c Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Nov 2024 20:14:19 +0100 Subject: [PATCH 3/6] FEATURE: Remove changes when content stream was removed --- .../ChangeProjection.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php index 4f91f39cea2..ba156930ea9 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php +++ b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php @@ -24,6 +24,7 @@ use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\EventStore\EventInterface; +use Neos\ContentRepository\Core\Feature\ContentStreamRemoval\Event\ContentStreamWasRemoved; use Neos\ContentRepository\Core\Feature\DimensionSpaceAdjustment\Event\DimensionSpacePointWasMoved; use Neos\ContentRepository\Core\Feature\NodeCreation\Event\NodeAggregateWithNodeWasCreated; use Neos\ContentRepository\Core\Feature\NodeModification\Event\NodePropertiesWereSet; @@ -169,6 +170,7 @@ public function canHandle(EventInterface $event): bool NodePeerVariantWasCreated::class, NodeAggregateTypeWasChanged::class, NodeAggregateNameWasChanged::class, + ContentStreamWasRemoved::class, ]); } @@ -188,6 +190,7 @@ public function apply(EventInterface $event, EventEnvelope $eventEnvelope): void NodePeerVariantWasCreated::class => $this->whenNodePeerVariantWasCreated($event), NodeAggregateTypeWasChanged::class => $this->whenNodeAggregateTypeWasChanged($event), NodeAggregateNameWasChanged::class => $this->whenNodeAggregateNameWasChanged($event), + ContentStreamWasRemoved::class => $this->whenContentStreamWasRemoved($event), default => throw new \InvalidArgumentException(sprintf('Unsupported event %s', get_debug_type($event))), }; } @@ -429,6 +432,11 @@ private function whenNodeAggregateNameWasChanged(NodeAggregateNameWasChanged $ev ); } + private function whenContentStreamWasRemoved(ContentStreamWasRemoved $event): void + { + $this->removeChangesForContentStreamId($event->contentStreamId); + } + private function markAsChanged( ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, @@ -562,4 +570,18 @@ private function getChangeForAggregate( return $changeRow ? Change::fromDatabaseRow($changeRow) : null; } + + private function removeChangesForContentStreamId(ContentStreamId $contentStreamId): void + { + $statement = <<tableNamePrefix} + WHERE + contentStreamId = :contentStreamId + SQL; + $this->dbal->executeStatement($statement, + [ + 'contentStreamId' => $contentStreamId->value, + ] + ); + } } From 8f67be427882ecbe1e3829f14f9632c9b5b5f3fe Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Nov 2024 20:26:14 +0100 Subject: [PATCH 4/6] FEATURE: Remove changes when content stream was removed --- .../Classes/PendingChangesProjection/ChangeProjection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php index ba156930ea9..da5c068067b 100644 --- a/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php +++ b/Neos.Neos/Classes/PendingChangesProjection/ChangeProjection.php @@ -578,7 +578,8 @@ private function removeChangesForContentStreamId(ContentStreamId $contentStreamI WHERE contentStreamId = :contentStreamId SQL; - $this->dbal->executeStatement($statement, + $this->dbal->executeStatement( + $statement, [ 'contentStreamId' => $contentStreamId->value, ] From 519c03f3aa2a1cce0a936649f009307766817279 Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Fri, 29 Nov 2024 23:26:24 +0100 Subject: [PATCH 5/6] FEATURE: Add test cases for change projection --- .../Bootstrap/ChangeProjectionTrait.php | 8 +- ...ggregateWithNode_WithoutDimensions.feature | 6 +- ...deAggregateWithNode_WithDimensions.feature | 19 +- ...01-CreateNodeGeneralizationVariant.feature | 66 ++++++ ...02-CreateNodeSpecializationVariant.feature | 58 +++++ ...alizationVariant_InternalWorkspace.feature | 81 +++++++ .../04-CreateNodePeerVariant.feature | 57 +++++ ...etNodeProperties_WithoutDimensions.feature | 72 ++++++ ...2-SetNodeProperties_WithDimensions.feature | 83 +++++++ ...etNodeReferences_WithoutDimensions.feature | 71 ++++++ ...2-SetNodeReferences_WithDimensions.feature | 101 ++++++++ .../01-DisableNode_WithoutDimensions.feature | 58 +++++ .../02-DisableNodes_WithDimensions.feature | 98 ++++++++ ...oveNodeAggregate_WithoutDimensions.feature | 113 +++++++++ ...RemoveNodeAggregate_WithDimensions.feature | 183 +++++++++++++++ ...oveNodeAggregate_WithoutDimensions.feature | 71 ++++++ ...2-MoveNodeAggregate_WithDimensions.feature | 212 +++++++++++++++++ ...odeAggregateName_WithoutDimensions.feature | 79 +++++++ ...geNodeAggregateName_WithDimensions.feature | 92 ++++++++ ...odeAggregateType_WithoutDimensions.feature | 83 +++++++ ...geNodeAggregateType_WithDimensions.feature | 96 ++++++++ .../01-MoveDimensionSpacePoints.feature | 185 +++++++++++++++ ...PublishWorkspace_WithoutDimensions.feature | 43 ++-- ...02-PublishWorkspace_WithDimensions.feature | 30 ++- ...desFromWorkspace_WithoutDimensions.feature | 56 +++-- ...lNodesFromWorkspace_WithDimensions.feature | 62 ++--- ...DiscardWorkspace_WithoutDimensions.feature | 121 ++++++++++ ...02-DiscardWorkspace_WithDimensions.feature | 213 +++++++++++++++++ ...desFromWorkspace_WithoutDimensions.feature | 219 ++++++++++++++++++ ...lNodesFromWorkspace_WithDimensions.feature | 202 ++++++++++++++++ 30 files changed, 2747 insertions(+), 91 deletions(-) create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature create mode 100644 Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php index 1e03be7f3b7..b7828cbf7a6 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/ChangeProjectionTrait.php @@ -50,7 +50,11 @@ public function iExpectTheChangeProjectionToHaveTheFollowingChangesInContentStre || $change->deleted !== (bool)$tableRow['deleted'] || $change->changed !== (bool)$tableRow['changed'] || $change->moved !== (bool)$tableRow['moved'] - || !$change->originDimensionSpacePoint->equals(DimensionSpacePoint::fromJsonString($tableRow['originDimensionSpacePoint'])) + || ( + ($change->originDimensionSpacePoint === null && strtolower($tableRow['originDimensionSpacePoint']) !== "null") + && + ($change->originDimensionSpacePoint !== null && strtolower($tableRow['originDimensionSpacePoint']) !== "null" && !$change->originDimensionSpacePoint->equals(DimensionSpacePoint::fromJsonString($tableRow['originDimensionSpacePoint']))) + ) ) { continue; } @@ -79,4 +83,4 @@ public function iExpectTheChangeProjectionToHaveNoChangesInContentStream(string Assert::assertSame(0, $changes->count(), "No changes expected."); } -} \ No newline at end of file +} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature index af4fb812a91..5ecbe488f3c 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature @@ -42,7 +42,7 @@ Feature: Create node aggregate with node without dimensions Given I am in workspace "live" And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | @@ -54,7 +54,7 @@ Feature: Create node aggregate with node without dimensions Given I am in workspace "user-workspace" And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | @@ -65,4 +65,4 @@ Feature: Create node aggregate with node without dimensions | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | - And I expect the ChangeProjection to have no changes in "live" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature index e4509d85c96..d0f16cc8c4e 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature @@ -53,8 +53,7 @@ Feature: Create node aggregate with node with dimensions | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a french text about Sir Nodeward Nodington III"} | - Then I expect the ChangeProjection to have the following changes in "live": - | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + Then I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Nodes on user workspace have been created @@ -77,18 +76,4 @@ Feature: Create node aggregate with node with dimensions | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | - - - -# When the command PublishIndividualNodesFromWorkspace is executed with payload: -# | Key | Value | -# | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language":"de"}, "nodeAggregateId": "sir-david-nodenborough"}] | -# | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | -# -# And I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": -# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | -# | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | -# | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | -# | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | -# -# Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature new file mode 100644 index 00000000000..27a38f51c68 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature @@ -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" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature new file mode 100644 index 00000000000..33357264e29 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature @@ -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"} | diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature new file mode 100644 index 00000000000..97dd8fa3e97 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature @@ -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" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature new file mode 100644 index 00000000000..259ef59ab66 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature @@ -0,0 +1,57 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Create node peer 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "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 | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + + 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":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature new file mode 100644 index 00000000000..3c59b60ff11 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature @@ -0,0 +1,72 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Create node aggregate with node without dimensions + + Background: Create node aggregate with initial node + Given using no content dimensions + 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 {} + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Set node properties without dimension and publish in user workspace + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": "Other text"} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove an text from an existing property + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": null} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature new file mode 100644 index 00000000000..3562f9c358e --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature @@ -0,0 +1,83 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Create node aggregate with node with dimensions + + Background: Create node aggregate with initial node + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + And I am in dimension space point {"language": "fr"} + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Set node properties without dimension and publish in user workspace + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language":"de"} | + | propertyValues | {"text": "Other text"} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + + Scenario: Remove an text from an existing property + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language":"de"} | + | propertyValues | {"text": null} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + diff --git a/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature new file mode 100644 index 00000000000..f4c77344935 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature @@ -0,0 +1,71 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Node referencing without dimensions + + Background: + Given using no content dimensions + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:Node': + properties: + text: + type: string + references: + singleReference: + constraints: + maxItems: 1 + """ + 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 {} + + 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" | + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | references | + | 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"} | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | [] | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Set a new node reference + When the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "sir-david-nodenborough" | + | references | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove an existing reference from node + When the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "nody-mc-nodeface" | + | references | [{"referenceName": "singleReference", "references": []}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature new file mode 100644 index 00000000000..758bbb8771b --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature @@ -0,0 +1,101 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Node referencing with dimensions + + 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 + references: + singleReference: + constraints: + maxItems: 1 + """ + 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" | + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | references | + | 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"} | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | [] | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Set a new node reference + When the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "sir-david-nodenborough" | + | references | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Set a new node reference in specialization + When I am in dimension space point {"language": "gsw"} + And the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "nody-mc-nodeface" | + | references | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 1 | 0 | 0 | {"language": "gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Set a new node reference in generalization + When I am in dimension space point {"language": "de"} + And the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "nody-mc-nodeface" | + | references | [{"referenceName": "singleReference", "references": [{"target": "sir-nodeward-nodington-iv"}]}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 1 | 0 | 0 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove an existing reference from node + When the command SetNodeReferences is executed with payload: + | Key | Value | + | sourceNodeAggregateId | "nody-mc-nodeface" | + | references | [{"referenceName": "singleReference", "references": []}] | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 1 | 0 | 0 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature new file mode 100644 index 00000000000..e9d047e5b64 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature @@ -0,0 +1,58 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Disable node without dimensions + + Background: Create node aggregate with initial node + Given using no content dimensions + 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 {} + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Disable a node + Given the command DisableNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allVariants" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature new file mode 100644 index 00000000000..814e2cb4710 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature @@ -0,0 +1,98 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Disable node with dimensions + + Background: Create node aggregate with initial node + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Disable node with all variants + Given the command DisableNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language":"de"} | + | nodeVariantSelectionStrategy | "allVariants" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Disable node with all specializations (de) + Given the command DisableNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language":"de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Disable node with all specializations (gsw) + Given the command DisableNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language":"gsw"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature new file mode 100644 index 00000000000..70831e0d1cb --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature @@ -0,0 +1,113 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Remove node aggregate with node without dimensions + + Background: + Given using no content dimensions + 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 {} + + 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" | + + Then 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"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Remove node aggregate in user-workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "nody-mc-nodeface" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 0 | 1 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate in live workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "live" | + | nodeAggregateId | "nody-mc-nodeface" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then 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: Remove node aggregate with children in user workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate with children in live workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "live" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then 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: Remove node aggregate in user workspace which was already modified + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": "Other text"} | + + And the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature new file mode 100644 index 00000000000..9da294c1067 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature @@ -0,0 +1,183 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Remove node aggregate with node without dimensions + + 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" | + + Then 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 CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + + Then I am in dimension space point {"language": "fr"} + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iv | bukara | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + | sir-nodeward-nodington-v | tinquarto | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington V"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Remove node aggregate in user-workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "nody-mc-nodeface" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 0 | 1 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate in live workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "live" | + | nodeAggregateId | "nody-mc-nodeface" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then 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: Remove node aggregate with children in user workspace with "allSpecializations" + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "de"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate with children in user workspace with "allVariants" + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allVariants" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "de"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "gsw"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate with children in live workspace + Given the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "live" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then 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: Remove node aggregate in user workspace which was already modified with "allSpecializations" + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "de"} | + | propertyValues | {"text": "Other text"} | + And the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "fr"} | + | propertyValues | {"text": "Other text"} | + + And the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "de"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "gsw"} | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language": "fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Remove node aggregate in user workspace which was already modified with "allVariants" + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "de"} | + | propertyValues | {"text": "Other text"} | + And the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "fr"} | + | propertyValues | {"text": "Other text"} | + + And the command RemoveNodeAggregate is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | coveredDimensionSpacePoint | {"language": "de"} | + | nodeVariantSelectionStrategy | "allVariants" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "de"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "gsw"} | + | sir-david-nodenborough | 0 | 0 | 0 | 1 | {"language": "fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature new file mode 100644 index 00000000000..8141c40ddbb --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature @@ -0,0 +1,71 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Move node aggregate without dimensions + + Background: + Given using no content dimensions + 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 {} + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + | lady-childton | ketchup | sir-nodeward-nodington-iv | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Lady Childton"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Move nodeAggregate into new parent + When the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 1 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate with children into new parent + When the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-nodeward-nodington-iv" | + | newParentNodeAggregateId | "nody-mc-nodeface" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iv | 0 | 0 | 1 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + diff --git a/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature new file mode 100644 index 00000000000..1cb69da1bfa --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature @@ -0,0 +1,212 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Move node aggregate with dimensions + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-nodeward-nodington-iv" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"fr"} | + + + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + + Scenario: Move nodeAggregate (variant) into new parent with scatter + When I am in dimension space point {"language": "fr"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-nodeward-nodington-iv" | + | newParentNodeAggregateId | "nody-mc-nodeface" | + | relationDistributionStrategy | "scatter" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iv | 0 | 0 | 1 | 0 | {"language": "fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate (generalization) into new parent with scatter + When I am in dimension space point {"language": "de"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | + | relationDistributionStrategy | "scatter" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate (specialization) into new parent with scatter + When I am in dimension space point {"language": "gsw"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | + | relationDistributionStrategy | "scatter" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + +# TODO: https://github.com/neos/neos-development-collection/issues/5368 +# Scenario: Move nodeAggregate (variant) into new parent with gatherAll +# When I am in dimension space point {"language": "fr"} +# And the command MoveNodeAggregate is executed with payload: +# | Key | Value | +# | nodeAggregateId | "nody-mc-nodeface" | +# | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | +# | relationDistributionStrategy | "gatherAll" | +# +# Then I expect the ChangeProjection to have the following changes in "user-cs-id": +# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "fr"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "de"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | +# And I expect the ChangeProjection to have no changes in "cs-identifier" + +# TODO: https://github.com/neos/neos-development-collection/issues/5368 +# Scenario: Move nodeAggregate (specialization) into new parent with gatherAll +# When I am in dimension space point {"language": "gsw"} +# And the command MoveNodeAggregate is executed with payload: +# | Key | Value | +# | nodeAggregateId | "nody-mc-nodeface" | +# | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | +# | relationDistributionStrategy | "gatherAll" | +# +# Then I expect the ChangeProjection to have the following changes in "user-cs-id": +# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "de"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "fr"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | +# And I expect the ChangeProjection to have no changes in "cs-identifier" + +# TODO: https://github.com/neos/neos-development-collection/issues/5368 +# Scenario: Move nodeAggregate (generalization) into new parent with gatherAll +# When I am in dimension space point {"language": "de"} +# And the command MoveNodeAggregate is executed with payload: +# | Key | Value | +# | nodeAggregateId | "nody-mc-nodeface" | +# | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | +# | relationDistributionStrategy | "gatherAll" | +# +# Then I expect the ChangeProjection to have the following changes in "user-cs-id": +# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "de"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "fr"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | +# And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate (variant) into new parent with gatherSpecializations + When I am in dimension space point {"language": "fr"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | + | relationDistributionStrategy | "gatherSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate (specialization) into new parent with gatherSpecializations + When I am in dimension space point {"language": "gsw"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | + | relationDistributionStrategy | "gatherSpecializations" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + +# TODO: https://github.com/neos/neos-development-collection/issues/5368 +# Scenario: Move nodeAggregate (generalization) into new parent with gatherSpecializations +# When I am in dimension space point {"language": "de"} +# And the command MoveNodeAggregate is executed with payload: +# | Key | Value | +# | nodeAggregateId | "nody-mc-nodeface" | +# | newParentNodeAggregateId | "sir-nodeward-nodington-iv" | +# | relationDistributionStrategy | "gatherSpecializations" | +# +# Then I expect the ChangeProjection to have the following changes in "user-cs-id": +# | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "de"} | +# | nody-mc-nodeface | 0 | 0 | 1 | 0 | {"language": "gsw"} | +# And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Move nodeAggregate with children into new parent + When I am in dimension space point {"language": "de"} + And the command MoveNodeAggregate is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-nodeward-nodington-iv" | + | newParentNodeAggregateId | "nody-mc-nodeface" | + | relationDistributionStrategy | "scatter" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iv | 0 | 0 | 1 | 0 | {"language": "de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + diff --git a/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature new file mode 100644 index 00000000000..4082df00bd5 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature @@ -0,0 +1,79 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Change node aggregate name without dimensions + + Background: + Given using no content dimensions + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:Node': + properties: + text: + type: string + 'Neos.ContentRepository.Testing:NewNode': + 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 {} + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Change the node aggregate name of a node with children + Given the command ChangeNodeAggregateName is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeName | "renamed-document" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Change the node aggregate name with already applied changes + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": "Other text"} | + + Then the command ChangeNodeAggregateName is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeName | "renamed-document" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature new file mode 100644 index 00000000000..06897a88ee1 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature @@ -0,0 +1,92 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Change node aggregate name with dimensions + + Background: Create node aggregate with initial node + 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 + 'Neos.ContentRepository.Testing:NewNode': + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + And I am in dimension space point {"language": "fr"} + + Then the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language": "de"} | + | targetOrigin | {"language": "fr"} | + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Change the node aggregate type of a node with children + Given the command ChangeNodeAggregateName is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeName | "renamed-document" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Change the node aggregate type with already applied changes + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "de"} | + | propertyValues | {"text": "Other text"} | + + Then the command ChangeNodeAggregateName is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeName | "renamed-document" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature new file mode 100644 index 00000000000..ee0793e9ca9 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature @@ -0,0 +1,83 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Change node aggregate type without dimensions + + Background: + Given using no content dimensions + And using the following node types: + """yaml + 'Neos.ContentRepository.Testing:Node': + properties: + text: + type: string + 'Neos.ContentRepository.Testing:NewNode': + 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 {} + + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And I am in dimension space point {} + + Scenario: Change the node aggregate type of a node with children + Given the command ChangeNodeAggregateType is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeTypeName | "Neos.ContentRepository.Testing:NewNode" | + | strategy | "happypath" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Change the node aggregate type with already applied changes + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {} | + | propertyValues | {"text": "Other text"} | + + Then the command ChangeNodeAggregateType is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeTypeName | "Neos.ContentRepository.Testing:NewNode" | + | strategy | "happypath" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature new file mode 100644 index 00000000000..fa37c9700ca --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature @@ -0,0 +1,96 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Change node aggregate type with dimensions + + Background: Create node aggregate with initial node + 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 + 'Neos.ContentRepository.Testing:NewNode': + 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" | + + Then 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + And I am in dimension space point {"language": "fr"} + + Then the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | sourceOrigin | {"language": "de"} | + | targetOrigin | {"language": "fr"} | + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + And I am in dimension space point {"language": "de"} + + Scenario: Change the node aggregate type of a node with children + Given the command ChangeNodeAggregateType is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeTypeName | "Neos.ContentRepository.Testing:NewNode" | + | strategy | "happypath" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Change the node aggregate type with already applied changes + Given the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "de"} | + | propertyValues | {"text": "Other text"} | + + Then the command ChangeNodeAggregateType is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | newNodeTypeName | "Neos.ContentRepository.Testing:NewNode" | + | strategy | "happypath" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | null | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature b/Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature new file mode 100644 index 00000000000..f17d0250d7d --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature @@ -0,0 +1,185 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Move DimensionSpacePoints + + 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" | + + Then I am in dimension space point {"language": "de"} + 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"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + | sir-nodeward-nodington-v | quatilde | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington V"} | + + Then the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + + And I am in workspace "user-workspace" + + Then the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language": "de"} | + | propertyValues | {"text": "Some text"} | + Then the command SetNodeProperties is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodeAggregateId | "sir-nodeward-nodington-iv" | + | originDimensionSpacePoint | {"language": "fr"} | + | propertyValues | {"text": "Some french text"} | + + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 0 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + + And I am in workspace "live" + + Scenario: Rename a dimension value in live workspace + Given I change the content dimensions in content repository "default" to: + | Identifier | Values | Generalizations | + | language | de_DE,gsw,fr,en | gsw->de_DE->en, fr | + + And I run the following node migration for workspace "live", creating target workspace "migration" on contentStreamId "migration-cs-id", with publishing on success: + """yaml + migration: + - + transformations: + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"de"} + to: {"language":"de_DE"} + """ + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 0 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + And I expect the ChangeProjection to have no changes in "migration-cs-id" + + + Scenario: Rename a dimension value in user workspace + Given I change the content dimensions in content repository "default" to: + | Identifier | Values | Generalizations | + | language | de_DE,gsw,fr,en | gsw->de_DE->en, fr | + + And I run the following node migration for workspace "user-workspace", creating target workspace "migration" on contentStreamId "migration-cs-id", with publishing on success: + """yaml + migration: + - + transformations: + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"de"} + to: {"language":"de_DE"} + """ + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de_DE"} | + | sir-nodeward-nodington-iv | 0 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + And I expect the ChangeProjection to have no changes in "migration-cs-id" + + + Scenario: Adding a dimension in live workspace + Given I change the content dimensions in content repository "default" to: + | Identifier | Values | Generalizations | + | language | de,gsw,fr,en | gsw->de->en, fr | + | market | DE, FR | DE, FR | + + And I run the following node migration for workspace "live", creating target workspace "migration-cs" on contentStreamId "migration-cs", with publishing on success: + """yaml + migration: + - + transformations: + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"de"} + to: {"language":"de", "market": "DE"} + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"fr"} + to: {"language":"fr", "market": "FR"} + """ + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 0 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + And I expect the ChangeProjection to have no changes in "migration-cs-id" + + + Scenario: Adding a dimension in user workspace + Given I change the content dimensions in content repository "default" to: + | Identifier | Values | Generalizations | + | language | de,gsw,fr,en | gsw->de->en, fr | + | market | DE, FR | DE, FR | + + And I run the following node migration for workspace "user-workspace", creating target workspace "migration-cs" on contentStreamId "migration-cs", with publishing on success: + """yaml + migration: + - + transformations: + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"de"} + to: {"language":"de", "market": "DE"} + - + type: 'MoveDimensionSpacePoint' + settings: + from: {"language":"fr"} + to: {"language":"fr", "market": "FR"} + """ + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de", "market": "DE"} | + | sir-nodeward-nodington-iv | 0 | 1 | 0 | 0 | {"language":"fr", "market": "FR"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" + And I expect the ChangeProjection to have no changes in "migration-cs-id" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature index a6654433069..36150d3572b 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature @@ -58,25 +58,32 @@ Feature: Publish nodes without dimensions | newContentStreamId | "new-user-cs-id" | 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-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes from user workspace to a non live workspace Given the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - | baseWorkspaceName | "live" | - | newContentStreamId | "review-workspace-cs-id" | + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "review-workspace" | + And I am in workspace "review-workspace" + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + And the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - | baseWorkspaceName | "review-workspace" | - | newContentStreamId | "user-cs-id" | + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | @@ -87,20 +94,28 @@ Feature: Publish nodes without dimensions And I am in dimension space point {} Then 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"} | - Then I expect the ChangeProjection to have the following changes in "user-cs-id": + Then I expect the ChangeProjection to have the following changes in "review-cs-id": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | sir-david-nodenborough | 1 | 1 | 0 | 0 | {} | + + 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 | {} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | And the command PublishWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | + | Key | Value | + | workspaceName | "user-workspace" | | newContentStreamId | "new-user-cs-id" | 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-cs-id" \ No newline at end of file + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature index d9f15aefb73..d02eefe8fee 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature @@ -66,19 +66,27 @@ Feature: Publish nodes with dimensions | newContentStreamId | "new-user-cs-id" | 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-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes from user workspace to a non live workspace Given the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "review-workspace" | | baseWorkspaceName | "live" | - | newContentStreamId | "review-workspace-cs-id" | + | newContentStreamId | "review-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "review-workspace" | + And I am in workspace "review-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + And the command CreateWorkspace is executed with payload: | Key | Value | | workspaceName | "user-workspace" | @@ -94,7 +102,6 @@ Feature: Publish nodes with dimensions Then I am in dimension space point {"language": "de"} 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | @@ -115,9 +122,12 @@ Feature: Publish nodes with dimensions | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | - Then I expect the ChangeProjection to have the following changes in "user-cs-id": + Then I expect the ChangeProjection to have the following changes in "review-cs-id": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + + 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":"de"} | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | @@ -129,8 +139,15 @@ Feature: Publish nodes with dimensions | newContentStreamId | "new-user-cs-id" | 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-cs-id" - + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes from user workspace to live with new generalization Given the command CreateWorkspace is executed with payload: @@ -170,3 +187,4 @@ Feature: Publish nodes with dimensions 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-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature index 701932b3a7f..b5ef2c7bf05 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -28,10 +28,6 @@ Feature: Publish nodes partially without dimensions | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | - When an asset exists with id "asset-1" - And an asset exists with id "asset-2" - And an asset exists with id "asset-3" - Scenario: Publish nodes partially from user workspace to live Given the command CreateWorkspace is executed with payload: | Key | Value | @@ -59,30 +55,38 @@ Feature: Publish nodes partially without dimensions When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | - | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + | contentStreamIdForRemainingPart | "user-cs-id-remaining" | - Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes partially from user workspace to a non live workspace Given the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - | baseWorkspaceName | "live" | - | newContentStreamId | "review-workspace-cs-id" | + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "review-workspace" | + When I am in workspace "review-workspace" + + And I am in dimension space point {} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + And the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - | baseWorkspaceName | "review-workspace" | - | newContentStreamId | "user-cs-id" | + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | @@ -92,24 +96,30 @@ Feature: Publish nodes partially without dimensions And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | - | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | 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"} | + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {} | + 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 | {} | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | When the command PublishIndividualNodesFromWorkspace is executed with payload: - | Key | Value | - | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-david-nodenborough"}] | - | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "nody-mc-nodeface"}] | + | contentStreamIdForRemainingPart | "user-cs-id-remaining" | - Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | - | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | - And I expect the ChangeProjection to have no changes in "user-cs-id" \ No newline at end of file + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature index ad72fe16031..44fd8839e16 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature @@ -30,10 +30,6 @@ Feature: Publish nodes partially with dimensions | nodeAggregateId | "lady-eleonode-rootford" | | nodeTypeName | "Neos.ContentRepository:Root" | - When an asset exists with id "asset-1" - And an asset exists with id "asset-2" - And an asset exists with id "asset-3" - Scenario: Publish nodes partially from user workspace to live Given the command CreateWorkspace is executed with payload: | Key | Value | @@ -68,32 +64,39 @@ Feature: Publish nodes partially with dimensions When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"}] | - | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + | contentStreamIdForRemainingPart | "user-cs-id-remaining" | - Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | - - Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes partially from user workspace to a non live workspace Given the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - | baseWorkspaceName | "live" | - | newContentStreamId | "review-workspace-cs-id" | + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | | workspaceName | "review-workspace" | + And I am in workspace "review-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + And the command CreateWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - | baseWorkspaceName | "review-workspace" | - | newContentStreamId | "user-cs-id" | + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | And the command RebaseWorkspace is executed with payload: | Key | Value | @@ -104,7 +107,6 @@ Feature: Publish nodes partially with dimensions Then I am in dimension space point {"language": "de"} 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-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | @@ -125,26 +127,33 @@ Feature: Publish nodes partially with dimensions | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + 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":"de"} | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | When the command PublishIndividualNodesFromWorkspace is executed with payload: - | Key | Value | - | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"}] | - | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + | Key | Value | + | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "nody-mc-nodeface"}] | + | contentStreamIdForRemainingPart | "user-cs-id-remaining" | - Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | - | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "cs-identifier" Scenario: Publish nodes partially from user workspace to live with new generalization Given the command CreateWorkspace is executed with payload: @@ -159,7 +168,7 @@ Feature: Publish nodes partially with dimensions Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: - | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | @@ -180,10 +189,11 @@ Feature: Publish nodes partially with dimensions When the command PublishIndividualNodesFromWorkspace is executed with payload: | Key | Value | | nodesToPublish | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"},{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "en"}, "nodeAggregateId": "sir-david-nodenborough"}] | - | contentStreamIdForRemainingPart | "user-cs-identifier-remaining" | + | contentStreamIdForRemainingPart | "user-cs-id-remaining" | - Then I expect the ChangeProjection to have the following changes in "user-cs-identifier-remaining": + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"de"} | And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature new file mode 100644 index 00000000000..b25ee139df1 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature @@ -0,0 +1,121 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Discard workspace without dimensions + + Background: + Given using no content dimensions + 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 {} + 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" | + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + + + Scenario: Discard changes in user workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | + + 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 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + + Scenario: Discard changes in user workspace with a non-live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And I am in workspace "review-workspace" + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + And I am in dimension space point {} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + + + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature new file mode 100644 index 00000000000..e35d39d5e6a --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature @@ -0,0 +1,213 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Discard workspace with dimensions + + 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 | {} | + + Scenario: Discard user workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + + + Scenario: Discard user workspace with a non-live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And I am in workspace "review-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I am in dimension space point {"language": "gsw"} + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + + And the command SetNodeProperties is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | originDimensionSpacePoint | {"language":"gsw"} | + | propertyValues | {"text": "Some other text"} | + + And I am in dimension space point {"language": "fr"} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + + 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"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + + Scenario: Discard user workspace with new generalization + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + 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 the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"en"} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" + + Scenario: Discard user workspace after change to an existing asseet usage of a property + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + + And the command SetNodeProperties is executed with payload: + | Key | Value | + | nodeAggregateId | "sir-david-nodenborough" | + | originDimensionSpacePoint | {"language":"de"} | + | propertyValues | {"text": "New text"} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 0 | 1 | 0 | 0 | {"language":"de"} | + + When the command DiscardWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | newContentStreamId | "new-user-cs-id" | + + Then I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "new-user-cs-id" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature new file mode 100644 index 00000000000..1349cbd360e --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -0,0 +1,219 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Discard nodes partially without dimensions + + Background: + Given using no content dimensions + 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 {} + 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 | {} | + + Scenario: Discards nodes partially from user workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | + + 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 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Discards multiple nodes partially from user workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + And I am in dimension space point {} + + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | 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"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + 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 | {} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iii"},{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iv"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Discards nodes partially from user workspace with a non-live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And I am in workspace "review-workspace" + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + And I am in dimension space point {} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + | sir-nodeward-nodington-iv | bukara | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iv"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Discards multiple nodes partially from user workspace with a non-live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And I am in workspace "review-workspace" + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + And I am in dimension space point {} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + | sir-nodeward-nodington-iv | bukara | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + | sir-nodeward-nodington-v | tinquarto | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington V"} | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {} | + | sir-nodeward-nodington-v | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-iv"},{"workspaceName": "user-workspace", "dimensionSpacePoint": {}, "nodeAggregateId": "sir-nodeward-nodington-v"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature new file mode 100644 index 00000000000..02087adbcd0 --- /dev/null +++ b/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature @@ -0,0 +1,202 @@ +@contentrepository @adapters=DoctrineDBAL +@flowEntities +Feature: Discard nodes partially with dimensions + + 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" | + + Scenario: Discards nodes partially from user workspace with live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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"} | + + Then I am in dimension space point {"language": "fr"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington III"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"fr"} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "sir-david-nodenborough"}, {"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"}, "nodeAggregateId": "nody-mc-nodeface"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Discards nodes partially from user workspace with non live base workspace + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "review-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "review-workspace" | + + And I am in workspace "review-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-david-nodenborough | node | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {} | + + And the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "review-workspace" | + | newContentStreamId | "user-cs-id" | + + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + And I am in workspace "user-workspace" + + Then I am in dimension space point {"language": "de"} + And the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | nody-mc-nodeface | child-node | sir-david-nodenborough | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Nody Mc Nodeface"} | + + Then I am in dimension space point {"language": "gsw"} + And the command CreateNodeVariant is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | sourceOrigin | {"language":"de"} | + | targetOrigin | {"language":"gsw"} | + And the command SetNodeProperties is executed with payload: + | Key | Value | + | nodeAggregateId | "nody-mc-nodeface" | + | originDimensionSpacePoint | {"language":"gsw"} | + | propertyValues | {"text": "Other text"} | + + And I am in dimension space point {"language": "fr"} + Then the following CreateNodeAggregateWithNode commands are executed: + | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | + | sir-nodeward-nodington-iii | esquire | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington III"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a extended text about Sir Nodeward Nodington IV"} | + + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + + 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":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"gsw"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"fr"} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "gsw"}, "nodeAggregateId": "nody-mc-nodeface"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "review-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"fr"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"fr"} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" + + Scenario: Discard nodes partially from user workspace with live base workspace with new generalization + Given the command CreateWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | baseWorkspaceName | "live" | + | newContentStreamId | "user-cs-id" | + And I am in workspace "user-workspace" + And the command RebaseWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + + Then I am in dimension space point {"language": "de"} + 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 extended text about Sir Nodeward Nodington III"} | + | sir-nodeward-nodington-iv | bakura | lady-eleonode-rootford | Neos.ContentRepository.Testing:Node | {"text": "This is a text about Sir Nodeward Nodington IV"} | + + 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 the following changes in "user-cs-id": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"en"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iii | 1 | 1 | 0 | 0 | {"language":"de"} | + + When the command DiscardIndividualNodesFromWorkspace is executed with payload: + | Key | Value | + | workspaceName | "user-workspace" | + | nodesToDiscard | [{"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "en"} , "nodeAggregateId": "sir-david-nodenborough"}, {"workspaceName": "user-workspace", "dimensionSpacePoint": {"language": "de"} , "nodeAggregateId": "sir-nodeward-nodington-iii"}] | + | newContentStreamId | "user-cs-id-remaining" | + + Then I expect the ChangeProjection to have the following changes in "user-cs-id-remaining": + | nodeAggregateId | created | changed | moved | deleted | originDimensionSpacePoint | + | sir-david-nodenborough | 1 | 1 | 0 | 0 | {"language":"de"} | + | nody-mc-nodeface | 1 | 1 | 0 | 0 | {"language":"de"} | + | sir-nodeward-nodington-iv | 1 | 1 | 0 | 0 | {"language":"de"} | + And I expect the ChangeProjection to have no changes in "user-cs-id" + And I expect the ChangeProjection to have no changes in "cs-identifier" From 81242dd126ca63d1041b8806c36adc905584a39d Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Tue, 3 Dec 2024 22:42:50 +0100 Subject: [PATCH 6/6] FEATURE: Add test cases for change projection --- ...ggregateWithNode_WithoutDimensions.feature | 4 ---- ...deAggregateWithNode_WithDimensions.feature | 4 ---- ...01-CreateNodeGeneralizationVariant.feature | 0 ...02-CreateNodeSpecializationVariant.feature | 0 ...alizationVariant_InternalWorkspace.feature | 0 .../04-CreateNodePeerVariant.feature | 0 ...etNodeProperties_WithoutDimensions.feature | 0 ...2-SetNodeProperties_WithDimensions.feature | 0 ...etNodeReferences_WithoutDimensions.feature | 0 ...2-SetNodeReferences_WithDimensions.feature | 0 .../01-DisableNode_WithoutDimensions.feature | 0 .../02-DisableNodes_WithDimensions.feature | 0 ...oveNodeAggregate_WithoutDimensions.feature | 0 ...RemoveNodeAggregate_WithDimensions.feature | 0 ...oveNodeAggregate_WithoutDimensions.feature | 0 ...2-MoveNodeAggregate_WithDimensions.feature | 0 ...odeAggregateName_WithoutDimensions.feature | 0 ...geNodeAggregateName_WithDimensions.feature | 0 ...odeAggregateType_WithoutDimensions.feature | 0 ...geNodeAggregateType_WithDimensions.feature | 0 .../01-MoveDimensionSpacePoints.feature | 0 ...PublishWorkspace_WithoutDimensions.feature | 12 ---------- ...02-PublishWorkspace_WithDimensions.feature | 14 ----------- ...desFromWorkspace_WithoutDimensions.feature | 12 ---------- ...lNodesFromWorkspace_WithDimensions.feature | 14 ----------- ...DiscardWorkspace_WithoutDimensions.feature | 12 ---------- ...02-DiscardWorkspace_WithDimensions.feature | 17 ------------- ...desFromWorkspace_WithoutDimensions.feature | 24 ------------------- ...lNodesFromWorkspace_WithDimensions.feature | 14 ----------- 29 files changed, 127 deletions(-) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature (95%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature (95%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/02-NodeVariation/02-CreateNodeSpecializationVariant.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/02-NodeVariation/04-CreateNodePeerVariant.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/03-NodeModification/02-SetNodeProperties_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/05-NodeDisabling/02-DisableNodes_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature (100%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature (92%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature (95%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature (93%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature (95%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature (92%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature (93%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature (94%) rename Neos.Neos/Tests/Behavior/Features/{Change => PendingChanges}/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature (96%) diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature similarity index 95% rename from Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature index 5ecbe488f3c..2c57a3d219a 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/01-CreateNodeAggregateWithNode_WithoutDimensions.feature @@ -33,10 +33,6 @@ Feature: Create node aggregate with node without dimensions | workspaceName | "user-workspace" | | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Scenario: Nodes on live workspace have been created Given I am in workspace "live" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature similarity index 95% rename from Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature index d0f16cc8c4e..e7f4adc60c8 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/01-NodeCreation/02-CreateNodeAggregateWithNode_WithDimensions.feature @@ -35,10 +35,6 @@ Feature: Create node aggregate with node with dimensions | workspaceName | "user-workspace" | | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {"language": "de"} Scenario: Nodes on live workspace have been created Given I am in workspace "live" diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/01-CreateNodeGeneralizationVariant.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/02-CreateNodeSpecializationVariant.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/02-CreateNodeSpecializationVariant.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/02-CreateNodeSpecializationVariant.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/03-CreateNodeSpecializationVariant_InternalWorkspace.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/04-CreateNodePeerVariant.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/02-NodeVariation/04-CreateNodePeerVariant.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/02-NodeVariation/04-CreateNodePeerVariant.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/03-NodeModification/01-SetNodeProperties_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/03-NodeModification/02-SetNodeProperties_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/03-NodeModification/02-SetNodeProperties_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/03-NodeModification/02-SetNodeProperties_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/04-NodeReferencing/01-SetNodeReferences_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/04-NodeReferencing/02-SetNodeReferences_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/05-NodeDisabling/01-DisableNode_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/05-NodeDisabling/02-DisableNodes_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/05-NodeDisabling/02-DisableNodes_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/05-NodeDisabling/02-DisableNodes_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/06-NodeRemoval/01-RemoveNodeAggregate_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/06-NodeRemoval/02-RemoveNodeAggregate_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/07-NodeMove/01-MoveNodeAggregate_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/07-NodeMove/02-MoveNodeAggregate_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/08-NodeRenaming/01-ChangeNodeAggregateName_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/08-NodeRenaming/02-ChangeNodeAggregateName_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/09-NodeTypeChange/01-ChangeNodeAggregateType_WithoutDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/09-NodeTypeChange/02-ChangeNodeAggregateType_WithDimensions.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature similarity index 100% rename from Neos.Neos/Tests/Behavior/Features/Change/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/10-DimensionSpaceAdjustment/01-MoveDimensionSpacePoints.feature diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature similarity index 92% rename from Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature index 36150d3572b..73e7c6661d6 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/01-PublishWorkspace_WithoutDimensions.feature @@ -35,10 +35,6 @@ Feature: Publish nodes without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -69,10 +65,6 @@ Feature: Publish nodes without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then the following CreateNodeAggregateWithNode commands are executed: @@ -85,10 +77,6 @@ Feature: Publish nodes without dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" And I am in dimension space point {} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature similarity index 95% rename from Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature index d02eefe8fee..6cd0e203077 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/02-PublishWorkspace_WithDimensions.feature @@ -37,9 +37,6 @@ Feature: Publish nodes with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: @@ -76,10 +73,6 @@ Feature: Publish nodes with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then I am in dimension space point {"language": "de"} @@ -93,10 +86,6 @@ Feature: Publish nodes with dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" Then I am in dimension space point {"language": "de"} @@ -156,9 +145,6 @@ Feature: Publish nodes with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature similarity index 93% rename from Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature index b5ef2c7bf05..98e67598008 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/03-PublishIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -35,10 +35,6 @@ Feature: Publish nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -71,10 +67,6 @@ Feature: Publish nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - When I am in workspace "review-workspace" And I am in dimension space point {} @@ -88,10 +80,6 @@ Feature: Publish nodes partially without dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" And I am in dimension space point {} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature similarity index 95% rename from Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature index 44fd8839e16..a0227c2e0ad 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W01-WorkspacePublication/04-PublishIndividualNodesFromWorkspace_WithDimensions.feature @@ -37,9 +37,6 @@ Feature: Publish nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: @@ -81,10 +78,6 @@ Feature: Publish nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then I am in dimension space point {"language": "de"} @@ -98,10 +91,6 @@ Feature: Publish nodes partially with dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" Then I am in dimension space point {"language": "de"} @@ -162,9 +151,6 @@ Feature: Publish nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature similarity index 92% rename from Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature index b25ee139df1..f6e58c8d3a3 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/01-DiscardWorkspace_WithoutDimensions.feature @@ -40,10 +40,6 @@ Feature: Discard workspace without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -72,10 +68,6 @@ Feature: Discard workspace without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then the following CreateNodeAggregateWithNode commands are executed: @@ -88,10 +80,6 @@ Feature: Discard workspace without dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" And I am in dimension space point {} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature similarity index 93% rename from Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature index e35d39d5e6a..c059beaa9c4 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/02-DiscardWorkspace_WithDimensions.feature @@ -41,9 +41,6 @@ Feature: Discard workspace with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: @@ -78,10 +75,6 @@ Feature: Discard workspace with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then I am in dimension space point {"language": "de"} @@ -95,10 +88,6 @@ Feature: Discard workspace with dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" Then I am in dimension space point {"language": "de"} @@ -151,9 +140,6 @@ Feature: Discard workspace with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: @@ -188,9 +174,6 @@ Feature: Discard workspace with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature similarity index 94% rename from Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature index 1349cbd360e..1f47143ce90 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/03-DiscardIndividualNodesFromWorkspace_WithoutDimensions.feature @@ -39,10 +39,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -73,10 +69,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in dimension space point {} Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -109,10 +101,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -124,10 +112,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" And I am in dimension space point {} @@ -166,10 +150,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then the following CreateNodeAggregateWithNode commands are executed: | nodeAggregateId | nodeName | parentNodeAggregateId | nodeTypeName | initialPropertyValues | @@ -181,10 +161,6 @@ Feature: Discard nodes partially without dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" And I am in dimension space point {} diff --git a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature similarity index 96% rename from Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature rename to Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature index 02087adbcd0..522aaf2028c 100644 --- a/Neos.Neos/Tests/Behavior/Features/Change/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature +++ b/Neos.Neos/Tests/Behavior/Features/PendingChanges/W02-WorkspaceDiscarding/04-DiscardIndividualNodesFromWorkspace_WithDimensions.feature @@ -37,9 +37,6 @@ Feature: Discard nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: @@ -80,10 +77,6 @@ Feature: Discard nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "review-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "review-workspace" | - And I am in workspace "review-workspace" Then I am in dimension space point {"language": "de"} @@ -97,10 +90,6 @@ Feature: Discard nodes partially with dimensions | baseWorkspaceName | "review-workspace" | | newContentStreamId | "user-cs-id" | - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | - And I am in workspace "user-workspace" Then I am in dimension space point {"language": "de"} @@ -161,9 +150,6 @@ Feature: Discard nodes partially with dimensions | baseWorkspaceName | "live" | | newContentStreamId | "user-cs-id" | And I am in workspace "user-workspace" - And the command RebaseWorkspace is executed with payload: - | Key | Value | - | workspaceName | "user-workspace" | Then I am in dimension space point {"language": "de"} And the following CreateNodeAggregateWithNode commands are executed: