Problem/Motivation

The Varbase Hero Slider 1.1.x tests/features/drupal/** webship-js suite is too thin: the scenarios only assert that pages are reachable (for example "I should not see Page not found"). That is not a meaningful functional test — it verifies neither the provided behaviour nor the real, labelled fields of the Hero Slider content type.

Since the recipe redesign (#3609140) the module's recipes/default installs a complete Hero Slider content type (node type varbase_heroslider; fields field_brief, field_link, field_media_single; the varbase_heroslider entity queue; the varbase_heroslider view; and editorial permissions granted to the editor, content_admin and site_admin roles). None of that behaviour is actually exercised by the tests.

Proposed resolution

Replace the thin reachability scenarios with a meaningful webship-js (Playwright + Cucumber-js) BDD suite that asserts visible labels, roles and the real provided behaviour of the Hero Slider content type:

  • The Hero Slider add form exposes its real labelled fields (Slide title, Slide text, Call for action link, Slide media (image/video)).
  • An editor creates a Hero Slider slide end to end — title, brief, call-to-action link and an uploaded media image — and the saved node renders the entered title, brief text and its media image.
  • The varbase_heroslider entity queue exists ("Hero Slider") and a created slide can be pushed to it and is then listed in the subqueue.
  • Access control: an editor can reach the Hero Slider add form; an anonymous visitor is denied (asserting the visible access outcome, not reachability).

Add the supporting custom step definitions (media-library upload, publish-aware save, entity-queue widget, media-render and access-denied assertions), a small test image fixture, and wire the CI webship-js-test job to create the Editor test account and run the suite. All CI jobs remain blocking (allow_failure: false).

Remaining tasks

  • ✅ 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 varbase-10.1.1, varbase_heroslider-1.1.1

User interface changes

  • N/A (test-only change).

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Added a meaningful webship-js functional test suite for the Hero Slider content type.
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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Title: Add a meaningful webship-js functional test suite for the Hero Slider content type » Add a meaningful automated functional test suite for the Hero Slider content type

  • rajab natshah committed cc193a71 on 1.1.x
    test: #3609187 Add a meaningful automated functional test suite for the...
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.1, +varbase_heroslider-1.1.1
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Issue summary: View changes
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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