Skip to content

fix: support Playwright 1.58+ output format in codeceptjs info (4.x)#5437

Merged
kobenguyent merged 2 commits into
codeceptjs:4.xfrom
mirao:fix/playwright-browsers-info-5422-4x
Jun 3, 2026
Merged

fix: support Playwright 1.58+ output format in codeceptjs info (4.x)#5437
kobenguyent merged 2 commits into
codeceptjs:4.xfrom
mirao:fix/playwright-browsers-info-5422-4x

Conversation

@mirao
Copy link
Copy Markdown
Contributor

@mirao mirao commented Feb 9, 2026

Summary

Test plan

  • All 14 unit tests for parsePlaywrightBrowsers pass (npx mocha test/unit/command/info_test.js)

mirao and others added 2 commits February 9, 2026 09:51
Playwright 1.58 changed the output format of `npx playwright install --dry-run`:
- Old format: "browser: chromium version 143.0.7499.4"
- New format: "Chrome for Testing 145.0.7632.6 (playwright chromium v1208)"

Updated the regex to handle both formats while excluding chromium-headless-shell.

Fixes codeceptjs#5422

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract parsePlaywrightBrowsers function and add unit tests to verify
both old (Playwright < 1.58) and new (1.58+) output formats are parsed
correctly, and that chromium-headless-shell is excluded.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mirao
Copy link
Copy Markdown
Contributor Author

mirao commented May 26, 2026

@DavertMik Could you merge the PR?

The fix is already in 3.x, but still missing in 4.x

mirao@rog:/tmp/runmultiple401$ codeceptjs info

 Environment information: 

[TESTOMATIO] Testomatio Reporter v2.8.2
codeceptVersion:  "4.0.2"
nodeInfo:  20.19.5
osInfo:  Linux 6.17 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
cpuInfo:  (16) x64 AMD Ryzen 7 9700X 8-Core Processor
osBrowsers:  "chrome: 148.0.7778.178, edge: /, firefox: 151.0.1, safari: N/A"
playwrightBrowsers:  ""
helpers:  {
 "Playwright": {
  "browser": "chromium",
  "url": "https://example.com/",
  "show": true
 }
}

@kobenguyent kobenguyent merged commit 12c0f33 into codeceptjs:4.x Jun 3, 2026
10 checks passed
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.

3 participants