Problem/Motivation

The functional test suite of Varbase Content Base recipe cannot start. cucumber-js aborts immediately with:

Error: @cucumber/pretty-formatter does not export a function/class

This is pre-existing. It reproduces on a completely untouched checkout of 1.0.x, with the current "@vardot/varbase-e2e": "^2" constraint left alone.

The cause is an unpinned transitive dependency. @vardot/varbase-e2e asks for @cucumber/cucumber at *, this project commits no lock file, and it declares no overrides or resolutions. So a fresh install resolves @cucumber/cucumber to 13.2.1, while @cucumber/pretty-formatter is still on the 1.0.x line, which is not compatible with cucumber 13. Nothing pins the pair to versions that work together.

Varbase Starter is the control that proves the diagnosis: its suite runs, and the only relevant difference is that it pins @cucumber/cucumber to 12.9.0 and @cucumber/pretty-formatter to 1.0.1, in both overrides and resolutions.

Steps to reproduce

  1. Check out the 1.0.x branch, unchanged.
  2. Run npm install, then npx cucumber-js --dry-run.
  3. It aborts with the pretty-formatter error above. No scenario is even counted.

Proposed resolution

Mirror Varbase Starter: pin @cucumber/cucumber to 12.9.0 and @cucumber/pretty-formatter to 1.0.1 in both overrides and resolutions. Following the precedent already set in the family is the least surprising thing for a maintainer to review, and it is the change that is known to work rather than a new idea.

Verified, not reasoned about: after the change the installed versions are cucumber 12.9.0 and pretty-formatter 1.0.1, and the dry run is 6 scenarios and 26 steps, all skipped with no errors, nothing undefined and nothing ambiguous.

The @vardot/varbase-e2e constraint is also moved from ^2 to ^2.0.4 in the same change. That bump rides along deliberately: until the suite can start at all, a version bump here has no observable effect. 2.0.4 adds 17 built-in steps — access assertions, page title assertions, an added HTTP status phrasing — and makes the existing HTTP status step session aware, where it used to re-request the URL outside the browser and so lose the session cookies and follow redirects.

AI-Generated: Yes

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ 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 functional test suite can run again, and now requires @vardot/varbase-e2e 2.0.4 or newer.
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 committed 482c02a1 on 1.0.x
    fix: #3621426 Pin @cucumber/cucumber so the functional test suite can...
rajab natshah’s picture

Status: Active » Fixed
Issue tags: +varbase_content_base-1.0.1

✅ Released in Varbase Content Base 1.0.1 (commit 482c02a). The release notes now list it.

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.