Skip to content

Commit

Permalink
Recommend npx rather than yarn to install web browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed May 24, 2024
1 parent a86de5f commit 53ba8be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ to test in browser environment (provided by [playwright](https://playwright.dev/
If you have never installed playwright before or updated it, you need to install the browsers
by executing:

````bash
yarn playwright install
```bash
npx playwright install

This comment has been minimized.

Copy link
@gabalafou

gabalafou May 24, 2024

Contributor

I thought about npx, but that would potentially mask if yarn install doesn't install the Playwright CLI, which is what we want?

This comment has been minimized.

Copy link
@fcollonval

fcollonval May 24, 2024

Author Member

This is unlikely as the yarn config is set by us to use node_modules linker.

This comment has been minimized.

Copy link
@gabalafou

gabalafou May 24, 2024

Contributor

npx absorbs config from .yarnrc.yml?

What I'm trying to say is that npx has this useful feature where it will go out and download the package if you don't already have it installed. But I believe that we don't want the user to have to download playwright after running yarn install, and my experience with this PR applied to the repo made me wonder whether or not that was happening...

This comment has been minimized.

Copy link
@gabalafou

gabalafou May 24, 2024

Contributor

What I remember happening locally was roughly the following:

  1. gh pr checkout 704
  2. yarn
  3. yarn build:src
  4. yarn build:test
  5. yarn test
  6. Got an error message in the console saying to run yarn playwright install
  7. Then got another error message about not being able to find playwright
  8. Then down the rabbit hole of installing different yarn versions, and so on and so forth until I got it working
```

To run the tests, run:

```bash
yarn build:test
yarn test # optionally test:chromium, test:firefox, or test:webkit
````
```

You can run the tests manually to debug them by going inside one package (e.g. `packages/application`)
and then executing `yarn test:debug`. This should open your browser
Expand Down

0 comments on commit 53ba8be

Please sign in to comment.