Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Playwright dependencies to 1.44.0 #3070

Merged
merged 1 commit into from
May 9, 2024
Merged

Pin Playwright dependencies to 1.44.0 #3070

merged 1 commit into from
May 9, 2024

Conversation

philrz
Copy link
Contributor

@philrz philrz commented May 9, 2024

This fixes a problem that I've determined via binary search showed up at commit 4b851d8 that's associated with the changes in #2972.

Starting at that commit, when locally running yarn test, I'm finding it only gets this far and then hangs:

$ yarn test
 
    ✔  nx run zui-test-data:test (2s)
    ✔  nx run sample-data:test (2s)
    ✔  nx run zed-js:test (6s)
    ✔  nx run zed-node:test (10s)
    ✔  nx run insiders:test (3s)
    ✔  nx run zui:test (34s)

 ——————————————————————————————————————————————————————————————————————————————

 >  NX   Running target test for 7 projects
 
    →    Executing 1/1 remaining tasks...
 
    ⠹    nx run zed-wasm:test
 
    ✔    6/6 succeeded [0 read from cache]

At that point a tab opens up on my browser to http://localhost:9323/ that looks like this:

image

If I click the top error it expands to:

Error: browserType.launch: Executable doesn't exist at /Users/phil/Library/Caches/ms-playwright/chromium-1091/chrome-mac/Chromium.app/Contents/MacOS/Chromium
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers:              ║
║                                                                         ║
║     yarn playwright install                                             ║
║                                                                         ║
║ <3 Playwright Team                                                      ║
╚═════════════════════════════════════════════════════════════════════════╝

Meanwhile the directory in question contains:

$ ls -l  /Users/phil/Library/Caches/ms-playwright
total 0
drwxr-xr-x  4 phil  staff  128 May  9 13:13 chromium-1097
drwxr-xr-x  5 phil  staff  160 May  8 20:00 ffmpeg-1009

I don't claim to fully understand how this all fits together, but looking at what changed in #2972, I have a good guess. Before #2972 merged, zui-player was the only package that referenced Playwright:

$ grep playwright packages/zui-player/package.json 
    "test": "playwright test -c playwright.config.js",
    "ci": "playwright test -c ci.config.js"
    "@playwright/test": "1.41.1",
    "playwright": "1.41.1",
    "playwright-chromium": "1.41.1"

But with the arrival of those changes, there's now a Playwright reference in the zed-wasm dependencies.

$ grep playwright packages/zed-wasm/package.json 
    "test:browser": "playwright test",
    "@playwright/test": "^1.40.1",

However, it looks like the absence of the playwright-chromium dependency meant that when trying to run the zed-wasm test it looked for a Chromium version associated with @playwright/test": "^1.40.1 and that's not the one provided by "playwright-chromium": "1.41.1".

I confirmed that if I added the missing 1.40.1 entries to zed-wasm's package.json it adds the additional Chromium version:

$ ls -l  /Users/phil/Library/Caches/ms-playwright
total 0
drwxr-xr-x  4 phil  staff  128 May  9 13:23 chromium-1091
drwxr-xr-x  4 phil  staff  128 May  9 13:13 chromium-1097
drwxr-xr-x  5 phil  staff  160 May  8 20:00 ffmpeg-1009

...and yarn test passes.

However, I also noticed that Playwright 1.44.0 has just come out and since there's no compelling reason to have the different packages depending on different Playwright versions I've converged everything here and confirmed that all tests still pass.

@philrz philrz self-assigned this May 9, 2024
@philrz philrz requested review from jameskerr, mattnibs and nwt May 9, 2024 20:32
@philrz philrz merged commit fd05ad4 into main May 9, 2024
3 checks passed
@philrz philrz deleted the playwright-1.44.0 branch May 9, 2024 21:47
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.

2 participants