Problem/Motivation

The project template's functional tests (1 feature file) run on webship-js, with the step definitions and the settings kept in the project itself (cucumber.js, tests/step-definitions/).

The public step pack @webship-js/drupal-core-steps 2.1 (npm, GitHub) now ships, for any Drupal core site:

  • login by handle (verified, with a Honeypot-aware loginWait) and Given I add the testing users from the users registry
  • named administration pages, status messages, listings and operations
  • the media library, CKEditor and access control (I should be denied access to "...")
  • site structure assertions, Layout Builder steps, a selector preset and the complete default settings

Local copies drift from the pack and duplicate its maintenance. In this project:

  • The suite is one smoke feature with one scenario, and tests/step-definitions/custom.js defines no step, so no custom step can be ambiguous with the pack.
  • cucumber.js has no users registry, although a comment in .gitlab-ci.yml says that the test accounts the CI job creates match worldParameters.users.
  • composer.json requires drupal/coder at ^8.3 in require-dev, while 9.0.1 is released.
  • The default branch is 11.0.x: it requires Drupal core ~11.4.0 and webship/webship at 11.0.x-dev, its yarn.lock is in the Yarn 1 format and resolves webship-js 2.0.4, engines.node is >= 20.0 and CI uses node:20. The supported 12.0.x (release 12.0.2) requires webship/webship at ~12.0, has no lock file and uses node:24.

Related: #3635933 (Node.js 24 and Yarn 4.18.1).

Steps to reproduce

  1. Read cucumber.js, tests/step-definitions/custom.js and tests/features/ on the 12.0.x branch.
  2. cucumber.js has no users block, and custom.js defines no step.
  3. Compare the default branch 11.0.x with 12.0.x (composer.json, package.json, yarn.lock, .gitlab-ci.yml), and read require-dev in composer.json.

Proposed resolution

The pack's 2.1.0 is on npm.

  1. Add @webship-js/drupal-core-steps (^2.1.0) to the package.json devDependencies and its step glob (node_modules/@webship-js/drupal-core-steps/tests/step-definitions/**/*.js) to cucumber.js, between webship-js's own glob and the project's own. webship-js stays at ^2.0.6.
  2. Add a users registry in the pack's shape (username, email, password, roles, isAdmin) to cucumber.js. Use the accounts .gitlab-ci.yml creates.
  3. No custom step collides with the pack, so none is removed for that reason. Add scenarios with the pack's steps (log in by handle, the status report, the administration pages) to the smoke suite, or point the README at the suites of the site templates.
  4. Add a test:dry script (cucumber-js --dry-run) and a dry run in CI before the browser job, so an undefined or ambiguous step fails early.
  5. Set the default branch to 12.0.x. Move drupal/coder to ^9.0 and check that the phpcs job still passes. Check the other constraints against the current releases.
  6. One merge request on the 12.0.x branch from an issue fork, pipeline green, then a release.

AI-Generated: Yes (issue text)

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

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • The automated tests run on the @webship-js/drupal-core-steps step pack; CI runs a dry run first.

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes

  • rajab natshah committed 66ccff4f on 3636722-drupal-core-steps
    task: #3636722 Keep generated files out of the repository
    
    The test...

  • rajab natshah committed 66ccff4f on 12.0.x
    task: #3636722 Keep generated files out of the repository
    
    The test...

  • rajab natshah committed 2ae1af85 on 12.0.x
    task: #3636722 Use @webship-js/drupal-core-steps 2.1 for the webship-js...
rajab natshah’s picture

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.