Skip to content

Remove deprecated I.retry() and I.limitTime()#5567

Merged
DavertMik merged 2 commits into
4.xfrom
remove-deprecated-actor-methods
May 17, 2026
Merged

Remove deprecated I.retry() and I.limitTime()#5567
DavertMik merged 2 commits into
4.xfrom
remove-deprecated-actor-methods

Conversation

@DavertMik
Copy link
Copy Markdown
Contributor

Summary

Removes the long-deprecated I.retry() and I.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:

import step from 'codeceptjs/steps'

// 3.x (removed)             →  4.x
I.retry(3).click('Submit')   //  I.click('Submit', step.retry(3))
I.limitTime(10).fillField()  //  I.fillField(..., step.timeout(10))

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 — removed retry() / limitTime() and the now-unused retryStep, store, TIMEOUT_ORDER imports
  • typings — removed the retry() / limitTime() actor declarations (recorder.retry() typing kept)
  • fixtures & unit test — migrated flaky_test.retry.js, step_timeout/first_test.js, timeouts/suite_test.js, and test/unit/actor_test.js to step.retry() / step.timeout()
  • docs — rewrote the migration-4.md section with 3.x→4.x mappings; fixed stale references in index.md, detox.md, custom-helpers.md, timeouts.md, and the retryFailedStep / stepTimeout plugin doc-comments (+ generated plugin docs)

Verification

All affected suites pass:

Suite Result
test/unit/actor_test.js 11 passing
test/runner/timeout_test.js 10 passing
test/runner/step_timeout_test.js 6 passing
test/runner/interface_test.js (retry/flaky/propagate) 3 passing
test/runner/dry_run_test.js 12 passing

No I.retry( / I.limitTime( references remain in lib/ or test/.

🤖 Generated with Claude Code

DavertMik and others added 2 commits May 17, 2026 03:19
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>
@DavertMik DavertMik merged commit e37977a into 4.x May 17, 2026
10 checks passed
@DavertMik DavertMik deleted the remove-deprecated-actor-methods branch May 17, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant