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/pageand see the Revision Manager accordion panel.
Bundle overrides stick
- On the Page edit form, enable a plugin and save.
- Check that the
node_type.pageconfig 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_revisionsqueue 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | revision-manager-admin-ui-functional-test.patch | 35.66 KB | ramu_bharu |
Issue fork revision_manager-3522620
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
Comment #2
ramu_bharu commentedHi Jordan,
Attached patch for simple browser tests for the admin UI.
Thanks,
Ramu
Comment #4
j-barnes commentedComment #6
j-barnes commentedMerged! Thanks for all of the work on this!
Comment #7
j-barnes commented