Skip to content

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

Currently inside the _before() of helpers for example Playwright, the retries is set there https://github.com/codeceptjs/CodeceptJS/blob/3.x/lib/helper/Playwright.js#L477, however, when retryFailedStep plugin is enabled, the retries of recorder is still using the value from _before() not the value from retryFailedStep plugin.

Fix:

  • introduce the process.env.FAILED_STEP_RETIRES which could be access everywhere as the helper won't know anything about the plugin.
  • set default retries of Playwright to 3 to be on the same page with Puppeteer.

Applicable helpers:

  • Playwright
  • Puppeteer

Applicable plugins:

  • retryFailedStep

Type of change

  • 🐛 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent linked an issue Nov 25, 2023 that may be closed by this pull request
@kobenguyent kobenguyent merged commit c286f42 into 3.x Nov 29, 2023
@kobenguyent kobenguyent deleted the 3268-argument-retries-for-plugin-retryfailedstep-is-not-working branch November 29, 2023 06:16
@mirao
Copy link
Contributor

mirao commented Nov 29, 2023

@kobenguyent Did you mean FAILED_STEP_RETRIES instead of FAILED_STEP_RETIRES ?

@kobenguyent
Copy link
Collaborator Author

@kobenguyent Did you mean FAILED_STEP_RETRIES instead of FAILED_STEP_RETIRES ?

Thanks @mirao my typo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Argument retries for plugin retryFailedStep is not working retryFailedStep plugin not respecting all configuration options

2 participants