mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
refactor(Playwright): separate kernel dep from generic installation (#51277)
This commit is contained in:
@@ -2,10 +2,19 @@
|
||||
|
||||
## Installation:
|
||||
|
||||
To install Playwright run:
|
||||
|
||||
```console
|
||||
pnpm run playwright:install-build-tools
|
||||
```
|
||||
|
||||
Alternatively you can follow official documentation referenced below:
|
||||
|
||||
To install and configure Playwright on your machine check out this [documentation](https://playwright.dev/docs/intro#installing-playwright)
|
||||
|
||||
To learn how to write Playwright tests, or 'specs', please see Playwright's official [documentation](https://playwright.dev/docs/writing-tests).
|
||||
|
||||
|
||||
## Where to Add a Test
|
||||
|
||||
- Playwright tests are in the `./e2e` directory.
|
||||
@@ -25,6 +34,11 @@ To learn how to write Playwright tests, or 'specs', please see Playwright's offi
|
||||
|
||||
To run tests with Playwright check the following below
|
||||
|
||||
- Make sure you navigate to the e2e repo first
|
||||
```console
|
||||
cd e2e
|
||||
```
|
||||
|
||||
- To run tests in UI helper mode:
|
||||
|
||||
```console
|
||||
@@ -93,6 +107,11 @@ npx playwright show-report
|
||||
|
||||
Playwright is generally a solid bullet-proof tool. The contributor has already configured the tests to run on all OS machines, including majpr distributions of Windows, MacOS and Linux.
|
||||
|
||||
- (MacOs and Linux) If running Playwright results in an error due to kernel dependencies, run the following command:
|
||||
|
||||
```console
|
||||
pnpm run playwright:install-build-tools-linux
|
||||
```
|
||||
|
||||
- A common error seen in playwright is as follows:
|
||||
|
||||
|
||||
+2
-1
@@ -68,7 +68,8 @@
|
||||
"lint:prettier": "prettier --list-different .",
|
||||
"reload:server": "pm2 reload api-server/ecosystem.config.js",
|
||||
"preseed": "npm-run-all create:*",
|
||||
"playwright:install-build-tools": "sh ./playwright-install.sh && cd ./e2e && npm i && npx playwright install && npx playwright install-deps",
|
||||
"playwright:install-build-tools": "cd ./e2e && npm i && npx playwright install && npx playwright install-deps",
|
||||
"playwright:install-build-tools-linux": "sh ./playwright-install.sh",
|
||||
"seed": "cross-env DEBUG=fcc:* node ./tools/scripts/seed/seed-demo-user",
|
||||
"seed:certified-user": "cross-env DEBUG=fcc:* node ./tools/scripts/seed/seed-demo-user certified-user",
|
||||
"seed:exams": "cd tools/scripts/seed-exams && cross-env node ./create-exams.js",
|
||||
|
||||
Reference in New Issue
Block a user