Let’s get some quick functional tests around our admin pages and bundle-edit forms to catch regressions early. A handful of small specs should do it, here are some ideas:

Overview page

  • Visit /admin/config/system/revision-manager
  • Make sure each entity type (node, media, taxonomy term, block content, group, menu links) has its accordion with an “Enabled” checkbox and the plugin fieldsets underneath.

Show/hide plugins

  • Check “Enabled” for nodes and verify the Amount/Age forms and bundle table appear.
  • Uncheck it and ensure they hide again.

Bundle “Configure” link

  • Click the dropbutton → “Configure” for the Page bundle.
  • Confirm you land on /admin/structure/types/manage/page and see the Revision Manager accordion panel.

Bundle overrides stick

  • On the Page edit form, enable a plugin and save.
  • Check that the node_type.page config has a third-party setting and the overview now reads “Overridden.”

Enqueue now

  • On the overview, enable a plugin, tick “Enqueue all entities now,” then save.
  • Pull items from the revision_manager_remove_revisions queue and assert you got one per entity.

Global settings

  • Flip “Log to watchdog” and “Disable auto-queue,” then save.
  • Verify those settings land in revision_manager.settings.

Bundle-edit accordion

  • For media types, vocabularies, block types, group types, and menus—visit their edit forms.
  • Confirm the Revision Manager details show up under “Additional settings.”
  • Toggle a plugin there, save, and verify it creates/removes the third-party override.

Form validation

  • Enter an invalid value (e.g. negative or non-integer) into the “Minimum number of revisions to keep” field and assert you get a validation error.
  • Leave the field blank and confirm it’s required.

Permission checks

  • Log in as a user without administer revision_manager and assert the admin page returns 403.
  • On a bundle edit form, confirm the Revision Manager section is hidden for that user.

Disable automatic queueing

  • Enable a plugin but leave “Disable automatic queueing” checked in the global settings.
  • Create a new revision on a node and assert that no item is added to the queue.

Bundle-edit enqueue shortcut

  • On a bundle’s edit form (e.g. page type), check “Enqueue all entities now” and save.
  • Assert the queue contains one item per existing entity of that bundle.

Default values & reset

  • Visit the admin page on a fresh install and verify the plugin default values match the shipped defaults.
  • Override a bundle, then revert to defaults (uncheck “Enabled”) and save; confirm the third-party setting is removed.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

j-barnes created an issue. See original summary.

ramu_bharu’s picture

Hi Jordan,

Attached patch for simple browser tests for the admin UI.

Thanks,
Ramu

j-barnes’s picture

Status: Active » Needs review

  • j-barnes committed 7488e0d9 on 1.0.x authored by ramu_bharu
    Issue #3522620 by ramu_bharu, j-barnes: Add a few simple browser tests...
j-barnes’s picture

Merged! Thanks for all of the work on this!

j-barnes’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.