CodeceptJS
CodeceptJS copied to clipboard
'dry-run' produces console errors for 'tryTo' instances
What are you trying to achieve?
Export steps for BDD scenarios.
What do you get instead?
Tests run as expected, but 'dry-run' throws error for 'tryTo' instances.
Provide console output if related. Use
--verbosemode for more details.
Submit randomized answers @Smoke @CRUD @DB
Given I am on the About You page
✖ FAILED in 11ms
-- FAILURES:
1) Submission
Submit randomized answers @Smoke @CRUD @DB:
tryTo is not defined
The step calls a function that uses tryTo: const result = await tryTo(() => I.see('This survey requires that your browser accept cookies from our web site.'));
Details
- CodeceptJS version: 3.3.3
- NodeJS Version: 16.14.2
- Operating System: OSX 12.4
- Playwright
- Configuration file:
plugins: {
screenshotOnFail: {
enabled: true
},
pauseOnFail: {},
retryFailedStep: {
enabled: true
},
tryTo: {
enabled: true
},
fakerTransform: {
enabled: true
},
},
I do not have a bdd approach and I am having the same error when executing dry-run
By default, all plugins are disabled when running dry-run command, https://codecept.io/commands/#dry-run so that's why you got this error.
Please either enable the plugin by passing -p tryTo or wait for https://github.com/codeceptjs/CodeceptJS/pull/3940 which is more convenient to enable all plugin at once -p all