[test optimization] Fix cypress attempt to fix #7767
Conversation
Overall package sizeSelf size: 4.97 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7767 +/- ##
==========================================
- Coverage 80.43% 80.34% -0.09%
==========================================
Files 741 743 +2
Lines 32173 32296 +123
==========================================
+ Hits 25877 25949 +72
- Misses 6296 6347 +51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmark execution time: 2026-03-16 11:16:42 Comparing candidate commit cd47697 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 229 metrics, 31 unstable metrics. |
anmarchenko
left a comment
There was a problem hiding this comment.
In spec we ignore the failure for attempt to fix only if test is quarantined or disbaled:
If test is tagged with test.test_management.is_test_disabled or test.test_management.is_quarantined tag, then the test results are ignored (reported to the test framework as skipped, passed, or quarantined, whatever is easier to implement and available in the test framework)
…less of ATF status Per spec, quarantined and disabled test results are always ignored. The previous code excluded quarantined+ATF tests from suppression via `isQuarantined && !isAttemptToFix`. This changes the condition to `isQuarantined || isDisabled` so failures are suppressed for any quarantined or disabled test, whether or not it is also attempt-to-fix. Plain ATF tests (not quarantined/disabled) still propagate failures as expected by the spec. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1882fe8 to
64b8362
Compare
The support.js change removed 2 lines, shifting the bundled line number from 246 to 244 for the plain JS invocationDetails test. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
What does this PR do?
Fixes the
Cypress.on('fail')handler to suppress failures for quarantined and disabled tests regardless of attempt-to-fix (ATF) status, aligning with the test management spec.Motivation
The spec states: "If test is tagged with
test.test_management.is_test_disabledortest.test_management.is_quarantined, then the test results are ignored."The previous condition
isQuarantined && !isAttemptToFixexcluded quarantined+ATF tests from suppression, causing Cypress to exit with code 1 even though the test was quarantined. Plain ATF tests (not quarantined/disabled) should still propagate failures — only the quarantined/disabled status determines whether results are ignored.Changes
packages/datadog-plugin-cypress/src/support.js— Change suppression condition fromisQuarantined && !isAttemptToFixtoisQuarantined || isDisabled.integration-tests/cypress/cypress.spec.js— Update exit code assertion to expect 0 whenisQuarantinedorisDisabled. Remove resolved TODO comment about quarantined+ATF tests not being suppressed.