Acceptance tests#

We use Cypress as Volto's acceptance test framework.

Helper commands#

There are some artifacts available for the acceptance tests made accessible to Cypress.

Access History, Redux Store and Settings#

We expose the History, Redux Store and Settings from the app (only for Cypress environments) so we can easily access them and execute actions (like navigate using the router), dispatch Redux actions or change app settings "on the fly".

Redux Store#

You can access the Redux store and check for specific states and dispatch actions by:

import { updateIntl } from 'react-intl-redux';
import deLocales from '../../locales/de.json';

const dispatch = action =>
    .invoke('dispatch', action);

    locale: 'de',
    messages: deLocales,

More information about this:

Volto settings#

You can modify on the fly the main Volto settings like this:

cy.settings().then(settings => {
  settings.defaultLanguage = 'de';
  settings.isMultilingual = true;
  settings.supportedLanguages = ['de', 'en'];