neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 218 forks source link

BUGFIX: Dont initialize $currentContentStreamId by default in behat tests #5162

Closed mhsdesign closed 5 days ago

mhsdesign commented 1 week ago

Related https://github.com/neos/neos-development-collection/issues/5034

With https://github.com/neos/neos-development-collection/pull/5040 the step I am in the active content stream of workspace "live" was turned into I am in workspace "live".

That is problematic as the step

 And I am in workspace "live"

now hardcodes the $currentContentStreamId making assertions after changing the workspaces content stream (publish or discard) seem at first broken.

A current workaround is to repeat the step after discarding for example:

When the command DiscardWorkspace is executed with payload:
  | Key           | Value         |
  | workspaceName | "user-editor" |
# FIXME we have to reevaluated the step as we cache the $currentContentStreamId and it will be outdated after the discard
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

... but all test pass after these adjustments so id say we dont need the hack in the first place.

Upgrade instructions

Review instructions

Checklist