-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: guide for Playwright #9662
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
## Sharing Playwright utilities | ||
|
||
You can also create a common package for shared utilities that you need in your end-to-end test suites. We recommend using `peerDependencies` in this shared package so that you can get access to Playwright used in consumers without having to install Playwright into the shared package itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ spreading the gospel of peer dependencies
|
||
</Tabs> | ||
|
||
Later on, when you want to run your end-to-end tests, use [the `--only` flag](/repo/docs/reference/run#--only) to run end-to-end tests without running the application's build first. As an example, your command may look like `turbo run e2e --filter=@repo/playwright-myapp --only`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could encode this behavior in the graph with a "src": {"dependsOn": ["^src"]}
definition and updating "e2e": { "dependsOn": ["^src"] }
. This encodes in the task graph that e2e
doesn't actually require the app to build vs in runtime args. (We do this for some Rust tasks)
The downside is it introduces "transit nodes" 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tough one. I don't see any clear winner on the tradeoffs...Let's ship it and see if feedback tells us to re-approach that way.
Description
Guide on how to use Playwright in Turborepo.
Testing Instructions
👀