diff --git a/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature b/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature
index 90463864f49..ad0872ce9c3 100644
--- a/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature
+++ b/Neos.Neos/Tests/Behavior/Features/ContentCache/NodesInUserWorkspace.feature
@@ -91,7 +91,7 @@ Feature: Tests for the ContentCacheFlusher and cache flushing when applied in us
}
"""
- Scenario: ContentCache gets flushed when a node that was just created gets discarded
+ Scenario: ContentCache gets flushed when a node that was just created gets discarded via "Discard All"
Given I have Fusion content cache enabled
And I am in workspace "user-editor" and dimension space point {}
And the Fusion context node is "test-document-with-contents"
@@ -141,3 +141,56 @@ Feature: Tests for the ContentCacheFlusher and cache flushing when applied in us
"""
[Text Node at the start of the document][Text Node at the end of the document]
"""
+
+ Scenario: ContentCache gets flushed when a node that was just created gets discarded via "Discard Individual Nodes"
+ Given I have Fusion content cache enabled
+ And I am in workspace "user-editor" and dimension space point {}
+ And the Fusion context node is "test-document-with-contents"
+ And I execute the following Fusion code:
+ """fusion
+ test = Neos.Neos:ContentCollection {
+ nodePath = "main"
+ }
+ """
+ Then I expect the following Fusion rendering result:
+ """
+ [Text Node at the start of the document][Text Node at the end of the document]
+ """
+
+ When the command CreateNodeAggregateWithNode is executed with payload:
+ | Key | Value |
+ | nodeAggregateId | "text-node-middle" |
+ | nodeTypeName | "Neos.Neos:Test.TextNode" |
+ | parentNodeAggregateId | "test-document-with-contents--main" |
+ | initialPropertyValues | {"text": "Text Node in the middle of the document"} |
+ | succeedingSiblingNodeAggregateId | "text-node-end" |
+ | nodeName | "text-node-middle" |
+ And I execute the following Fusion code:
+ """fusion
+ test = Neos.Neos:ContentCollection {
+ nodePath = "main"
+ }
+ """
+ Then I expect the following Fusion rendering result:
+ """
+ [Text Node at the start of the document][Text Node in the middle of the document][Text Node at the end of the document]
+ """
+
+ When the command DiscardIndividualNodesFromWorkspace is executed with payload:
+ | Key | Value |
+ | workspaceName | "user-editor" |
+ | nodesToDiscard | [{"nodeAggregateId": "text-node-middle", "dimensionSpacePoint": {}}] |
+ | newContentStreamId | "cs-identifier-modified" |
+ And I am in workspace "user-editor" and dimension space point {}
+ Then I expect node aggregate identifier "text-node-middle" to lead to no node
+
+ When I execute the following Fusion code:
+ """fusion
+ test = Neos.Neos:ContentCollection {
+ nodePath = "main"
+ }
+ """
+ Then I expect the following Fusion rendering result:
+ """
+ [Text Node at the start of the document][Text Node at the end of the document]
+ """