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 + fieldstests/features/drupal/02-01-01-varbase-heroslider-content-type.feature: the /node/add/varbase_heroslider form 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 end03-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 queue04-01-01-...-entityqueue.feature: the varbase_heroslider entity queue exists ("Hero Slider"); a created slide is pushed to it and is then listed in the subqueue.
  • Access control05-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 (via worldParameters.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, a FEATURES single-feature override, and one retry to absorb transient cumulative-load timeouts.
  • .gitlab-ci.yml — the webship-js-test job creates the Editor test account (member of the editor role) after install and runs the full tests/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

Merge request reports

Loading