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

Fix browser test errs on mac #630

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

allison-truhlar
Copy link

Addresses issue #627.

  • Adds playwright as a dependency; removes webdriverio.
  • Configures Vitest to use playwright as the browser provider rather than webdriverio.
  • Adds npx playwright install to the test and test:watch commands in package.json. This is to ensure playwright updates after the initial install, to avoid getting the error Error: browserType.launch, followed the by the instructions: "Looks like Playwright Test or Playwright was just installed or updated. Please run the following command to download new browsers: npx playwright install.

All tests pass in macOS 14.5 using this configuration.

Replaces PR #628. These commits use the correct email address associated with the Janelia CLA.

@allison-truhlar allison-truhlar marked this pull request as ready for review August 1, 2024 16:54
@jbms
Copy link
Collaborator

jbms commented Aug 1, 2024

Thanks!

Does this allow the WebGL tests to pass in Github actions on macOS? (See 33f5eb5#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721)

@allison-truhlar
Copy link
Author

I'm not sure - I just removed the if statement in the GitHub action to allow the tests including WebGL to run.

@jbms
Copy link
Collaborator

jbms commented Aug 2, 2024

It looks like this still does not allow the tests to pass on macOS on github actions, but hopefully it will work in the future after microsoft/playwright#30585 is fixed.

Per the description here (https://playwright.dev/docs/library#key-differences) does it work to just add @playwright/browser-chromium as a dev dependency rather than having to do npx playwright install?

@allison-truhlar
Copy link
Author

In the latest commit, I tested adding @playwright/browser-chromim as a dev dependency and removing npx playwright install from the test commands - I can confirm this works.

@mkitti
Copy link

mkitti commented Aug 15, 2024

Error: browserType.launch: Executable doesn't exist at /Users/runner/Library/Caches/ms-playwright/chromium-1124/chrome-mac/Chromium.app/Contents/MacOS/Chromium

Would adding npx playwright install-deps chromium help resolve the client tests here?

@allison-truhlar
Copy link
Author

@mkitti Which version of the PR did you get this error from? Is this after I added @playwright/browser-chromium as a dev dependency?

@mkitti
Copy link

mkitti commented Aug 19, 2024

Yes. You can see it in the Github Actions tests for client (macos-latest):
https://github.com/google/neuroglancer/actions/runs/10289555738/job/28497954784?pr=630#step:14:18

@allison-truhlar
Copy link
Author

Added npx playwright install-deps chromium to the workflow, per @mkitti's suggestion, to see if this resolves the test failure in GitHub actions.

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