Skip to content

fix(playwright): start no browser in _beforeSuite with restart: browser (#5784) - #5785

Open
danielrentz wants to merge 1 commit into
codeceptjs:4.xfrom
danielrentz:issue5784
Open

danielrentz wants to merge 1 commit into
codeceptjs:4.xfrom
danielrentz:issue5784

Conversation

@danielrentz

Copy link
Copy Markdown
Contributor

Motivation/Description of the PR

  • With restart: true or restart: 'browser', _before() starts a browser for each test. _beforeSuite() started one more browser for each test file, which the first test replaced without closing it, so one browser per test file kept running until the process ended. _beforeSuite() now starts no browser with this restart strategy.
  • Resolves Playwright: restart: true leaks one browser per test file #5784

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium

Applicable plugins:

  • aiTrace
  • autoDelay
  • autoLogin
  • customLocator
  • pause
  • coverage
  • heal
  • retryFailedStep
  • screenshot
  • selenoid
  • stepTimeout
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

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): test/unit on Windows; the 12 tests that fail there fail on 4.x without this change as well

…er (codeceptjs#5784)

With the browser restart strategy, _before() starts a browser for each
test. The browser that _beforeSuite() started was replaced by the one of
the first test and never closed, so each test file left one browser
running.

This branch has not been deployed

No deployments
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.

Playwright: restart: true leaks one browser per test file

1 participant