Skip to content

Commit

Permalink
TASK: Remove obsolete assertion `Then I expect the workspace to point…
Browse files Browse the repository at this point in the history
… to content stream "user-cs-identifier"`

This was just a temporal idea
  • Loading branch information
mhsdesign committed Jul 2, 2024
1 parent 90615aa commit ac6092a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Feature: On forking a content stream, hidden nodes should be correctly copied as
# node aggregate occupation and coverage is not relevant without dimensions and thus not tested

When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier"
And VisibilityConstraints are set to "withoutRestrictions"
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node user-cs-identifier;lady-eleonode-rootford;{}
And I expect this node to have the following child nodes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ Feature: ForkContentStream Without Dimensions
| newContentStreamId | "user-cs-identifier" |

When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier"

Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node user-cs-identifier;nody-mc-nodeface;{}

Scenario: When a change is applied to the forked content stream AFTER the fork, it is not visible in the live content stream.
Expand All @@ -82,15 +80,13 @@ Feature: ForkContentStream Without Dimensions

# live
When I am in workspace "live" and dimension space point {}
Then I expect the workspace to point to content stream "cs-identifier"
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{}
And I expect this node to have the following properties:
| Key | Value |
| text | "original value" |

# forked content stream
When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier"
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node user-cs-identifier;nody-mc-nodeface;{}
And I expect this node to have the following properties:
| Key | Value |
Expand All @@ -116,15 +112,13 @@ Feature: ForkContentStream Without Dimensions

# live
When I am in workspace "live" and dimension space point {}
Then I expect the workspace to point to content stream "cs-identifier"
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{}
And I expect this node to have the following properties:
| Key | Value |
| text | "modified value" |

# forked content stream
When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier"
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node user-cs-identifier;nody-mc-nodeface;{}
And I expect this node to have the following properties:
| Key | Value |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ Feature: Move dimension space point
"""
# the original content stream has not been touched
When I am in workspace "live" and dimension space point {"language": "de"}
Then I expect the workspace to point to content stream "cs-identifier"
Then I expect a node identified by cs-identifier;sir-david-nodenborough;{"language": "de"} to exist in the content graph
And I expect this node to be of type "Neos.ContentRepository.Testing:Document"


# we find the node underneath the new DimensionSpacePoint, but not underneath the old.
When I am in workspace "migration-workspace" and dimension space point {"language": "de"}
Then I expect the workspace to point to content stream "migration-cs"
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
When I am in workspace "migration-workspace" and dimension space point {"language": "de_DE"}
Then I expect a node identified by migration-cs;sir-david-nodenborough;{"language": "de_DE"} to exist in the content graph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ Feature: Publishing hide/show scenario of nodes
And I expect node aggregate identifier "sir-nodeward-nodington-iii" to lead to node cs-identifier;sir-nodeward-nodington-iii;{}
When I am in workspace "user-test"
Then I expect the workspace to point to content stream "remaining-cs-id"
Then I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
# Ensure that we are in content stream remaining-cs-id
Then I expect node aggregate identifier "lady-eleonode-rootford" to lead to node remaining-cs-id;lady-eleonode-rootford;{}
And I expect node aggregate identifier "sir-david-nodenborough" to lead to no node
And I expect node aggregate identifier "nody-mc-nodeface" to lead to no node
And I expect node aggregate identifier "sir-nodeward-nodington-iii" to lead to no node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Feature: If content streams are not in use anymore by the workspace, they can be
| baseWorkspaceName | "live" |
| newContentStreamId | "user-cs-identifier" |
When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier"
# Ensure that we are in content user-cs-identifier
Then I expect node aggregate identifier "root-node" to lead to node user-cs-identifier;root-node;{}

When the command RebaseWorkspace is executed with payload:
| Key | Value |
Expand All @@ -66,7 +67,6 @@ Feature: If content streams are not in use anymore by the workspace, they can be
Then I expect the content stream "user-cs-identifier" to not exist

When I am in workspace "user-test" and dimension space point {}
Then I expect the workspace to point to content stream "user-cs-identifier-rebased"
Then I expect node aggregate identifier "root-node" to lead to node user-cs-identifier-rebased;root-node;{}

Scenario: NO_LONGER_IN_USE content streams can be cleaned up completely (simple case)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,6 @@ public function iExpectTheContentStreamToNotExist(string $rawContentStreamId): v
);
}

/**
* @Then /^I expect the workspace to point to content stream "([^"]*)"$/
*/
public function iExpectTheWorkspaceToPointToContentStream(string $rawContentStreamId): void
{
if ($this->currentContentStreamId !== null) {
throw new \RuntimeException('programming error. invalid case.');
}

$workspace = $this->currentContentRepository->getWorkspaceFinder()->findOneByName($this->currentWorkspaceName);

Assert::assertTrue(
ContentStreamId::fromString($rawContentStreamId)->equals($workspace->currentContentStreamId),
sprintf('The workspace %s was expected to point to %s but points to %s actually.', $this->currentWorkspaceName->value, $rawContentStreamId, $workspace->currentContentStreamId->value)
);
}

/**
* @Then /^workspace ([^"]*) has status ([^"]*)$/
*/
Expand Down

0 comments on commit ac6092a

Please sign in to comment.