-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
TASK: Make E2E tests work for Neos 9.0 #3569
Conversation
…e-tests-on-8-2' into task/e2e-tests-on-9-0
This includes the replacement of the 1Dimension site export with an equivalent ESCR event export, as well as the adjustment of the e2e-docker.sh script for bootstrapping the test environment.
…result This fixes a regression introduced in: #3173
Using the `PendingChangesProjection` from Neos.Neos, which after neos/neos-development-collection#4393 will track all nodes that have been newly created within the workspace that contains the change set that is being discarded.
….isEditMode(request) || Neos.Backend.isPreviewMode(request)`
This includes the replacement of the 2Dimension site export with an equivalent ESCR event export. Also, as a temporary fix, neos/neos-development-collection#4395 was added as a patch.
…e' into task/e2e-tests-on-9-0
As it turns out, using nodeAddresses rather than context paths, these feedbacks are no longer necessary.
With this change, the UI will default to the default inPlace edit mode, regardless of user-side selection. Actual full-blown support for EditPreviewModes will require deeper changes over the entire code base.
30cf764
to
58cfe98
Compare
58cfe98
to
e018877
Compare
e4356fe
to
45c2cf6
Compare
45c2cf6
to
895ca5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just looked over this - GREAT WORK <3 <3 I'll check that we get the dependent PRs merged soon, so that we can get this one in.
As there might be a collision as you pointed out, i will take care of reviewing and merging: #3503 Also it seems like neos/neos-development-collection#4067 is blocking this pr from moving forward so we should definitely focus there as well ;) But we discussed in the last escr meeting a plan for the preview modes its going forward - slowly ^^ |
const nodeContextPathElement = d.querySelector('.node-context-path'); | ||
if (!nodeContextPathElement) { | ||
throw new Error('.node-context-path is not found in the result'); | ||
} | ||
|
||
const nodeContextPath = nodeContextPathElement.innerHTML.trim(); | ||
if (!nodeContextPath) { | ||
throw new Error('.node-context-path is empty'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this work previously ??? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose .node-context-path
was never empty before, but occurred to be empty during the tests, because of all the backend changes.
@@ -142,7 +142,7 @@ export function * watchCurrentDocument({globalRegistry, configuration}) { | |||
} | |||
|
|||
const state = yield select(); | |||
const childrenAreFullyLoaded = $get(['cr', 'nodes', 'byContextPath', contextPath, 'children'], state) | |||
const childrenAreFullyLoaded = ($get(['cr', 'nodes', 'byContextPath', contextPath, 'children'], state) || []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix could be backported as well no?
(would also take care of it just vote: 👍 👎 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My plan was to leave the plow-js calls as they are for now and take care of replacing them in #3306, right after the E2E tests have been merged.
I added a hack so the tests should now work in ci :D - will take care of a proper fix. locally -> it seems one needs to modify the
so we need a tutorial for this for mac as well ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ran the tests make test-e2e-docker
locally on my mac and they work flawlessly!
As soon as the ci is green we can merge this :D
3e0e179
to
50f1a4f
Compare
50f1a4f
to
dd99278
Compare
refs: #3546, #3406
includes: #3571includes: #3618This is the third and final in a series of PRs leading up to Neos 9.0. I want to make sure that our E2E tests can be executed locally on every maintained branch.
How to test this
You should of course be able to run the E2E tests locally via
make test-e2e-docker browser=chromium # or browser=chrome
The E2E tests use
cweagans/composer-patches
to include patches from the development collection. Documentation can be found here: https://github.com/cweagans/composer-patches/blob/1.x/README.mdWe discussed to keep this dependency to make developing across repos easier ;)
Remaining TODOs
Neos.Node.inBackend
andnode.context.currentRenderingMode.edit
can no longer be relied upon that easilynode.context.currentRenderingMode.edit
rector#23bc51a' to deeply equal '/sites/neos-test-site@user-admin;language=en_US'"
/sites/neos-test-site@user-admin;language=en_US
anduser-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__d7315383-adb8-45a5-8124-ffabeeebc51a
represent the same nodeuser-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__f676459d-ca77-44bc-aeea-44114814c279
.d7315383-adb8-45a5-8124-ffabeeebc51a
presumably refers to the node that has just been discarded in this test. Redirect to the home page ought to happen, but fails.TODO: SITE NOT FOUND; should not happen (for address NodeAddress[contentStream=9ce2581c-6e0a-467a-ad33-37c7133ce3a2, dimensionSpacePoint={"language":"en_US"}, nodeAggregateId=6b0b30db-933b-4c3d-b47b-0a7beed6c315, workspaceName=user-admin]
equal '/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-e8tw6sparbtp3@user-admin;language=en_US'"
/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-e8tw6sparbtp3@user-admin;language=en_US
anduser-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df
represent the same nodeneos-ui/Tests/IntegrationTests/Fixtures/1Dimension/SitePackage/Resources/Private/Content/Sites.xml
Line 472 in bc6569f
equal '/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-e8tw6sparbtp3@user-admin;language=en_US'"
/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-e8tw6sparbtp3@user-admin;language=en_US
anduser-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df
represent the same nodeneos-ui/Tests/IntegrationTests/Fixtures/1Dimension/SitePackage/Resources/Private/Content/Sites.xml
Line 472 in bc6569f
equal '/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-oml0cxaompt29@user-admin;language=en_US'"
/sites/neos-test-site/node-knm2pltb5454z/node-18qsaeidy6765/node-oml0cxaompt29@user-admin;language=en_US
anduser-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__84eb0340-ba34-4fdb-98b1-da503f967121
represent the same nodeneos-ui/Tests/IntegrationTests/Fixtures/1Dimension/SitePackage/Resources/Private/Content/Sites.xml
Line 499 in bc6569f
Router route(): No route matched the route path "neos/service/content-dimensions/country.json"
show
action ofContentDimensionsController
neos-development-collection#4395We're running into Cannot execute the test when it is redirected to another application with auth token in the URL DevExpress/testcafe#7548 on this onenull
if first login to the site happens via "/neos/switch/to/..." neos-development-collection#4401, but only if the switch sites test is executed in isolation (because otherwise,switchDimensions
runs first, which creates the missing user workspace)Update Testcafé to v3 and use proxyless mode to execute testsBuckle up for collisions with BUGFIX: Reflect discard of node move changes correctly in the UI #3503-> merge this firstshow
action ofContentDimensionsController
neos-development-collection#4395Neos.Flow.object.includeClasses
hack!