Skip to content

Commit

Permalink
TASK: Test mark dependents of live outdated after direct change
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Oct 17, 2024
1 parent b4fd77b commit 630adf1
Showing 1 changed file with 109 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
@contentrepository @adapters=DoctrineDBAL
Feature: Workspace status
The workspace status signals if the workspace is UP_TO_DATE or OUTDATED
All depending workspaces are considered OUTDATED if changes are made or published into a workspace

Background:
Given using no content dimensions
And using the following node types:
"""yaml
'Neos.ContentRepository.Testing:Content':
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" |
| newContentStreamId | "cs-identifier" |
And I am in workspace "live" and dimension space point {}
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 | nodeTypeName | parentNodeAggregateId | nodeName |
| nody-mc-nodeface | Neos.ContentRepository.Testing:Content | lady-eleonode-rootford | child |

And the command SetNodeProperties is executed with payload:
| Key | Value |
| workspaceName | "live" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
| propertyValues | {"text": "Original"} |

And the command CreateWorkspace is executed with payload:
| Key | Value |
| workspaceName | "user-ws-one" |
| baseWorkspaceName | "live" |
| newContentStreamId | "user-cs-one" |

And the command CreateWorkspace is executed with payload:
| Key | Value |
| workspaceName | "shared" |
| baseWorkspaceName | "live" |
| newContentStreamId | "shared-cs-identifier" |

And the command CreateWorkspace is executed with payload:
| Key | Value |
| workspaceName | "user-ws-two" |
| baseWorkspaceName | "shared" |
| newContentStreamId | "user-cs-two" |

Scenario: Changes to the root workspace render dependents outdated
Then workspaces live,shared,user-ws-one,user-ws-two have status UP_TO_DATE

And the command SetNodeProperties is executed with payload:
| Key | Value |
| workspaceName | "live" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
| propertyValues | {"text": "Revision"} |

Then workspace live has status UP_TO_DATE
Then workspaces shared,user-ws-one have status OUTDATED
# the others users workspace is not outdated because it depends on shared
Then workspace user-ws-two has status UP_TO_DATE

Scenario: Publishing to the root workspace render dependents outdated
Then workspaces live,shared,user-ws-one,user-ws-two have status UP_TO_DATE

And the command SetNodeProperties is executed with payload:
| Key | Value |
| workspaceName | "user-ws-one" |
| nodeAggregateId | "nody-mc-nodeface" |
| originDimensionSpacePoint | {} |
| propertyValues | {"text": "Revision"} |

Then workspaces live,shared,user-ws-one,user-ws-two have status UP_TO_DATE

And the command PublishWorkspace is executed with payload:
| Key | Value |
| workspaceName | "user-ws-one" |

Then workspaces live,user-ws-one have status UP_TO_DATE
Then workspace shared has status OUTDATED
# the others users workspace is not outdated because it depends on shared
Then workspace user-ws-two has status UP_TO_DATE

#
# Rebasing to get everything up to date
#

When the command RebaseWorkspace is executed with payload:
| Key | Value |
| workspaceName | "shared" |
| rebasedContentStreamId | "shared-rebased" |

Then workspaces live,shared,user-ws-one have status UP_TO_DATE
Then workspace user-ws-two has status OUTDATED

When the command RebaseWorkspace is executed with payload:
| Key | Value |
| workspaceName | "user-ws-two" |
| rebasedContentStreamId | "user-ws-two-rebased" |

Then workspaces live,shared,user-ws-one,user-ws-two have status UP_TO_DATE

0 comments on commit 630adf1

Please sign in to comment.