fix: #3621422 Set the node-modules linker so the functional test suite can load its step definitions
Makes the Varbase Core functional test suite able to load its step definitions at all, and moves the harness onto ^2.0.4 in the same change.
The breakage this fixes is pre-existing. On an untouched checkout of 10.1.x with the current ^2 constraint, the dry run reports 3 scenarios all undefined; 20 steps, 13 undefined. Nothing in today's work caused it.
Issue: https://www.drupal.org/project/varbase_core/issues/3621422
Why it was broken
The project ships no .yarnrc.yml, so Yarn 4 defaults to Plug'n'Play: it writes .pnp.cjs and never creates node_modules. But cucumber.js loads the library steps with the glob node_modules/@vardot/varbase-e2e/tests/step-definitions/**/*.js. Under Plug'n'Play that directory does not exist, and a glob cannot look inside a PnP zip, so the pattern matches nothing — silently. Only the project's own steps loaded.
What changed
.yarnrc.yml: new file,nodeLinker: node-modules.package.json:"@vardot/varbase-e2e"from"^2"to"^2.0.4".yarn.lock: refreshed (1719 insertions, 20 deletions). The diff is large because the committed lock carried no entry at all for@vardot/varbase-e2e, so its dependency tree was never recorded. That gap is pre-existing.
I chose this fix by looking at what the projects whose suites DO work actually do, rather than by reasoning about PnP: 19 of the other Varbase projects already carry nodeLinker: node-modules, and the four whose suites cannot load steps are exactly the four that do not. This makes Varbase Core match the family instead of introducing a one-off.
Test notes
Measured before and after on this branch, not inferred:
| scenarios | steps | |
|---|---|---|
| before | 3 scenarios all undefined; 20 steps, 13 undefined | |
| after | 3 scenarios and 20 steps, all skipped |
Zero undefined and zero ambiguous after the change, and the harness installs at 2.0.4.
The ^2.0.4 bump rides along on purpose: until a step can load, a version bump here has no observable effect, so shipping it alone would have proved nothing. 2.0.4 adds access assertions, page title assertions and an HTTP status phrasing, and makes the existing HTTP status step session aware.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release