Problem/Motivation
Updating to @vardot/varbase-e2e 2.0.4 breaks this test suite: 36 of the 250 scenarios stop with Multiple step definitions match. The library now ships three steps this recipe also defines locally, so Cucumber sees two definitions per sentence and will not guess:
Then I should be refused "/admin/config/content/editoria11y" Then I should be allowed "/admin/content" And the page title should contain "Undergraduate Robotics Team Wins Regional Championship"
Ours are in tests/step-definitions/educare.steps.js (lines 189, 212 and 230); the library's are in its navigation.steps.js and assertion.steps.js.
Keep the library ones. The refusal step passes on 403, 404, an access-denied page or a redirect to the log-in form, where ours only accepted 403 and 404; "should be allowed" is its documented positive half; and all three are in docs/steps/navigation.md and docs/steps/assertion.md.
One difference to know about: the library page-title check is case-sensitive, ours was not. Both titles this suite asserts already match the rendered case, so no scenario needs rewording.
Steps to reproduce
- On
1.0.x, runnpm installso@vardot/varbase-e2eresolves 2.0.4. - Run
npx cucumber-js --dry-run. No site, no browser: the run stops before that.
250 scenarios (36 ambiguous, 214 skipped) 1817 steps (67 ambiguous, 1750 skipped)
Proposed resolution
- Delete those three steps (and their doc blocks) from
tests/step-definitions/educare.steps.js. Everything else in that file is Educare's own and stays. - Require
@vardot/varbase-e2e^2.0.4. - No feature file changes: the sentences are identical.
Dry-run after the change: 250 scenarios, 1817 steps, nothing ambiguous, nothing undefined. The browser suite needs an installed Educare site, so CI is what confirms the scenarios still pass.
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 educare-1.0.1
User interface changes
- None. This is the test suite only.
API changes
- None.
Data model changes
- None.
Release notes snippet
- Test suite: the refused, allowed and page-title steps now come from @vardot/varbase-e2e 2.0.4 instead of local copies.
Issue fork educare-3621385
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
Comment #2
rajab natshahComment #5
rajab natshah