Remove deprecated I.retry() and I.limitTime()#5567
Merged
Conversation
Both were deprecated in 3.x; removed in 4.x as part of the major break. The step options API (step.retry() / step.timeout() passed as the last step argument) is the replacement and behaves identically without the 3.x footgun of leaking config onto the following step. - lib/actor.js: drop retry()/limitTime() and now-unused imports - typings: remove retry()/limitTime() actor declarations - migrate runner fixtures and actor unit test to step.retry()/step.timeout() - migration-4.md: document removal with 3.x->4.x mappings - fix stale I.retry()/I.limitTime() references in docs and plugin doc-comments Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- typings/tests/helpers/Playwright.types.ts + PlaywrightTs.types.ts: remove clickLink expectType assertions (clickLink was removed from the Playwright helper) - typings/tests/actor.types.ts: drop the now-invalid I.retry() calls; document that retry()/limitTime() were removed (I is `any` here so the removal cannot be asserted at the type level) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the long-deprecated
I.retry()andI.limitTime()actor methods as part of the 4.x major break. Both printed a deprecation notice in 3.x and chained onto the next step; the step options API is the replacement and is semantically identical:This also fixes the 3.x footgun where
I.retry()could leak retry settings onto the following step —step.*configs apply only to the step they are attached to.recorder.retry()is unaffected and still available for custom helpers.Changes
lib/actor.js— removedretry()/limitTime()and the now-unusedretryStep,store,TIMEOUT_ORDERimportsretry()/limitTime()actor declarations (recorder.retry()typing kept)flaky_test.retry.js,step_timeout/first_test.js,timeouts/suite_test.js, andtest/unit/actor_test.jstostep.retry()/step.timeout()migration-4.mdsection with 3.x→4.x mappings; fixed stale references inindex.md,detox.md,custom-helpers.md,timeouts.md, and theretryFailedStep/stepTimeoutplugin doc-comments (+ generated plugin docs)Verification
All affected suites pass:
test/unit/actor_test.jstest/runner/timeout_test.jstest/runner/step_timeout_test.jstest/runner/interface_test.js(retry/flaky/propagate)test/runner/dry_run_test.jsNo
I.retry(/I.limitTime(references remain inlib/ortest/.🤖 Generated with Claude Code