Problem/Motivation
Admin Audit Trail logs CUD events for many entity types through a base module and fifteen handler submodules (node, user, user
roles, taxonomy, menu, block content, comment, file, media, workflows, authentication, redirect, entity queue, group, paragraphs),
and surfaces them in a Views-based report at /admin/reports/audit-trail. None of this is covered by automated
browser tests, so regressions in event logging, the report, the exposed filters, the settings form or access control can only be
caught by hand.
Separately, admin_audit_trail_safe_truncate() truncates reference values by bytes
(strlen()/substr()), which can corrupt multibyte UTF-8 (e.g. Arabic titles or usernames) by splitting a character mid-sequence.
Proposed resolution
Add a full functional acceptance test suite using webship-js (Playwright + Cucumber-js BDD) that drives a real
site through the browser, performs create/update/delete actions on each audited entity type, and asserts the matching row appears
in the report.
- webship-js project at the module root (
cucumber.js,cucumber.shared.js,
playwright.config.ts,package.jsonscripts) with a pinned, reproducible Cucumber/Playwright
toolchain. - Features under
tests/features/drupal/, custom steps in
tests/step-definitions/admin_audit_trail.steps.js, named selectors intests/selectors/, and a Drush
fixtures scripttests/fixtures/provision-fixtures.php(image media type, Editorial workflow on Article, a group type,
a paragraph type + field). - Coverage: smoke, report structure, exposed filters, settings form, the legacy report, access control, accessibility
(axe-core), and one functional feature per handler submodule (node insert/update/delete; user; user roles; taxonomy vocabulary +
term; menu + menu link; block content; comment; file; media; workflows; auth logout/fail/password request; redirect; entity queue;
group; paragraphs). webship-js-testjob added to.gitlab-ci.yml(Drupal Standard profile, all submodules enabled,
fixtures provisioned, HTML/PDF/JUnit + screenshots/videos artifacts), plus a self-contained.gitlab-ci-local.ymlfor
running the whole pipeline locally withgitlab-ci-local.- Fix
admin_audit_trail_safe_truncate()to truncate by characters usingmb_strlen()and
\Drupal\Component\Utility\Unicode::truncate().
Result: 39 scenarios / 174 steps passing on a clean Drupal 11 install and under
gitlab-ci-local, with all jobs set to allow_failure: false.
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ✅ Automated unit testing coverage
- ✅ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ➖ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ➖ Documentation
- ✅ Code review by maintainers
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Release notes snippet
- ✅ Release admin_audit_trail-1.0.10
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- ci: #3593632 Add automated functional acceptance testing for Admin Audit Trail with webship-js (Playwright + Cucumber-js) covering the base module and every handler submodule
Comments
Comment #4
rajab natshahComment #5
rajab natshahComment #6
rajab natshahComment #8
rajab natshah✅ Released admin_audit_trail-1.0.10