test: #3609187 Add a meaningful automated functional test suite for the Hero Slider content type
Issue
#3609187 Add a meaningful automated functional test suite for the Hero Slider content type
What this does
Replaces the thin reachability-only scenarios (which merely asserted "not Page not found") with a meaningful webship-js (Playwright + Cucumber-js) BDD suite that exercises the real Hero Slider behaviour installed by recipes/default, asserting visible labels, roles and the provided behaviour:
- Content type + fields —
tests/features/drupal/02-01-01-varbase-heroslider-content-type.feature: the/node/add/varbase_herosliderform exposes its real labelled fields — Slide title, Slide text (field_brief), Call for action link (field_link) and Slide media (image/video) (field_media_single). - Create a slide end to end —
03-01-01-...-create-slide.feature: an editor fills the title, brief and call-to-action link, uploads a media image through the Media library, saves, and the saved node renders the entered title, the brief text and its media image. - Entity queue —
04-01-01-...-entityqueue.feature: thevarbase_herosliderentity queue exists ("Hero Slider"); a created slide is pushed to it and is then listed in the subqueue. - Access control —
05-01-01-...-permissions.feature: an editor can reach the add form; an anonymous visitor is denied (asserting the visible access outcome, not reachability).
Supporting changes:
tests/step-definitions/varbase_heroslider.steps.js— custom steps: named-user login (viaworldParameters.users), anonymous session, admin-page opener, Media-library image upload (DropzoneJS-aware, self-contained — no pre-seeded media), publish-aware node save (works on Gin/moderated and Claro/non-moderated), entity-queue widget, media-render assertion and an access-denied assertion. Raises the per-step timeout for the heavy single-site run.tests/files/hero-test-image.png— a tiny image fixture for the upload flow (no live remote oEmbed).cucumber.js— adds the Editor test user, aFEATURESsingle-feature override, and one retry to absorb transient cumulative-load timeouts..gitlab-ci.yml— thewebship-js-testjob creates the Editor test account (member of theeditorrole) after install and runs the fulltests/features/drupal/**suite. All jobs remain blocking (allow_failure: false).
Verified locally against a full Varbase (Drupal 11.4) site: all 6 scenarios pass.
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release
AI-Generated: Yes (Used Claude Code to author the scenarios, custom step definitions and CI wiring, verified locally against a live Varbase 11.4 site.)
Edited by Rajab Natshah