plone / plone.app.testing

Testing tools for Plone-the-application
http://pypi.python.org/pypi/plone.app.testing
2 stars 7 forks source link

Create a layer that creates a site Volto #80

Open wesleybl opened 1 year ago

wesleybl commented 1 year ago

Today all Plone tests are run on a Classic site. However, Volto is the default interface of Plone 6. It would be nice to have a layer that creates a Volto Site, so we can test against a Volto site. Maybe this layer should be made the "default layer" in the future.

davisagli commented 1 year ago

The main difference is whether plone.volto is installed. plone.volto already has layers which are used for its own tests, and could be used as a basis for tests in other packages: https://github.com/plone/plone.volto/blob/main/src/plone/volto/testing.py

The end-to-end Cypress tests in plone/volto also run against a backend with plone.volto installed.

But, you're right. We should take a look at making more tests run with Volto.

wesleybl commented 1 year ago

@davisagli wouldn't it be the case to bring the layer from plone.volto came here? Now plone.volto is a Plone dependency.

No plans to make Site Volto the default testing site in the future? I know this will break a lot of tests, but it seems to be the way to go, since Volto will be Plone's default interface.

davisagli commented 1 year ago

@wesleybl I guess the first step is to try it and see how many tests will need to be adjusted.

wesleybl commented 1 year ago

@davisagli well I think many tests will break. plone.volto removes the folders and many tests create folders. Also the use of blocks removes many content fields, which are accessed by robots tests. So we would have to create a "Plone Classic" layer to be used in all tests that break.

wesleybl commented 1 year ago

See: #81

wesleybl commented 1 year ago

Another thing that would be nice is to have a version of plone.app.testing only for Plone 6. This would avoid having to mess with branches of packages that are only for Plone 5.2.