-
-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust behat test to only operate on workspace names #5034
Comments
If we don’t communicate content stream IDs anymore, we don’t need them as testing runtime variables either |
Bernhard wrote:
And remove the internal testing hack |
i see that
but dont we want to have |
this might not be easily doable:
|
// cc @nezaniel |
I guess we'll have to resolve the NodeDiscriminators in another way, like using the Node's workspace name, fetching the workspace from the CR and then compare the content stream ID. |
as discussed today, we should try to keep the content stream concept as "low-level" as possible. As a result, we agreed to
It seems to make sense to still implicitly test, that a node resides in a certain CS and replacing And I expect a node identified by cs-identifier;nody-mc-nodeface;{"language":"mul"} to exist in the content graph with something like And I expect a node identified by live;nody-mc-nodeface;{"language":"mul"} to exist in the content graph would make this test a little less specific. As a result, we suggest to keep the current format of describing nodes via their CS (where it makes sense) but to resolve the corresponding workspace name in the respective step implementation. |
i forget a point in the weekly. The Lines 150 to 153 in ea28204
By using the Line 57 in 010d976
the workspace of the node will not be correct, in our cases it will actually be live due to the initialiser We should probably change the step to:
... that makes this a little more complicated as we cannot use the 'real' workspace finder but have to check first if current content-stream id is set and have to use that, which would not be correct if we have a foreign
|
I would suggest to change that to just And I am in workspace "<workspace-name>" and dimension space point {} |
well there is no workspace at that point... see the mentioned usage or any of the other 15 ones. We would have to create a workspace first and point it there ... but the point of the test was i guess to test the forking only ... and i dont now if |
OK, I see this scenario When the command "ForkContentStream" is executed with payload:
| Key | Value |
| contentStreamId | "user-cs-identifier" |
| sourceContentStreamId | "cs-identifier" |
And I am in content stream "user-cs-identifier" and dimension space point {} won't work – from an API point of view, there is no way to access this node in the forked content stream.. For the next scenario: # live
When I am in content stream "cs-identifier" and dimension space point {}
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 content stream "user-cs-identifier" and dimension space point {}
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 |
| text | "modified value" | I would suggest to rewrite When I am in workspace "live" and dimension space point {}
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 content stream "user" and dimension space point {}
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 |
| text | "modified value" | |
exactly, kinda, thats why we created the internal api (that was the major part of our discussions regarding the content graph adapter change) ContentGraphFinder::getByWorkspaceNameAndContentStreamId(WorkspaceName::fromString('missing'), $anyContentStreamId);
Nope. The neos-development-collection/Neos.ContentRepository.Core/Classes/Feature/WorkspaceCommandHandler.php Lines 203 to 208 in 7db53b6
And sending plain |
I would suggest that those tests are testing low level functinoality "behind the balck box" of the public API, and therefore we might just do the same on the testing side? aka look in the DB or whatever is necessary... |
or we really just introduce the syntax 9.0 weekly - 01-03-2024
edit 1: -> PR which implements this #5167 edit 2: the commit "TASK: Remove deprecated usage |
yes that doenst sound so bad as well but on the other hand we have the test now.
They use simple assertions like Further If this thesis is true, it means our test are allowed to also use the subgraph in such forked content stream. If not we can probably just omit manually forking and create a workspace instead which will do the forking for us? |
I guess that's the decision we have to make. Atm it looks like |
Jip, using Started playing around with this in a third approach 😂 #5169 see commit This will also allow us to fully get rid of before:
after
... we could even leave out the newly added step |
Jip #5169 is definitely the right direction and in combination with
|
I see there are 5 different step syntaxes to change the workspace and or content stream id.
I am in workspace "live"
currentWorkspaceName
I am in content stream "cs-id"
orI am in content stream "cs-id" and dimension space point {}
currentContentStreamId
I am in the active content stream of workspace "live"
orI am in the active content stream of workspace "live" and dimension space point {}
currentWorkspaceName
¤tContentStreamId
We hardly use the logic you introduced - only 8 times - as otherwise the
currentContentStreamId
will be set.Also problematic, as you pointed out in slack, is that the step
I am in content stream "cs-id" ...
will no longer be supported really as api ...I dont know how what the plan is cc @nezaniel
Originally posted by @mhsdesign in #5028 (comment)
see also https://neos-project.slack.com/archives/C04PYL8H3/p1714846896689819 and https://neos-project.slack.com/archives/C04PYL8H3/p1714742146900109
The text was updated successfully, but these errors were encountered: