Skip to content

backdrop-contrib/backstop_generator

Repository files navigation

BackstopJS Generator

Generates BackstopJS configuration files from the Backdrop admin interface, so you can run visual regression tests on your site without hand-writing backstop.json.

Create profiles, add viewports and scenarios, and either list URLs manually or pull them automatically from a menu or content type. When you're ready, export the JSON and hand it to BackstopJS.

Requirements

  • BackstopJS installed on the machine where tests will be run (this module does not run tests, only generates the config).

Installation

Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules.

Once enabled, go to "Administer" -> "Configuration" -> "Development" -> "BackstopJS Generator" to create your first profile.

Usage

  1. Create a profile with your test and reference domains.
  2. Add one or more viewports (desktop, tablet, mobile, etc.).
  3. Add scenarios manually, or use the "Generate from menu" / "Generate from content type" buttons to populate them in bulk.
  4. Click "Export" to preview the backstop.json, or "Download" to save the file.

Each scenario supports per-page overrides for delay and mismatch threshold, plus ready/hide/click selectors and optional login credentials.

Permissions

The module defines a single permission: administer backstop generator. Only users with this permission can create or edit profiles.

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

Maintainers

Credits

This module was inspired by the BackstopJS Generator module for Drupal — https://www.drupal.org/project/backstop_generator — and written from scratch for Backdrop CMS. Functionality may differ from the Drupal version.

BackstopJS is developed and maintained by Garris Shipon and contributors — https://github.com/garris/BackstopJS.

About

Generate Backstop Js visual regression testing configuration files directly from the Backdrop CMS admin interface. Manage profiles, view ports, and scenarios with auto-discovery from menus and content types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages