Currently there is test coverage for SiteTree and BaseElement objects in preview panels in the cms and elemental modules respectively, but there's no test coverage for previews in general.
The below list is not necessarily an exhaustive list of useful tests that could be implemented.
Behat tests
[ ] The preview panel is not present if the object belonging to the current form does not implement CMSPreviewable
[ ] The preview panel is present but collapsed by default if the object belonging to the current form implements CMSPreviewable but returns an empty value from PreviewURL()
[ ] The preview panel is present and displays the correct content if the object belonging to the current form implements CMSPreviewable and returns a valid relative URL path from PreviewURL()
[ ] Unversioned and Versioned objects are tested, including published and unpublished objects, and swapping preview modes
[ ] Swapping preview sizes
[ ] For CMS 5 only (assuming #1363 and silverstripe/silverstripe-cms#2779 are merged): The DataObject doesn't need to implement CMSPreviewable so long as it has an Extension that does.
Currently there is test coverage for
SiteTree
andBaseElement
objects in preview panels in the cms and elemental modules respectively, but there's no test coverage for previews in general.The below list is not necessarily an exhaustive list of useful tests that could be implemented.
Behat tests
CMSPreviewable
CMSPreviewable
but returns an empty value fromPreviewURL()
CMSPreviewable
and returns a valid relative URL path fromPreviewURL()
DataObject
doesn't need to implementCMSPreviewable
so long as it has anExtension
that does.