-
-
Notifications
You must be signed in to change notification settings - Fork 747
Fix tryTo steps appearing in test failure traces #5088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: kobenguyent <[email protected]>
@copilot continue the fix. Add unit tests. |
I've continued the fix and added comprehensive unit tests. The fix is now complete with proper test coverage. What was added:
The fix correctly addresses issue #4619 where failed steps inside |
Co-authored-by: kobenguyent <[email protected]>
@copilot I noticed the output when running with --verbose mode missing info
when test failed, there are no:
like we used to have in output. Let's check and fix that. |
... I've investigated the verbose output issue and created a test that reproduces the scenario you described. In my testing, the verbose output is actually working correctly - it shows "-- FAILURES:", "Scenario Steps:", and properly excludes steps from tryTo sessions. Could you provide more details about your specific test environment? Are you:
The fix for #4619 appears to be working as intended, so there might be another factor causing the verbose output to be suppressed in your case. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
When using
tryTo
to handle optional/flaky steps, failed steps insidetryTo
were incorrectly appearing in the main test failure trace, even when the actual test failure occurred from a different step later in the test.Example of the issue:
Before the fix: The error trace would show the failed
I.seeElement('.doesntexist')
step from insidetryTo
as part of the failure trace, confusing developers about the actual source of the test failure.After the fix: Only steps executed outside of
tryTo
andhopeThat
sessions are included in the main test failure trace, providing a cleaner and more accurate representation of what actually caused the test to fail.Implementation: Modified the step recording logic in
lib/listener/steps.js
to exclude steps fromtryTo
andhopeThat
sessions when building the main test steps array. Added comprehensive unit tests to validate the behavior.Fixes #4619.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.