@ -1,39 +1,43 @@
|
||||
# Twenty e2e Testing
|
||||
# Twenty end-to-end (E2E) Testing
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Installing the browsers:
|
||||
|
||||
```
|
||||
yarn playwright install
|
||||
npx nx setup twenty-e2e-testing
|
||||
```
|
||||
|
||||
### Run end-to-end tests
|
||||
|
||||
```
|
||||
yarn run test:e2e
|
||||
npx nx test twenty-e2e-testing
|
||||
```
|
||||
|
||||
### Start the interactive UI mode
|
||||
|
||||
```
|
||||
yarn run test:e2e:ui
|
||||
```
|
||||
|
||||
### Run test only on Desktop Chrome
|
||||
|
||||
```
|
||||
yarn run test:e2e:chrome
|
||||
npx nx test:ui twenty-e2e-testing
|
||||
```
|
||||
|
||||
### Run test in specific file
|
||||
```
|
||||
yarn run test:e2e <filename>
|
||||
npx nx test twenty-e2e-testing <filename>
|
||||
```
|
||||
|
||||
Example (location of the test must be specified from the root of `twenty-e2e-testing` package):
|
||||
```
|
||||
npx nx test twenty-e2e-testing tests/login.spec.ts
|
||||
```
|
||||
|
||||
### Runs the tests in debug mode.
|
||||
```
|
||||
yarn run test:e2e:debug
|
||||
npx nx test:debug twenty-e2e-testing
|
||||
```
|
||||
|
||||
### Show report after tests
|
||||
```
|
||||
npx nx test:report twenty-e2e-testing
|
||||
```
|
||||
|
||||
## Q&A
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
{
|
||||
"name": "twenty-e2e-testing",
|
||||
"version": "0.40.0-canary",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.46.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test:e2e:setup": "yarn playwright install",
|
||||
"test:e2e": "yarn playwright test",
|
||||
"test:e2e:ui": "yarn playwright test --ui",
|
||||
"test:e2e:chrome": "yarn playwright test --project=chromium",
|
||||
"test:e2e:debug": "yarn playwright test --debug",
|
||||
"test:e2e:report": "yarn playwright show-report"
|
||||
"@playwright/test": "^1.49.0"
|
||||
}
|
||||
}
|
||||
|
||||
52
packages/twenty-e2e-testing/project.json
Normal file
52
packages/twenty-e2e-testing/project.json
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "twenty-e2e-testing",
|
||||
"projectType": "application",
|
||||
"tags": ["scope:testing"],
|
||||
"targets": {
|
||||
"setup": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/twenty-e2e-testing",
|
||||
"commands": [
|
||||
"yarn playwright install"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/twenty-e2e-testing",
|
||||
"commands": [
|
||||
"yarn playwright test"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test:ui": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/twenty-e2e-testing",
|
||||
"commands": [
|
||||
"yarn playwright test --ui"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test:debug": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/twenty-e2e-testing",
|
||||
"commands": [
|
||||
"yarn playwright test --debug"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test:report": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/twenty-e2e-testing",
|
||||
"commands": [
|
||||
"yarn playwright show-report"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
37
yarn.lock
37
yarn.lock
@ -9707,6 +9707,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@playwright/test@npm:^1.49.0":
|
||||
version: 1.49.1
|
||||
resolution: "@playwright/test@npm:1.49.1"
|
||||
dependencies:
|
||||
playwright: "npm:1.49.1"
|
||||
bin:
|
||||
playwright: cli.js
|
||||
checksum: 10c0/2fca0bb7b334f7a23c7c5dfa5dbe37b47794c56f39b747c8d74a2f95c339e7902a296f2f1dd32c47bdd723cfa92cee05219f1a5876725dc89a1871b9137a286d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polka/url@npm:^1.0.0-next.24":
|
||||
version: 1.0.0-next.25
|
||||
resolution: "@polka/url@npm:1.0.0-next.25"
|
||||
@ -38583,6 +38594,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"playwright-core@npm:1.49.1":
|
||||
version: 1.49.1
|
||||
resolution: "playwright-core@npm:1.49.1"
|
||||
bin:
|
||||
playwright-core: cli.js
|
||||
checksum: 10c0/990b619c75715cd98b2c10c1180a126e3a454b247063b8352bc67792fe01183ec07f31d30c8714c3768cefed12886d1d64ac06da701f2baafc2cad9b439e3919
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"playwright@npm:1.46.0, playwright@npm:^1.14.0, playwright@npm:^1.46.0":
|
||||
version: 1.46.0
|
||||
resolution: "playwright@npm:1.46.0"
|
||||
@ -38598,6 +38618,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"playwright@npm:1.49.1":
|
||||
version: 1.49.1
|
||||
resolution: "playwright@npm:1.49.1"
|
||||
dependencies:
|
||||
fsevents: "npm:2.3.2"
|
||||
playwright-core: "npm:1.49.1"
|
||||
dependenciesMeta:
|
||||
fsevents:
|
||||
optional: true
|
||||
bin:
|
||||
playwright: cli.js
|
||||
checksum: 10c0/2368762c898920d4a0a5788b153dead45f9c36c3f5cf4d2af5228d0b8ea65823e3bbe998877950a2b9bb23a211e4633996f854c6188769dc81a25543ac818ab5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"plugin-error@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "plugin-error@npm:1.0.1"
|
||||
@ -44872,7 +44907,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "twenty-e2e-testing@workspace:packages/twenty-e2e-testing"
|
||||
dependencies:
|
||||
"@playwright/test": "npm:^1.46.0"
|
||||
"@playwright/test": "npm:^1.49.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
||||
Reference in New Issue
Block a user