special Selenium and Robot Framework -powered Sphinx-documentation base to take screenshots tour of your Plone in various browser window sizes to highlight each theme's responsive design.
Python RobotFramework HTML
Latest commit 65ce27a Nov 13, 2015 @mauritsvanrees mauritsvanrees Added CONTRIBUTING.rst.
[ci skip]
Permalink
Failed to load latest commit information.
_screenshots
source
.gitignore
.travis.yml
CHANGES.txt
CONTRIBUTING.rst
CONTRIBUTORS.txt
LICENSE.GPL
LICENSE.txt
README.rst
base.cfg
bootstrap.py
buildout.cfg
plone-4.x.cfg
plone-5.x.cfg

README.rst

plone.themepreview

plone.themepreview is a special Selenium and Robot Framework -powered Sphinx-documentation base to take screenshots tour of your Plone in various browser window sizes to highlight each theme's responsive design.

Demo

To try plone.themepreview with Plone 4.3's plonetheme.sunburst, try (with Firefox installed):

$ git clone https://github.com/plone/plone.themepreview
$ cd plone.themepreview
$ python bootstrap.py
$ bin/buildout
$ bin/sphinx-build -b html source build

After Sphinx has finished its build, you should have a beautifully looking Plone screenshots in your build-directory, similar to:

Usage

You can use plone.themepreview with your custom Plone-themes by either parametrizing plone.themepreview's buildout to include your theme package or by merging its buildout into your packages' own buildout.

plone.themepreview creates a Plone sandbox with your theme by re-using a special test layer provided in plone.app.robotframework called plone.app.robotframework.testing.PLONE_ROBOT_TESTING. This layer can be extended to include your theme add-on by providing two special environment variables:

  • ROBOT_CONFIGURE_PACKAGES, which should equals a comma separated list of packages, whose configure.zcml should read during test layer's setUpZope-phase.
  • ROBOT_APPLY_PROFILES, which accepts a comma separated list of profiles, which should be imported during test layer's setUpPloneSite-phase.

Examples

diazotheme.bootstrap

Uses plone.themepreview's buildout:

plonetheme.onegov

Merges plone.themepreview's buildout into its own:

Misc

You can speed up themepreview development cycle with robot-server, by

$ bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_FIXTURE -v

and then running an individual Sphinx-page as a Robot Framework test suite with

$ bin/robot source/mobile

Note

When plone.themepreview's Sphinx documents are run through Robot Framework for capturing screenshots, the sandbox is being reset only once for each Sphinx document (this is different from normal acceptance tests where each tests is run in isolation; it would be possible to reset the sandbox for each test, but in Sphinx's context is make sense to reset the sandbox only when document changes).